SynTronic / aforge

Automatically exported from code.google.com/p/aforge
Other
0 stars 0 forks source link

Point Grey camera support #189

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Point Grey Firewire cameras do not implement the IAMStreamConfiguration 
interface in a way that is compatible with the current AForge DirectShow filter 
graph.

The problem exists in VideoCaptureDevice.cs, in the WorkerThread method.

On line 544 the captureGraph.FindInterface method is called. It returns S_OK 
and streamConfigObject is not null, however an InvalidCastException is raised 
when the Object is cast to IAMStreamConfig.

I have found that wrapping the cast in a try/catch block (and the rest of the 
operations on streamConfig in a guard expression) solves the problem and 
everything about the camera seems perfectly fine. Even setting the 
DesiredFrameRate to 30 seems to work fine, as does .DisplayPropertyPage.

Attached is screenshot proof and the patched method.

Original issue reported on code.google.com by w3...@w3bbo.com on 12 Mar 2011 at 8:12

Attachments:

GoogleCodeExporter commented 9 years ago
Adding try/catch blocks around getting IAMStreamConfig interface, which fails 
on Point Grey cameras. So with this extra guard these cameras should work fine 
now.

Committed in revision 1407. Will be released in version 2.1.6.

Original comment by andrew.k...@gmail.com on 31 Mar 2011 at 8:03

GoogleCodeExporter commented 9 years ago

Original comment by andrew.k...@gmail.com on 28 Jul 2011 at 9:45

GoogleCodeExporter commented 9 years ago

Original comment by andrew.k...@gmail.com on 10 Aug 2011 at 9:27