From c0a64d008a0b8cc4416039935e4fbc4a7da3931d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 28 Aug 2007 20:30:16 +0000 Subject: gst/rtpmanager/gstrtpbin.c: Add some more advanced example pipelines. Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_clear_pt_map): Add some more advanced example pipelines. * gst/rtpmanager/gstrtpsession.c: (rtcp_thread), (stop_rtcp_thread), (gst_rtp_session_send_rtcp): Add some debug and FIXME. Release LOCK when performing session cleanup. * gst/rtpmanager/rtpsession.c: (session_report_blocks): Add some debug. * gst/rtpmanager/rtpsource.c: (calculate_jitter), (rtp_source_send_rtp): Make sure we always send RTP packets with the session SSRC. --- gst/rtpmanager/gstrtpsession.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gst/rtpmanager/gstrtpsession.c') diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c index 1b630243..7f5782be 100644 --- a/gst/rtpmanager/gstrtpsession.c +++ b/gst/rtpmanager/gstrtpsession.c @@ -583,8 +583,10 @@ rtcp_thread (GstRtpSession * rtpsession) GST_DEBUG_OBJECT (rtpsession, "unlocked %d, current %" GST_TIME_FORMAT, res, GST_TIME_ARGS (current_time)); - /* perform actions, we ignore result. */ + /* perform actions, we ignore result. Release lock because it might push. */ + GST_RTP_SESSION_UNLOCK (rtpsession); rtp_session_on_timeout (rtpsession->priv->session, current_time); + GST_RTP_SESSION_LOCK (rtpsession); } GST_RTP_SESSION_UNLOCK (rtpsession); @@ -637,6 +639,7 @@ stop_rtcp_thread (GstRtpSession * rtpsession) gst_clock_id_unschedule (rtpsession->priv->id); GST_RTP_SESSION_UNLOCK (rtpsession); + /* FIXME, can deadlock because the thread might be blocked in a push */ g_thread_join (rtpsession->priv->thread); } @@ -753,11 +756,11 @@ gst_rtp_session_send_rtcp (RTPSession * sess, RTPSource * src, rtpsession = GST_RTP_SESSION (user_data); priv = rtpsession->priv; - GST_DEBUG_OBJECT (rtpsession, "sending RTCP"); - if (rtpsession->send_rtcp_src) { + GST_DEBUG_OBJECT (rtpsession, "sending RTCP"); result = gst_pad_push (rtpsession->send_rtcp_src, buffer); } else { + GST_DEBUG_OBJECT (rtpsession, "not sending RTCP, no output pad"); gst_buffer_unref (buffer); result = GST_FLOW_OK; } -- cgit v1.2.1