Custom RTP Header Extension

Sebastian Dröge sebastian at centricular.com
Thu Sep 29 10:00:58 UTC 2022


On Thu, 2022-09-29 at 08:25 +0000, Kristian.Alfheim--- via gstreamer-
devel wrote:
>  
> In the 1.20 release the way RTP header extensions are handled was
> changed, adding the “GstRTPHeaderExtension” base class among other
> things, but I’ve been unable to find any documentation that explains
> exactly how to leverage this to write custom RTP headers in C++.
>  
> It's clear to me that I can use the “add-extension” signal to append
> the header once it’s created, but how would I go about creating it?
> The closest example code I could find was from the common extension
> implementations (e.g. gstrtphdrext-clientaudiolevel.c), but I’ve been
> unable to make an equivalent approach in C++. My aim is to create a
> simple header that contains an ID string – what is considered best
> practice to do so?

Take a look at the audio level header extension for a simple example:
  https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/gst/rtpmanager/gstrtphdrext-clientaudiolevel.h
  https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/gst/rtpmanager/gstrtphdrext-clientaudiolevel.c

There are some other examples in that plugin too.


For doing that in C++ you still need to write a C GObject like the
above. As alternative to C you could use Rust with gstreamer-rs though.

-- 
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220929/48fb6e24/attachment.htm>


More information about the gstreamer-devel mailing list