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 747829 - rtpsession: Forward stream-start events to send_rtcp srcpad
rtpsession: Forward stream-start events to send_rtcp srcpad
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-14 08:17 UTC by Carlos Rafael Giani
Modified: 2018-11-03 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to forward stream-start events to send_rtcp srcpad (1.80 KB, patch)
2015-04-14 08:17 UTC, Carlos Rafael Giani
reviewed Details | Review

Description Carlos Rafael Giani 2015-04-14 08:17:32 UTC
Created attachment 301514 [details] [review]
Patch to forward stream-start events to send_rtcp srcpad

Currently, if the send_rtp sinkpad receives a stream-start event, it is only forwarded to the send_rtp srcpad, not the send_rtcp one. Any sink linked to the send_rtcp srcpad will not ever receive stream-start events. But sinks need to receive these events so they can post stream-start messages, and in GStreamer, the pipeline will not dispatch stream-start messages until *all* sinks have posted this message. As a result, the application's bus watch / bus sync handler will never see stream-start events.

This patch corrects that by simply sending stream-start & caps & segment events to the send_rtcp srcpad when the stream-start event is received. With it, application bus watch/sync handler callbacks receive stream-start messages again.

I am not sure if this could be done in an easier way, probably by using sticky events. But the relevant events  are sticky on the send_rtp sinkpad, not on the send_rtcp srcpad.
Comment 1 Sebastian Dröge (slomo) 2015-04-14 08:29:58 UTC
Review of attachment 301514 [details] [review]:

::: gst/rtpmanager/gstrtpsession.c
@@ +1898,3 @@
+      gst_event_ref (event);
+      ret = gst_pad_push_event (rtpsession->send_rtp_src, event);
+      if (rtpsession->send_rtcp_src) {

Why do you check for NULL after using it in the line before?

Also why do you send caps and segment event here too, and not as part of the actual segment events that arrive later? Also what about other events, like EOS?
Comment 2 Carlos Rafael Giani 2015-04-14 09:44:50 UTC
Note that I push to send_rtp_src , but check if send_rtcp_src is NULL. Pay attention to the "c" ;)

I was actually wondering about these two points, yes. Is it safe to assume they will arrive later and I can just forward them? In fact, what events should _not_ be forwarded?
Comment 3 Sebastian Dröge (slomo) 2015-04-14 10:05:37 UTC
Well, you don't want to *forward* the CAPS event. It will be application/x-rtp, but should be application/x-rtcp :)

Also note do_rtcp_events(), maybe just that should be called for the pad before the first RTCP packet is sent?
Comment 4 Sebastian Dröge (slomo) 2015-04-14 10:05:56 UTC
... which we already do.
Comment 5 Carlos Rafael Giani 2015-04-14 11:23:53 UTC
Right, forwarding application/x-rtp would not really make sense :)

do_rtcp_events() is useful for the *first* RTCP packet, yes. But consider what happens if you use a concat element. You'll get additional stream-start events later on. do_rtcp_events() isn't suited for that.
Comment 6 Sebastian Dröge (slomo) 2015-06-07 18:21:34 UTC
What should we do about this one?
Comment 7 Carlos Rafael Giani 2015-06-16 19:29:06 UTC
So, all events except CAPS should be forwarded? Is this correct?
Comment 8 Sebastian Dröge (slomo) 2015-06-22 10:47:32 UTC
I guess so
Comment 9 Vivia Nikolaidou 2018-05-06 11:00:17 UTC
Carlos, are you still planning to work on this? (Maybe it's been fixed in the meantime?) If not, this bug can be closed.
Comment 10 GStreamer system administrator 2018-11-03 14:59:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/180.