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 750800 - rtsp-media: always use real payloader when creating streams
rtsp-media: always use real payloader when creating streams
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal normal
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-11 15:41 UTC by Ognyan Tonchev (redstar_)
Modified: 2015-06-16 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtsp-media: always use real payloader when creating streams (4.44 KB, patch)
2015-06-11 15:41 UTC, Ognyan Tonchev (redstar_)
none Details | Review
rtsp-media: always use real payloader when creating streams (1.71 KB, patch)
2015-06-15 10:32 UTC, Ognyan Tonchev (redstar_)
committed Details | Review

Description Ognyan Tonchev (redstar_) 2015-06-11 15:41:15 UTC
Created attachment 305079 [details] [review]
rtsp-media: always use real payloader when creating streams

commit ef756ab39fe32f15644cd98500046111f1dd1396
Author: Ognyan Tonchev <ognyan@axis.com>
Date:   Thu Jun 11 17:39:00 2015 +0200

    rtsp-media: always use real payloader when creating streams
Comment 1 Tim-Philipp Müller 2015-06-14 21:58:31 UTC
Comment on attachment 305079 [details] [review]
rtsp-media: always use real payloader when creating streams

In the interest of keeping the patch to a minimum, please leave the find_payload_element() function where it is now and simply add a declaration to the top of the file.

Also, it would be great if you could provide some context for this change, like what does it fix exactly?
Comment 2 Ognyan Tonchev (redstar_) 2015-06-15 10:30:49 UTC
I should probably describe the use case first, I am adding the onviftimestamp element (https://bugzilla.gnome.org/show_bug.cgi?id=731769) to the pipeline after the payloader. So the payloader and the onviftimestamp are inside an inner GstBin called "pay%d".
What happens than is that GstRTSPMedia will crate the stream with the GstBin instead of using the real payloader. Which will then be a problem when GstRTSPStream tries to use the payloader, e.g. from gst_rtsp_stream_set_mtu(). 
AFAIAA the only limitation of using an inner GstBin which contains the actual payloader is this.
Comment 3 Ognyan Tonchev (redstar_) 2015-06-15 10:32:26 UTC
Created attachment 305277 [details] [review]
rtsp-media: always use real payloader when creating streams
Comment 4 Sebastian Dröge (slomo) 2015-06-15 10:38:16 UTC
Definitely a good idea! I'm going to need this very soon too
Comment 5 Sebastian Dröge (slomo) 2015-06-15 10:38:51 UTC
Review of attachment 305277 [details] [review]:

::: gst/rtsp-server/rtsp-media.c
@@ +1457,3 @@
+      if (pay == NULL) {
+        GST_WARNING ("could not find real payloader, using bin");
+        gst_rtsp_media_create_stream (media, elem, pad);

Why is this a warning? Should only be one if GST_IS_BIN(elem), right? Otherwise we just have the plain payloader as elem?
Comment 6 Tim-Philipp Müller 2015-06-15 17:26:41 UTC
> I should probably describe the use case first, (snip)

Thanks, could you also put some sort of explanation into the commit message please :)
Comment 7 Ognyan Tonchev (redstar_) 2015-06-16 08:42:29 UTC
(In reply to Sebastian Dröge (slomo) from comment #5)
> Review of attachment 305277 [details] [review] [review]:
> 
> ::: gst/rtsp-server/rtsp-media.c
> @@ +1457,3 @@
> +      if (pay == NULL) {
> +        GST_WARNING ("could not find real payloader, using bin");
> +        gst_rtsp_media_create_stream (media, elem, pad);
> 
> Why is this a warning? Should only be one if GST_IS_BIN(elem), right?
> Otherwise we just have the plain payloader as elem?

find_payload_element() can only return NULL when elem is a GstBin and there is no element which inherits from GstBaseRTPPayload in it.
May be there should be a g_assert instead before the warning: g_assert (GST_IS_BIN (elem))?
Comment 8 Sebastian Dröge (slomo) 2015-06-16 09:09:30 UTC
Comment on attachment 305277 [details] [review]
rtsp-media: always use real payloader when creating streams

Ah no, that's ok then
Comment 9 Sebastian Dröge (slomo) 2015-06-16 09:12:14 UTC
commit fb71b9c4e9bb66784491df81537d4865b99480f1
Author: Ognyan Tonchev <ognyan@axis.com>
Date:   Thu Jun 11 17:39:00 2015 +0200

    rtsp-media: Always use real payloader when creating streams
    
    A bin that contains the real payloader might be used as payloader. In this
    case we have to get the real payloader for the various properties it provides.
    
    Example use cases for this are bins that payload some media and then have
    additional elements that add metadata or RTP extension headers to the stream.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750800