GST_BUFFER_FLAG_DROPPABLE to detect keyframes?

Juan Navarro juan.navarro at gmx.es
Mon Feb 17 16:26:48 UTC 2020


Should GST_BUFFER_FLAG_DROPPABLE be considered when trying to identify
video keyframes?

Docs on buffer flags are a bit too precise about what each flag does,
but tend to be vague about what it actually _means_ in the more general
sense, so I haven't been able to discern if this is enough to classify a
buffer as keyframe:

!GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)

or if this would be a better / more robust choice:

!( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
     || GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )

or if these two flags are related in such way that they will always come
together when the frame is indeed a keyframe, and thus this expression
would be better:

!( GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DELTA_UNIT)
     && GST_BUFFER_FLAG_IS_SET (buffer, GST_BUFFER_FLAG_DROPPABLE) )

Here they say "maybe" it's a good idea checking for "DROPPABLE":
https://stackoverflow.com/a/52873803

And here it is mentioned that "NON_DROPPABLE" might mean keyframe, so I
guess by extension we should assume that "DROPPABLE" might mean
non-keyframe:
https://gstreamer.freedesktop.org/releases/1.14/ (under "New RTP
features and improvements")

But I'm missing a more concrete piece of text talking about the
implications of DELTA_UNIT, DROPPABLE / NON_DROPPABLE, and the meaning
of their possible combinations, if any.

Could someone that knows about this share a bit of know-how?

Thanks :)
Juan


More information about the gstreamer-devel mailing list