GNOME Bugzilla – Bug 747829
rtpsession: Forward stream-start events to send_rtcp srcpad
Last modified: 2018-11-03 14:59:50 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.
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?
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?
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?
... which we already do.
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.
What should we do about this one?
So, all events except CAPS should be forwarded? Is this correct?
I guess so
Carlos, are you still planning to work on this? (Maybe it's been fixed in the meantime?) If not, this bug can be closed.
-- 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.