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 712396 - gst-rtsp-server: get payload type from stream
gst-rtsp-server: get payload type from stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.2.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-11-15 20:13 UTC by Aleix Conchillo Flaqué
Modified: 2014-02-25 22:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
get stream payload type (3.56 KB, patch)
2013-11-15 20:18 UTC, Aleix Conchillo Flaqué
none Details | Review
find payloader when creating stream and add get payload type function (3.77 KB, patch)
2013-11-15 21:05 UTC, Aleix Conchillo Flaqué
none Details | Review

Description Aleix Conchillo Flaqué 2013-11-15 20:13:24 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.
Comment 1 Aleix Conchillo Flaqué 2013-11-15 20:18:37 UTC
Created attachment 259946 [details] [review]
get stream payload type
Comment 2 Aleix Conchillo Flaqué 2013-11-15 21:05:55 UTC
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.
Comment 3 Wim Taymans 2013-11-22 10:20:10 UTC
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
Comment 4 Aleix Conchillo Flaqué 2013-11-22 15:48:24 UTC
Just to understand better GStreamer internals: why is it better to use the element metadata than checking for the rtp base payload class?
Comment 5 Wim Taymans 2013-11-22 16:03:27 UTC
You can write a payloader that does not derive from the base class you test.
Comment 6 Aleix Conchillo Flaqué 2013-11-22 16:13:46 UTC
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