From 67c69ca0eafde9fc6312cc7aa8c0d560d5f6c53f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 25 Apr 2007 13:19:36 +0000 Subject: gst/rtpmanager/gstrtpjitterbuffer.c: Report NO_PREROLL when going to PAUSED. Original commit message from CVS: * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_change_state): Report NO_PREROLL when going to PAUSED. * gst/rtpmanager/gstrtpsession.c: (rtcp_thread): Don't send RTCP right before we are shutting down. * gst/rtpmanager/rtpsession.c: (rtp_session_process_rtp), (rtp_session_process_sr), (session_report_blocks), (rtp_session_perform_reporting): Improve report blocks. * gst/rtpmanager/rtpsource.c: (calculate_jitter), (init_seq), (rtp_source_process_rtp), (rtp_source_process_sr), (rtp_source_process_rb), (rtp_source_get_last_sr), (rtp_source_get_last_rb): * gst/rtpmanager/rtpsource.h: * gst/rtpmanager/rtpstats.h: Cleanups, add methods to access stats. --- gst/rtpmanager/gstrtpsession.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gst/rtpmanager/gstrtpsession.c') diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index b11dbbba..39c63e32 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -304,21 +304,27 @@ rtcp_thread (GstRTPSession * rtpsession) while (!rtpsession->priv->stop_thread) { gdouble timeout; GstClockTime target; + GstClockReturn res; timeout = rtp_session_get_reporting_interval (rtpsession->priv->session); GST_DEBUG_OBJECT (rtpsession, "next RTCP timeout: %lf", timeout); target = gst_clock_get_time (clock); target += GST_SECOND * timeout; + + id = rtpsession->priv->id = gst_clock_new_single_shot_id (clock, target); GST_RTP_SESSION_UNLOCK (rtpsession); - gst_clock_id_wait (id, NULL); - - GST_DEBUG_OBJECT (rtpsession, "got RTCP timeout"); + res = gst_clock_id_wait (id, NULL); + if (res != GST_CLOCK_UNSCHEDULED) { + GST_DEBUG_OBJECT (rtpsession, "got RTCP timeout"); - /* make the session manager produce RTCP, we ignore the result. */ - rtp_session_perform_reporting (rtpsession->priv->session); + /* make the session manager produce RTCP, we ignore the result. */ + rtp_session_perform_reporting (rtpsession->priv->session); + } else { + GST_DEBUG_OBJECT (rtpsession, "got unscheduled"); + } GST_RTP_SESSION_LOCK (rtpsession); gst_clock_id_unref (id); -- cgit v1.2.1