diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 01:06:43 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2010-09-09 01:06:47 +0200 |
commit | 92efe73791d0998536042bfab5a1babc67d168c7 (patch) | |
tree | 6c5f7e9d9a8e5b439f50821f498ae6f6df776f36 /im/src/im_capture_dx.cpp | |
parent | f23d91bd3ba87c8fe6691af9ebd1a5210e2fbaec (diff) |
Upgrading to IM 3.6.2, and doing some cleanup at the same time.
Diffstat (limited to 'im/src/im_capture_dx.cpp')
-rwxr-xr-x | im/src/im_capture_dx.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/im/src/im_capture_dx.cpp b/im/src/im_capture_dx.cpp index cb4749b..fcd6d98 100755 --- a/im/src/im_capture_dx.cpp +++ b/im/src/im_capture_dx.cpp @@ -2,7 +2,7 @@ * \brief Video Capture Using Direct Show 9 * * See Copyright Notice in im.h - * $Id: im_capture_dx.cpp,v 1.1 2008/10/17 06:10:16 scuri Exp $ + * $Id: im_capture_dx.cpp,v 1.2 2010/04/25 21:51:29 scuri Exp $ */ /* @@ -240,7 +240,7 @@ struct vcDevice static vcDevice vc_DeviceList[VC_MAXVIDDEVICES]; static int vc_DeviceCount = 0; -static void vc_AddDevice(IBaseFilter *filter, char* desc, char* ex_desc, char* path, char* vendorinfo) +static void vc_AddDevice(IBaseFilter *filter, const char* desc, const char* ex_desc, const char* path, const char* vendorinfo) { int i = vc_DeviceCount; vcDevice* device = &vc_DeviceList[i]; @@ -596,14 +596,19 @@ int imVideoCaptureDeviceCount(void) return vc_DeviceCount; } -int imVideoCaptureReloadDevices(void) +void imVideoCaptureReleaseDevices(void) { for (int i = 0; i < vc_DeviceCount; i++) { vc_DeviceList[i].filter->Release(); } - vc_DeviceCount = 0; +} + +int imVideoCaptureReloadDevices(void) +{ + imVideoCaptureReleaseDevices(); + vc_EnumerateDevices(); return vc_DeviceCount; } @@ -1291,7 +1296,7 @@ static void vc_GetFormatName(GUID subtype, char* desc) desc[0] = (char)(subtype.Data1); desc[1] = (char)(subtype.Data1 >> 8); desc[2] = (char)(subtype.Data1 >> 16); - desc[3] = (char)(subtype.Data1 >> 32); + desc[3] = (char)(subtype.Data1 >> 24); desc[4] = 0; } |