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>.
This commit is contained in:
Ramiro Polla
2012-12-17 03:44:12 -02:00
parent 2e59142fa9
commit 190f6135b4
2 changed files with 70 additions and 11 deletions

View File

@@ -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);