Commit 9d40d609 authored by Wim Taymans's avatar Wim Taymans Committed by Wim Taymans
Browse files

rtpbin: remove use of ntp_ns_base

parent 5a4ecc9d
......@@ -210,9 +210,6 @@ struct _GstRtpBinPrivate
/* lock protecting dynamic adding/removing */
GMutex *dyn_lock;
/* the time when we went to playing */
GstClockTime ntp_ns_base;
/* if we are shutting down or not */
gint shutdown;
......@@ -536,8 +533,6 @@ create_session (GstRtpBin * rtpbin, gint id)
(GDestroyNotify) gst_caps_unref);
rtpbin->sessions = g_slist_prepend (rtpbin->sessions, sess);
/* set NTP base or new session */
g_object_set (session, "ntp-ns-base", rtpbin->priv->ntp_ns_base, NULL);
/* configure SDES items */
GST_OBJECT_LOCK (rtpbin);
g_object_set (session, "sdes", rtpbin->sdes, NULL);
......@@ -1928,30 +1923,6 @@ gst_rtp_bin_handle_message (GstBin * bin, GstMessage * message)
}
}
static void
calc_ntp_ns_base (GstRtpBin * bin)
{
GstClockTime now;
GTimeVal current;
GSList *walk;
/* get the current time and convert it to NTP time in nanoseconds */
g_get_current_time (&current);
now = GST_TIMEVAL_TO_TIME (current);
now += (2208988800LL * GST_SECOND);
GST_RTP_BIN_LOCK (bin);
bin->priv->ntp_ns_base = now;
for (walk = bin->sessions; walk; walk = g_slist_next (walk)) {
GstRtpBinSession *session = (GstRtpBinSession *) walk->data;
g_object_set (session->session, "ntp-ns-base", now, NULL);
}
GST_RTP_BIN_UNLOCK (bin);
return;
}
static GstStateChangeReturn
gst_rtp_bin_change_state (GstElement * element, GstStateChange transition)
{
......@@ -1969,9 +1940,6 @@ gst_rtp_bin_change_state (GstElement * element, GstStateChange transition)
GST_LOG_OBJECT (rtpbin, "clearing shutdown flag");
g_atomic_int_set (&priv->shutdown, 0);
break;
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
calc_ntp_ns_base (rtpbin);
break;
case GST_STATE_CHANGE_PAUSED_TO_READY:
GST_LOG_OBJECT (rtpbin, "setting shutdown flag");
g_atomic_int_set (&priv->shutdown, 1);
......
......@@ -530,7 +530,7 @@ gst_rtp_session_class_init (GstRtpSessionClass * klass)
g_object_class_install_property (gobject_class, PROP_NTP_NS_BASE,
g_param_spec_uint64 ("ntp-ns-base", "NTP base time",
"The NTP base time corresponding to running_time 0", 0,
"The NTP base time corresponding to running_time 0 (deprecated)", 0,
G_MAXUINT64, DEFAULT_NTP_NS_BASE, G_PARAM_READWRITE));
g_object_class_install_property (gobject_class, PROP_BANDWIDTH,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment