GNOME Bugzilla – Bug 703560
[PATCH] rtpbin: new event for informing downstream about synchronization
Last modified: 2013-07-23 04:35:41 UTC
Created attachment 248333 [details] [review] patch which adds the custom downstream sync event Currently, rtpbin sends out RTP packets on a best-effort basis until it receives an RTCP SR packet. Once that happens, the bin is able to synchronize the packet timestamps. For downstream elements and applications, it is sometimes desirable to know when the SR packet was received (and therefore when rtpbin started to output with synchronization). To accomplish this, this patch adds an option to rtpbin that enables a new custom in-band downstream event, called "GstRTCPSRReceived". This event is sent when the rtpbin receives an RTCP packet. (In-band, because out-of-band could result in the event arriving downstream before the synchronized buffers do.) One example use case is when an application wishes to drop buffers until the rtpbin is synchronized. With this patch, the application can hook a probe to an RTP depayloader's src pad, and drop buffers until it sees the GstRTCPSRReceived event. Once this is done, the buffer switches from dropping to passing all buffers. This is also useful to avoid synchronization problems with an audiosink's internal counters and timestamps.
commit 95429f1d4ba2b2dd922d4edf606009960d34f722 Author: Carlos Rafael Giani <dv@pseudoterminal.org> Date: Wed Jul 3 18:41:42 2013 +0200 rtpbin: added custom downstream sync event rtpbin can now send a custom in-band downstream event which informs downstream that the bin has received an RTCP SR packet. This is useful for applications which want to drop the initial unsynchronized received RTP packets. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=703560 Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>