summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpsession.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-08-28 20:30:16 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:29 +0100
commiteb86865a62b01688fcfdbcb2c0d374e36d37ec3f (patch)
tree7771f708a597cbdd644ad83dc1c8871beb159e97 /gst/rtpmanager/gstrtpsession.c
parent6835b966ec20faaea3a81d6486f8378c884fa5c4 (diff)
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.
Diffstat (limited to 'gst/rtpmanager/gstrtpsession.c')
-rw-r--r--gst/rtpmanager/gstrtpsession.c9
1 files changed, 6 insertions, 3 deletions
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;
}