+2008-07-03 Peter Kjellerstedt <pkj@axis.com>
+
+ * gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_process_rtp),
+ (gst_rtp_session_send_rtp), (gst_rtp_session_send_rtcp),
+ (gst_rtp_session_sync_rtcp), (gst_rtp_session_chain_recv_rtp),
+ (gst_rtp_session_chain_recv_rtcp), (gst_rtp_session_chain_send_rtp):
+ * gst/rtpmanager/rtpsession.c: (source_push_rtp),
+ (rtp_session_send_rtp):
+ * gst/rtpmanager/rtpsource.c: (push_packet), (calculate_jitter),
+ (rtp_source_process_rtp), (rtp_source_send_rtp):
+ Changed some GST_DEBUG() to GST_LOG() to reduce the spam when a
+ pipeline is running normally.
+
2008-07-03 Peter Kjellerstedt <pkj@axis.com>
* gst/rtpmanager/gstrtpsession.c: (gst_rtp_session_init),
priv = rtpsession->priv;
if (rtpsession->recv_rtp_src) {
- GST_DEBUG_OBJECT (rtpsession, "pushing received RTP packet");
+ GST_LOG_OBJECT (rtpsession, "pushing received RTP packet");
result = gst_pad_push (rtpsession->recv_rtp_src, buffer);
} else {
GST_DEBUG_OBJECT (rtpsession, "dropping received RTP packet");
rtpsession = GST_RTP_SESSION (user_data);
priv = rtpsession->priv;
- GST_DEBUG_OBJECT (rtpsession, "sending RTP packet");
+ GST_LOG_OBJECT (rtpsession, "sending RTP packet");
if (rtpsession->send_rtp_src) {
result = gst_pad_push (rtpsession->send_rtp_src, buffer);
gst_caps_unref (caps);
}
gst_buffer_set_caps (buffer, caps);
- GST_DEBUG_OBJECT (rtpsession, "sending RTCP");
+ GST_LOG_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_caps_unref (caps);
}
gst_buffer_set_caps (buffer, caps);
- GST_DEBUG_OBJECT (rtpsession, "sending Sync RTCP");
+ GST_LOG_OBJECT (rtpsession, "sending Sync RTCP");
result = gst_pad_push (rtpsession->sync_src, buffer);
} else {
GST_DEBUG_OBJECT (rtpsession, "not sending Sync RTCP, no output pad");
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
priv = rtpsession->priv;
- GST_DEBUG_OBJECT (rtpsession, "received RTP packet");
+ GST_LOG_OBJECT (rtpsession, "received RTP packet");
/* get NTP time when this packet was captured, this depends on the timestamp. */
timestamp = GST_BUFFER_TIMESTAMP (buffer);
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
priv = rtpsession->priv;
- GST_DEBUG_OBJECT (rtpsession, "received RTCP packet");
+ GST_LOG_OBJECT (rtpsession, "received RTCP packet");
current_time = gst_clock_get_time (priv->sysclock);
ret = rtp_session_process_rtcp (priv->session, buffer, current_time);
rtpsession = GST_RTP_SESSION (gst_pad_get_parent (pad));
priv = rtpsession->priv;
- GST_DEBUG_OBJECT (rtpsession, "received RTP packet");
+ GST_LOG_OBJECT (rtpsession, "received RTP packet");
/* get NTP time when this packet was captured, this depends on the timestamp. */
timestamp = GST_BUFFER_TIMESTAMP (buffer);
GstFlowReturn result = GST_FLOW_OK;
if (source == session->source) {
- GST_DEBUG ("source %08x pushed sender RTP packet", source->ssrc);
+ GST_LOG ("source %08x pushed sender RTP packet", source->ssrc);
RTP_SESSION_UNLOCK (session);
gst_buffer_unref (buffer);
} else {
- GST_DEBUG ("source %08x pushed receiver RTP packet", source->ssrc);
+ GST_LOG ("source %08x pushed receiver RTP packet", source->ssrc);
RTP_SESSION_UNLOCK (session);
if (session->callbacks.process_rtp)
if (!gst_rtp_buffer_validate (buffer))
goto invalid_packet;
- GST_DEBUG ("received RTP packet for sending");
+ GST_LOG ("received RTP packet for sending");
RTP_SESSION_LOCK (sess);
source = sess->source;
while (!g_queue_is_empty (src->packets)) {
GstBuffer *buffer = GST_BUFFER_CAST (g_queue_pop_head (src->packets));
- GST_DEBUG ("pushing queued packet");
+ GST_LOG ("pushing queued packet");
if (src->callbacks.push_rtp)
src->callbacks.push_rtp (src, buffer, src->user_data);
else
gst_buffer_unref (buffer);
}
- GST_DEBUG ("pushing new packet");
+ GST_LOG ("pushing new packet");
/* push packet */
if (src->callbacks.push_rtp)
ret = src->callbacks.push_rtp (src, buffer, src->user_data);
pt = gst_rtp_buffer_get_payload_type (buffer);
- GST_DEBUG ("SSRC %08x got payload %d", src->ssrc, pt);
+ GST_LOG ("SSRC %08x got payload %d", src->ssrc, pt);
/* get clockrate */
if ((clock_rate = get_clock_rate (src, pt)) == -1)
src->stats.prev_rtptime = src->stats.last_rtptime;
src->stats.last_rtptime = rtparrival;
- GST_DEBUG ("rtparrival %u, rtptime %u, clock-rate %d, diff %d, jitter: %f",
+ GST_LOG ("rtparrival %u, rtptime %u, clock-rate %d, diff %d, jitter: %f",
rtparrival, rtptime, clock_rate, diff, (src->stats.jitter) / 16.0);
return;
src->is_sender = TRUE;
src->validated = TRUE;
- GST_DEBUG ("seq %d, PC: %" G_GUINT64_FORMAT ", OC: %" G_GUINT64_FORMAT,
+ GST_LOG ("seq %d, PC: %" G_GUINT64_FORMAT ", OC: %" G_GUINT64_FORMAT,
seqnr, src->stats.packets_received, src->stats.octets_received);
/* calculate jitter for the stats */
ext_rtptime = src->last_rtptime;
ext_rtptime = gst_rtp_buffer_ext_timestamp (&ext_rtptime, rtptime);
- GST_DEBUG ("SSRC %08x, RTP %" G_GUINT64_FORMAT ", NTP %" GST_TIME_FORMAT,
+ GST_LOG ("SSRC %08x, RTP %" G_GUINT64_FORMAT ", NTP %" GST_TIME_FORMAT,
src->ssrc, ext_rtptime, GST_TIME_ARGS (ntpnstime));
if (ext_rtptime > src->last_rtptime) {
/* calc the diff so we can detect drift at the sender. This can also be used
* to guestimate the clock rate if the NTP time is locked to the RTP
* timestamps (as is the case when the capture device is providing the clock). */
- GST_DEBUG ("SSRC %08x, diff RTP %" G_GUINT64_FORMAT ", diff NTP %"
+ GST_LOG ("SSRC %08x, diff RTP %" G_GUINT64_FORMAT ", diff NTP %"
GST_TIME_FORMAT, src->ssrc, rtp_diff, GST_TIME_ARGS (ntp_diff));
}
src->ssrc);
gst_rtp_buffer_set_ssrc (buffer, src->ssrc);
}
- GST_DEBUG ("pushing RTP packet %" G_GUINT64_FORMAT,
- src->stats.packets_sent);
+ GST_LOG ("pushing RTP packet %" G_GUINT64_FORMAT, src->stats.packets_sent);
result = src->callbacks.push_rtp (src, buffer, src->user_data);
} else {
GST_WARNING ("no callback installed, dropping packet");