summaryrefslogtreecommitdiff
path: root/libavdevice/dshow_capture.h
diff options
context:
space:
mode:
authorDiederick Niehorster <dcnieho@gmail.com>2021-12-21 14:53:27 +0100
committerGyan Doshi <ffmpeg@gyani.pro>2021-12-24 14:06:06 +0530
commit7dc33aad45772ca3c0a3092833cf8447d1607663 (patch)
tree2d90d4a5c0fe2c6a284dd57f9bc1fcd4d4714ae0 /libavdevice/dshow_capture.h
parent7b21841ce45ef4ab486c3c94a714345b878a70fd (diff)
downloadffmpeg-7dc33aad45772ca3c0a3092833cf8447d1607663.tar.gz
avdevice/dshow: implement option to use device video timestamps
The dshow avdevice ignores timestamps for video frames provided by the DirectShow device, instead using wallclock time, apparently because the implementer of this code had a device that provided unreliable timestamps. Me (and others) would like to use the device's timestamps. The new use_video_device_timestamps option for dshow device enables them to do so. Since the majority of video devices out there probably provide fine timestamps, this patch sets the default to using the device timestamps, which means best fidelity timestamps are used by default. Using the new option, the user can switch this off and revert to the old behavior, so a fall back remains available in case the device provides broken timestamps. add use_video_device_timestamps to docs. Closes: #8620 Signed-off-by: Diederick Niehorster <dcnieho@gmail.com> Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
Diffstat (limited to 'libavdevice/dshow_capture.h')
-rw-r--r--libavdevice/dshow_capture.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h
index 06ded2ba96..5a2691518c 100644
--- a/libavdevice/dshow_capture.h
+++ b/libavdevice/dshow_capture.h
@@ -312,6 +312,7 @@ struct dshow_ctx {
char *audio_filter_save_file;
char *video_filter_load_file;
char *video_filter_save_file;
+ int use_video_device_timestamps;
IBaseFilter *device_filter[2];
IPin *device_pin[2];