From 5171199836b057eef7d98542268c5918fdaa47cd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 30 Apr 2007 13:41:30 +0000 Subject: gst/rtpmanager/async_jitter_queue.c: Fix the case where the buffer underruns and does not block. Original commit message from CVS: * gst/rtpmanager/async_jitter_queue.c: (signal_waiting_threads), (async_jitter_queue_pop_intern_unlocked): Fix the case where the buffer underruns and does not block. * gst/rtpmanager/gstrtpbin.c: (gst_rtp_bin_base_init), (create_recv_rtcp), (create_send_rtp), (create_rtcp), (gst_rtp_bin_request_new_pad): Rename RTCP send pad, like in the session manager. Allow getting an RTCP pad for receiving even if we don't receive RTP. fix handling of send_rtp_src pad. * gst/rtpmanager/gstrtpptdemux.c: (gst_rtp_pt_demux_chain): When no pt map could be found, fall back to the sinkpad caps. * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp), (gst_rtp_session_send_rtp), (create_recv_rtp_sink), (create_recv_rtcp_sink), (create_send_rtp_sink), (create_send_rtcp_src): Fix pad names. * gst/rtpmanager/rtpsession.c: (source_push_rtp), (rtp_session_create_source), (rtp_session_process_sr), (rtp_session_send_rtp), (session_start_rtcp): * gst/rtpmanager/rtpsession.h: Unlock session when performing a callback. Add callbacks for the internal session object. Fix sending of RTP packets. first attempt at adding NTP times in the SR packets. Small debug and doc improvements. * gst/rtpmanager/rtpsource.c: (rtp_source_send_rtp): Update stats for SR reports. --- gst/rtpmanager/rtpsource.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gst/rtpmanager/rtpsource.c') diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index e1e6aaca..7af74671 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -453,18 +453,29 @@ GstFlowReturn rtp_source_send_rtp (RTPSource * src, GstBuffer * buffer) { GstFlowReturn result = GST_FLOW_OK; + guint len; g_return_val_if_fail (RTP_IS_SOURCE (src), GST_FLOW_ERROR); g_return_val_if_fail (GST_IS_BUFFER (buffer), GST_FLOW_ERROR); + len = gst_rtp_buffer_get_payload_len (buffer); + /* we are a sender now */ src->is_sender = TRUE; + /* update stats for the SR */ + src->stats.packets_sent++; + src->stats.octets_sent += len; + + /* push packet */ - if (src->callbacks.push_rtp) + if (src->callbacks.push_rtp) { + GST_DEBUG ("pushing RTP packet %u", src->stats.packets_sent); result = src->callbacks.push_rtp (src, buffer, src->user_data); - else + } else { + GST_DEBUG ("no callback installed"); gst_buffer_unref (buffer); + } return result; } -- cgit v1.2.1