I'm using DirectShow library (DirectShowLib-2005.dll) with C# to capture a video camera image. When I'm definig the capture object's size, I have these parameters:
const int VIDEOWIDTH = 640; // Depends on video device caps
const int VIDEOHEIGHT = 480; // Depends on video device caps
const int VIDEOBITSPERPIXEL = 24; // BitsPerPixel values determined by device
capture = new Capture(0, VIDEOWIDTH, VIDEOHEIGHT, VIDEOBITSPERPIXEL, pictureBox1);
I'm using this loop for getting the names of devices. Can I somehow read every possible resolutions for each cam?
DsDevice[] capDevices;
capDevices = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);
if (capDevices.Length == 0)
{
//Could not found camera
}
else
{
for (var i = 0; i < capDevices.Length; i++)
{
myCamerName = capDevices[i].Name.ToString();
}
}