Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavdevice/dshow_pin.c')
-rw-r--r--libavdevice/dshow_pin.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libavdevice/dshow_pin.c b/libavdevice/dshow_pin.c
index 4f719a660e..664246da92 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;