From 8599801cae088b536dd1d366682c08601d708109 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Mon, 8 Aug 2011 12:48:50 +0200 Subject: [PATCH] rtspsrc: switch to rtp time based syncing when guessed appropriate --- gst/rtsp/gstrtspsrc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 8ea7ebca9a..78dd882ae1 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -128,6 +128,13 @@ enum LAST_SIGNAL }; +enum _GstRtspSrcRtcpSyncMode +{ + RTCP_SYNC_ALWAYS, + RTCP_SYNC_INITIAL, + RTCP_SYNC_RTP +}; + enum _GstRtspSrcBufferMode { BUFFER_MODE_NONE, @@ -5981,6 +5988,19 @@ gst_rtspsrc_handle_rtcp_interval (GstRTSPSrc * src, gchar * rtcp) g_object_set (rtpsession, "rtcp-min-interval", interval, NULL); } } + + /* now it happens that (Xenon) server sending this may also provide bogus + * RTCP SR sync data (i.e. with quite some jitter), so never mind those + * and just use RTP-Info to sync */ + if (src->manager) { + GObjectClass *klass; + + klass = G_OBJECT_GET_CLASS (G_OBJECT (src->manager)); + if (g_object_class_find_property (klass, "rtcp-sync")) { + GST_DEBUG_OBJECT (src, "configuring rtp sync method"); + g_object_set (src->manager, "rtcp-sync", RTCP_SYNC_RTP, NULL); + } + } } static gdouble