After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 309076 - from GST_BUFFER_KEY_UNIT to GST_BUFFER_DELTA_UNIT
from GST_BUFFER_KEY_UNIT to GST_BUFFER_DELTA_UNIT
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-06-26 18:37 UTC by Luca Ognibene
Modified: 2005-07-16 15:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Luca Ognibene 2005-06-26 18:37:49 UTC
from gstbuffer.h

 * @GST_BUFFER_KEY_UNIT: the buffer holds a key unit, a unit that can be
 * decoded independently of other buffers.
 * This flag has been deprecated, see #GST_BUFFER_DELTA_UNIT.

grepping gst-plugins and gst-ffmpeg there a lot of elements that set KEY_UNIT
and some that set DELTA_UNIT. What is the right way to handle this in 0.8?
Setting both? Setting only DELTA_UNIT?
Comment 1 daniel fischer 2005-06-27 18:51:19 UTC
references to KEY_UNIT:
ext/ogg/gstogmparse.c
ext/divx/gstdivxenc.c
ext/xvid/gstxvidenc.c
ext/mpeg2dec/gstmpeg2dec.c
ext/mpeg2dec/gstmpeg2dec.c
ext/mpeg2dec/gstmpeg2dec.c
ext/theora/theoraenc.c
ext/theora/theoraenc.c
gst/avi/gstavimux.c
gst/avi/gstavidemux.c
gst/matroska/matroska-mux.c
gst/asfdemux/gstasfmux.c

references to DELTA_UNIT:
ext/ogg/gstoggmux.c
ext/ogg/gstoggmux.c
ext/theora/theoraenc.c
ext/theora/theoraenc.c
gst/tcp/gstmultifdsink.c


what is the rationale behind flagging delta vs key? most libs i know (eg ffmpeg)
flag the keyframes..

0.8.5 release notes say:
* GstBufferFlag has a deprecated enum member, GST_BUFFER_KEY_UNIT.
Buffers should be marked with GST_BUFFER_DELTA_UNIT when they're not
key units instead, since key units are the more common case.

"key units are the more common case"? i disagree, you have 1 key for a group of
delta frames, no? so you usually have much less keyframes than delta/intra frames.

can i suggest
for 0.8, to not wait for someone to fix all these, but support _both_ flags when
you have to touch the element (as i will do with #309049 if that's the way) and
for 0.9, get it right ;) (IMHO, use the currently deprecated KEY_UNIT flag)
Comment 2 daniel fischer 2005-06-27 20:11:53 UTC
admitted, key units are much more common if we're not just talking compressed
video...
Comment 3 Andy Wingo 2005-07-16 15:19:18 UTC
Also it's just about only video that has delta frames. For example all vorbis
packets are "key units", all pcm buffers are key units, etc. The logic was reversed.

For 0.9 we fixed this by removing KEY_UNIT altogether. For 0.8 though... not
sure really, you can't just remove the old behaviour. Not can you change the
interpretation of a buffer with neither flag (in 0.9 they are key units, in 0.8
historically they have been delta units).

However, the flags only have meaning for muxers and demuxers of a given format,
and those can be changed together (e.g. theora and ogg both in gst-plugins). So
if you have control over all elements that care about the flags, you can change
to DELTA_UNIT. Otherwise in 0.8 you should leave it like it is, things will
continue to work.