rtp marker bit available for the decoder

Gabriele Mondada gmondada at recolive.com
Mon Aug 22 05:12:03 PDT 2011


Hi,
I would like to have a flag in the gstbuffer to report the status of the marker bit of an rtp telegram. Do you agree to add this flag?
Two possibilities: add GST_BUFFER_FLAG_MARKER or add GST_BUFFER_FLAG_INTERMED (the opposite).
In most of the use cases (not only rtp cases), a decoder receives a complete frame, so a "marked" one. By defining GST_BUFFER_FLAG_INTERMED, the default value is zero, meaning "marked" and conforming with such frequent use cases.
Any comment, suggestion, more explicit flag name, etc?
Thanks,
Gabriele

diff -ru gstreamer-0.10.35.orig/gst/gstbuffer.h gstreamer-0.10.35/gst/gstbuffer.h
--- gstreamer-0.10.35.orig/gst/gstbuffer.h	2011-06-14 00:35:23.000000000 +0200
+++ gstreamer-0.10.35/gst/gstbuffer.h	2011-08-22 13:04:36.000000000 +0200
@@ -218,6 +218,9 @@
  * @GST_BUFFER_FLAG_MEDIA2: a flag whose use is specific to the caps of the buffer. Since: 0.10.23.
  * @GST_BUFFER_FLAG_MEDIA3: a flag whose use is specific to the caps of the buffer. Since: 0.10.23.
  * @GST_BUFFER_FLAG_MEDIA4: a flag whose use is specific to the caps of the buffer. Since: 0.10.33.
+ * @GST_BUFFER_FLAG_INTERMED: when a frame is composed of several buffers
+ * (several NALU, for instance), this flag is set on all buffers except the last.
+ * This is exactly the opposite of the marker bit defined in video RTP.
  * @GST_BUFFER_FLAG_LAST: additional flags can be added starting from this flag.
  *
  * A set of buffer flags used to describe properties of a #GstBuffer.
@@ -233,7 +236,8 @@
   GST_BUFFER_FLAG_MEDIA1     = (GST_MINI_OBJECT_FLAG_LAST << 5),
   GST_BUFFER_FLAG_MEDIA2     = (GST_MINI_OBJECT_FLAG_LAST << 6),
   GST_BUFFER_FLAG_MEDIA3     = (GST_MINI_OBJECT_FLAG_LAST << 7),
-  GST_BUFFER_FLAG_LAST       = (GST_MINI_OBJECT_FLAG_LAST << 8)
+  GST_BUFFER_FLAG_INTERMED   = (GST_MINI_OBJECT_FLAG_LAST << 8),
+  GST_BUFFER_FLAG_LAST       = (GST_MINI_OBJECT_FLAG_LAST << 9)
 } GstBufferFlag;
 
 /**

> Hi,
> In order to minimize latency, I would like to decode rtp packets (H264 NALU) as soon as received (no buffering) and wait for the last NALU in the picture before generating the picture bitmap.
> RTP defines the marker bit allowing the decoder to know when the last NALU is there.
> In my understanding, gstrtph264depay is ignoring the rtp marker bit. The decoder receives a buffer for each NALU but has no info about which NALU is the last of a picture.
> I can wait the first NALU of the next picture before generating the output bitmap. At the sender side I can also generate a dummy SEI NALU juste to inform the decoder that the picture is finished but... What is the good way to do that ? Is there a way taking benefit of the rtp marker bit ?
> Maybe we should add a flag in the buffer telling "I'm the end of the picture".
> Any comment ?
> Thanks,
> Gabriele


More information about the gstreamer-devel mailing list