diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-03-16 19:17:24 +0100 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-03-16 19:17:24 +0100 |
commit | 8cf0e9ff87bb8fbc5200caee5154d64501a33191 (patch) | |
tree | dd01e81fecba217f8755f835136537c0e1f3e299 | |
parent | 1d16c9cc272ce5d31639810ac69015d5b316d0ab (diff) |
rtspsrc: add some debug for the timestamps
When timestamping in TCP mode, log the first timestamp we put on the buffers.
-rw-r--r-- | gst/rtsp/gstrtspsrc.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index 57d4e3a0..6226457f 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -2797,9 +2797,16 @@ gst_rtspsrc_loop_interleaved (GstRTSPSrc * src) * using the RTP timestamps. */ GST_OBJECT_LOCK (src); if (GST_ELEMENT_CLOCK (src)) { - GstClockTime now = gst_clock_get_time (GST_ELEMENT_CLOCK (src)); + GstClockTime now; + GstClockTime base_time; - src->base_time = now - GST_ELEMENT_CAST (src)->base_time; + now = gst_clock_get_time (GST_ELEMENT_CLOCK (src)); + base_time = GST_ELEMENT_CAST (src)->base_time; + + src->base_time = now - base_time; + + GST_DEBUG_OBJECT (src, "first buffer at time %" GST_TIME_FORMAT ", base %" + GST_TIME_FORMAT, GST_TIME_ARGS (now), GST_TIME_ARGS (base_time)); } GST_OBJECT_UNLOCK (src); } @@ -2810,6 +2817,9 @@ gst_rtspsrc_loop_interleaved (GstRTSPSrc * src) stream->discont = FALSE; /* first buffer gets the timestamp, other buffers are not timestamped and * their presentation time will be interpollated from the rtp timestamps. */ + GST_DEBUG_OBJECT (src, "setting timestamp %" GST_TIME_FORMAT, + GST_TIME_ARGS (src->base_time)); + GST_BUFFER_TIMESTAMP (buf) = src->base_time; } |