GNOME Bugzilla – Bug 712396
gst-rtsp-server: get payload type from stream
Last modified: 2014-02-25 22:28:31 UTC
When creating dynamic payloaders it's hard to map a stream with a given payload type. With dynamic payloaders (dynpay%d) we can have multiple streams each with a different payload. From a GstRTSPStream it is not currently possible to map that stream to a specific pt. With static payloaders (pay%d) it is also not possible to obtain the pt, but it could be easily obtained with the stream index.
Created attachment 259946 [details] [review] get stream payload type
Created attachment 259948 [details] [review] find payloader when creating stream and add get payload type function The gst_rtsp_stream_new expects the real GstRTPBasePayload element. For dynamic payloaders the dynpay%d object was passed instead. Functions like gst_rtsp_stream_get_mtu do not work because they try to get the property from a GstRTPBasePayload element. Marking old patch as invalid.
commit 7b5763179a161475d176d25b39e9a51fd1eecc19 Author: Wim Taymans <wtaymans@redhat.com> Date: Fri Nov 22 11:16:20 2013 +0100 rtsp-media: use element metadata to find payloader Use the element metadata to find the payloader instead of checking for the base class. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=712396 commit e5332535a738d90f234710b822cfe9a8bbbb23cf Author: Aleix Conchillo Flaque <aleix@oblong.com> Date: Fri Nov 15 12:14:32 2013 -0800 rtsp-stream: add getter for payload type * gst/rtsp-server/rtsp-stream.c: add new method gst_rtsp_stream_get_pt. * gst/rtsp-server/rtsp-media.c (pad_added_cb): find real payloader element and create the stream with this one instead of the dynpay%d element. https://bugzilla.gnome.org/show_bug.cgi?id=712396
Just to understand better GStreamer internals: why is it better to use the element metadata than checking for the rtp base payload class?
You can write a payloader that does not derive from the base class you test.
That makes sense. First time I see it's use. Thanks! Just for future reference: http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/draft-klass.txt