gst-plugins-good: rtspsrc: switch to rtp time based syncing when guessed appropriate

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Mon Sep 19 03:03:17 PDT 2011


Module: gst-plugins-good
Branch: master
Commit: 8599801cae088b536dd1d366682c08601d708109
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=8599801cae088b536dd1d366682c08601d708109

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Mon Aug  8 12:48:50 2011 +0200

rtspsrc: switch to rtp time based syncing when guessed appropriate

---

 gst/rtsp/gstrtspsrc.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c
index 8ea7ebc..78dd882 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



More information about the gstreamer-commits mailing list