summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/gstrtpsession.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-09-17 02:01:41 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-09-17 02:01:41 +0000
commitc0aa28ca5bfc2eaf6b9cbba1159e9490c7c118c4 (patch)
tree6cbc87e37fd54f7e593a59656ea09358473c391f /gst/rtpmanager/gstrtpsession.c
parent04d3b8290698e41034809e8baec11622ca128243 (diff)
downloadgst-plugins-bad-c0aa28ca5bfc2eaf6b9cbba1159e9490c7c118c4.tar.gz
gst-plugins-bad-c0aa28ca5bfc2eaf6b9cbba1159e9490c7c118c4.tar.bz2
gst-plugins-bad-c0aa28ca5bfc2eaf6b9cbba1159e9490c7c118c4.zip
gst/rtpmanager/gstrtpbin.c: Link to the right pads regardless of which one was created first in the ssrc demuxer.
Original commit message from CVS: * gst/rtpmanager/gstrtpbin.c: (new_ssrc_pad_found): Link to the right pads regardless of which one was created first in the ssrc demuxer. * gst/rtpmanager/gstrtpjitterbuffer.c: (gst_rtp_jitter_buffer_chain), (gst_rtp_jitter_buffer_loop): * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp), (gst_rtp_session_chain_recv_rtp), (gst_rtp_session_chain_send_rtp): * gst/rtpmanager/rtpsource.c: (calculate_jitter): Improve debugging. * gst/rtpmanager/gstrtpssrcdemux.c: (create_demux_pad_for_ssrc), (gst_rtp_ssrc_demux_init), (gst_rtp_ssrc_demux_finalize), (gst_rtp_ssrc_demux_sink_event), (gst_rtp_ssrc_demux_rtcp_sink_event), (gst_rtp_ssrc_demux_chain), (gst_rtp_ssrc_demux_rtcp_chain), (gst_rtp_ssrc_demux_internal_links): * gst/rtpmanager/gstrtpssrcdemux.h: Fix race in creating the RTP and RTCP pads when a new SSRC is detected.
Diffstat (limited to 'gst/rtpmanager/gstrtpsession.c')
-rw-r--r--gst/rtpmanager/gstrtpsession.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/gst/rtpmanager/gstrtpsession.c b/gst/rtpmanager/gstrtpsession.c
index 6d4cf8b0..83210ff8 100644
--- a/gst/rtpmanager/gstrtpsession.c
+++ b/gst/rtpmanager/gstrtpsession.c
@@ -781,11 +781,11 @@ gst_rtp_session_process_rtp (RTPSession * sess, RTPSource * src,
rtpsession = GST_RTP_SESSION (user_data);
priv = rtpsession->priv;
- GST_DEBUG_OBJECT (rtpsession, "reading receiving RTP packet");
-
if (rtpsession->recv_rtp_src) {
+ GST_DEBUG_OBJECT (rtpsession, "pushing received RTP packet");
result = gst_pad_push (rtpsession->recv_rtp_src, buffer);
} else {
+ GST_DEBUG_OBJECT (rtpsession, "dropping received RTP packet");
gst_buffer_unref (buffer);
result = GST_FLOW_OK;
}
@@ -1114,10 +1114,22 @@ gst_rtp_session_chain_recv_rtp (GstPad * pad, GstBuffer * buffer)
}
ret = rtp_session_process_rtp (priv->session, buffer, ntpnstime);
+ if (ret != GST_FLOW_OK)
+ goto push_error;
+
+done:
gst_object_unref (rtpsession);
return ret;
+
+ /* ERRORS */
+push_error:
+ {
+ GST_DEBUG_OBJECT (rtpsession, "process returned %s",
+ gst_flow_get_name (ret));
+ goto done;
+ }
}
static GstFlowReturn
@@ -1286,10 +1298,21 @@ gst_rtp_session_chain_send_rtp (GstPad * pad, GstBuffer * buffer)
}
ret = rtp_session_send_rtp (priv->session, buffer, ntpnstime);
+ if (ret != GST_FLOW_OK)
+ goto push_error;
+done:
gst_object_unref (rtpsession);
return ret;
+
+ /* ERRORS */
+push_error:
+ {
+ GST_DEBUG_OBJECT (rtpsession, "process returned %s",
+ gst_flow_get_name (ret));
+ goto done;
+ }
}
/* Create sinkpad to receive RTP packets from senders. This will also create a