我的机子上有一块电视卡(wdm驱动),一个普通USB的摄头(vfw驱动)
为了在程序中枚举所有视频设备,我用如下语句:
char szDeviceName[80];
char szDeviceVersion[80];
for (int wIndex = 0; wIndex < 10; wIndex++) 
{
   if (capGetDriverDescription (wIndex, szDeviceName, sizeof (szDeviceName), szDeviceVersion, sizeof (szDeviceVersion)) )
   {
// Append name to list of installed capture drivers
// and then let the user select a driver to use.
cout << szDeviceName <<":" <<szDeviceVersion <<"\n";
   }
} 但是只有一条输出[output]:
Microsoft WDM Image Capture (Win32):Version:  5.1.2600.2180   电视卡
而usb摄像头自带的程序AMCAP却能识别出它们两个:
1:TV capture card WDM video capture
2:VIMICRO USB PC Camera

解决方案 »

  1.   

    那里看看AMCAP是怎样做的不就的了,靠
      

  2.   

    AMCAP用的是DirectShow的SystemDeviceEnum
      

  3.   

    是的,ds里的那个 AMCAP 是可以枚举到电视卡和摄像头;
    但是,是不是不用ds就不行呢?
      

  4.   

    我把电视卡从主板上卸下来,但capGetDriverDescription 仍可以枚举到这个WDM的驱动!!!
    怎么样将这个电视卡的驱动和Filter也卸下来?
      

  5.   

    capGetDriverDescription是不能枚举WDM的。应该使用DirectShow的SystemDeviceEnum。怎么样将这个电视卡的驱动和Filter也卸下来?
    设备管理器中卸载。
      

  6.   

    看MSDN,capGetDriverDescription的意思好像是在注册表的system.ini中查找的。
    你看看你的注册表中有什么