Getting capabilities from device

Jan 29, 2012 at 6:08 AM
Edited Jan 29, 2012 at 9:02 AM

Hi, thanks for great kit and useful information on this discussions.

Please excuse me for any inappropriate expressions, as my English writing ability is very poor.

My goal is:

  • Providing "snapshot" function to client with webcams.
  • Client can change snapshot size(resolution).

My problem is:

  1. I can't find a way to get resolution capabilities of capture device.
  2. When I specify "EnableSampleGrabbing=true" on VideoCaptureElement and save image on NewVideoSample event, resolution always set 640*480 although I specify DesiredPixelWidth(Height) that supported by device(At this, I get resolution from webcam specs and other software)

With respect to 1, I found [discussion:71611] :

jmorrill wrote:

I really should write some helper classes so people can just select resolutions supported by their cams.

Is it indicate there is no easy way to get webcam capabilities for now?

Contrary to my intension, I found VideoCaptureDevice.SnapshotCapabilities at AForge.NET Framework, but that API seems not work at some webcams.

Thank you for reading it through.