summaryrefslogtreecommitdiff
path: root/src/im_capture_dx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/im_capture_dx.cpp')
-rw-r--r--src/im_capture_dx.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/im_capture_dx.cpp b/src/im_capture_dx.cpp
index cb4749b..fcd6d98 100644
--- a/src/im_capture_dx.cpp
+++ b/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;
}