[FFmpeg-cvslog] dshow: show more debug timestamp info

rogerdpack git at videolan.org
Fri Jul 31 18:31:52 CEST 2015


ffmpeg | branch: master | rogerdpack <rogerpack2005 at gmail.com> | Thu Jul 30 15:55:19 2015 -0600| [bed1d9ec7a259454365b2db1f5880209b17c4174] | committer: Michael Niedermayer

dshow: show more debug timestamp info

Signed-off-by: rogerdpack <rogerpack2005 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bed1d9ec7a259454365b2db1f5880209b17c4174
---

 libavdevice/dshow_pin.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c
index 4f719a6..664246d 100644
--- a/libavdevice/dshow_pin.c
+++ b/libavdevice/dshow_pin.c
@@ -303,14 +303,18 @@ libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
     libAVPin *pin = (libAVPin *) ((uint8_t *) this - imemoffset);
     enum dshowDeviceType devtype = pin->filter->type;
     void *priv_data;
+    AVFormatContext *s;
     uint8_t *buf;
     int buf_size; /* todo should be a long? */
     int index;
     int64_t curtime;
     int64_t orig_curtime;
+    int64_t graphtime;
     const char *devtypename = (devtype == VideoDevice) ? "video" : "audio";
     IReferenceClock *clock = pin->filter->clock;
     int64_t dummy;
+    struct dshow_ctx *ctx;
+
 
     dshowdebug("libAVMemInputPin_Receive(%p)\n", this);
 
@@ -319,6 +323,7 @@ libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
 
     IMediaSample_GetTime(sample, &orig_curtime, &dummy);
     orig_curtime += pin->filter->start_time;
+    IReferenceClock_GetTime(clock, &graphtime);
     if (devtype == VideoDevice) {
         /* PTS from video devices is unreliable. */
         IReferenceClock_GetTime(clock, &curtime);
@@ -338,10 +343,13 @@ libAVMemInputPin_Receive(libAVMemInputPin *this, IMediaSample *sample)
     buf_size = IMediaSample_GetActualDataLength(sample);
     IMediaSample_GetPointer(sample, &buf);
     priv_data = pin->filter->priv_data;
+    s = priv_data;
+    ctx = s->priv_data;
     index = pin->filter->stream_index;
 
-    av_log(NULL, AV_LOG_VERBOSE, "dshow passing through packet of type %s size %6d timestamp %"PRId64" orig timestamp %"PRId64"\n",
-           devtypename, buf_size, curtime, orig_curtime);
+    av_log(NULL, AV_LOG_VERBOSE, "dshow passing through packet of type %s size %8d "
+        "timestamp %"PRId64" orig timestamp %"PRId64" graph timestamp %"PRId64" diff %"PRId64" %s\n",
+        devtypename, buf_size, curtime, orig_curtime, graphtime, graphtime - orig_curtime, ctx->device_name[devtype]);
     pin->filter->callback(priv_data, index, buf, buf_size, curtime, devtype);
 
     return S_OK;



More information about the ffmpeg-cvslog mailing list