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
committerWim Taymans <wim.taymans@gmail.com>2007-08-28 20:30:16 +0000
commitc0a64d008a0b8cc4416039935e4fbc4a7da3931d (patch)
treec4ec574dee72de29f5c2b34560301853d0e92692 /gst/rtpmanager/gstrtpsession.c
parent3db14a2b604d8161b2794c49d100e79393a149c0 (diff)
downloadgst-plugins-bad-c0a64d008a0b8cc4416039935e4fbc4a7da3931d.tar.gz
gst-plugins-bad-c0a64d008a0b8cc4416039935e4fbc4a7da3931d.tar.bz2
gst-plugins-bad-c0a64d008a0b8cc4416039935e4fbc4a7da3931d.zip
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;
}