I am using DShowNET in a C# project and I have been trying multiple cards. The Card I am trying to access is a GV-800_4A, which is a a capture card normally used by GeoVision CCTV software.
The problem is it is recognized in the device manager as a 'DVR Device' with a different guid than the normal video input devices I have been using and I do NOT know the DShowNET guid, but believe it may relate to this guid.
My question is 'How do I convert the 'Device class guid' seen in devices properties the windows device manager to the Guid used in DirectShow? or are these even equatable?'
GUIDs in device manager
- GeoVision GV-800A {4d36e96c-e325-11ce-bfc1-0123456789ab}
- AVerMedia {4d36e96c-e325-11ce-bfc1-08002be10318}
- Dazzle USB {4d36e96c-e325-11ce-bfc1-08002be10318}
GUID in DShowLib
- VideoInputDevice (0x860BB310, 0x5D01, 0x11d0, 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86)
EDIT
Basically the end goal is to be able to connect this as a capture filter to a graph to save FilterCatergory.VideoInputDevice, but now this device (GeoVision) does NOT appear on the list of available capture devices, but it IS a capture device just the drivers recognize it as a 'DVR Device'
I use the CLSID by passing it into the DShowNET function for returning an ArrayList of available devices of that type :
DsDev.GetDevicesOfCat(FilterCategory.VideoInput开发者_运维百科Device, out m_capDevices)
I need to know the CLSID_[** DVR Device **] or where to get that. I thought it could be derived from the 'Device class guid', but I am getting told this is not possible.
You could use something like this:
const string CAPTURE = "•GeoVision GV-800A";
s_CaptureDevices = BuildDeviceList(FilterCategory.AMKSCapture, CAPTURE);
private static List<DsDevice> BuildDeviceList(Guid category, string name)
{
var list = new List<DsDevice>();
DsDevice[] devices = DsDevice.GetDevicesOfCat(category);
for (int i = 0; i < devices.Length; i++)
{
if (!string.IsNullOrEmpty(devices[i].Name) && devices[i].Name.Equals(name))
{
list.Add(devices[i]);
}
}
return list;
}
Another option would be use GraphEditPlus and add the capture filter to a graph. You can then find out the GUID to create the filter object directly using code like this:
var captureFilter = (IBaseFilter) Activator.CreateInstance(Type.GetTypeFromCLSID(new DsGuid("...guid...")));
精彩评论