diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2012-12-17 03:44:12 -0200 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2012-12-17 03:44:12 -0200 |
commit | 190f6135b48a97dadd7586f154640bec6468df1b (patch) | |
tree | 2dd27242a22b7568319861ddcb05e6e158d1c734 /libavdevice/dshow_capture.h | |
parent | 2e59142fa9a0db5fab8aa2e676ba524f61280b83 (diff) | |
download | ffmpeg-190f6135b48a97dadd7586f154640bec6468df1b.tar.gz |
dshow: handle events in graph
Handling DirectShow events prevents infinite loops when there is an error in
the graph, such as a device being disconnected. This makes it possible for
dshow to return an error to the caller and run the cleanup code.
Based on patch by Don Moir <donmoir@comcast.net>.
Diffstat (limited to 'libavdevice/dshow_capture.h')
-rw-r--r-- | libavdevice/dshow_capture.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h index 2446c7cd5f..aff5019b30 100644 --- a/libavdevice/dshow_capture.h +++ b/libavdevice/dshow_capture.h @@ -32,6 +32,11 @@ #include <dshow.h> #include <dvdmedia.h> +/* EC_DEVICE_LOST is not defined in MinGW dshow headers. */ +#ifndef EC_DEVICE_LOST +#define EC_DEVICE_LOST 0x1f +#endif + long ff_copy_dshow_media_type(AM_MEDIA_TYPE *dst, const AM_MEDIA_TYPE *src); void ff_print_VIDEO_STREAM_CONFIG_CAPS(const VIDEO_STREAM_CONFIG_CAPS *caps); void ff_print_AUDIO_STREAM_CONFIG_CAPS(const AUDIO_STREAM_CONFIG_CAPS *caps); |