summaryrefslogtreecommitdiffstats
path: root/gst/rtpmanager/rtpsource.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtpmanager/rtpsource.c')
-rw-r--r--gst/rtpmanager/rtpsource.c15
1 files changed, 13 insertions, 2 deletions
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;
}