ARLM-Keller / aforge

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

Do not require IAMStreamConfig #146

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I've been working with PointGrey cameras recently, but right now you can't use 
them with AForge because their DirectShow filters don't implement 
IAMStreamConfig.

I was wondering if you could modify AForge in future releases so that it 
doesn't require this interface to be supported, this would then mean that we 
can use AForge with PointGrey cameras and so widen AForge's userbase (PointGrey 
are one of the largest scientific/research camera MFGs right now, so it makes 
good sense).

I had a discussion with their support department and they're going to get their 
developers on the case and hopefully implement it in the next revision (which 
won't be for at least a few months, if not another year), so anything you can 
get going I'd appreciate.

Original issue reported on code.google.com by w3...@w3bbo.com on 20 Aug 2010 at 1:31

Attachments:

GoogleCodeExporter commented 8 years ago
It may be a bit hard to fix the issue, since I don't have any PointGrey cameras 
available to me for now. So I am a bit blind fixing it ...

Is this message box displayed by your code? Or is it displayed automatically, 
when you try starting video source configured to use PointGrey camera.

Original comment by andrew.k...@gmail.com on 20 Aug 2010 at 1:52

GoogleCodeExporter commented 8 years ago
My project has two forms: DeviceSelectForm and MainForm. The DeviceSelectForm 
works fine and proceeds on to the MainForm.

MainForm has a method "Setup" which is called from the Form.Load event handler 
that sets the "VideoSourceError" and "NewFrame" event handlers for the 
IVideoSource.

There's a button "Start Source" that when clicked calls videoSource.Start() and 
that's when the message appears.

The messagebox is displayed from the videoSource.VideoSourceError event 
handler. I'll post stack traces in a follow-up posting.

Original comment by w3...@w3bbo.com on 20 Aug 2010 at 2:33

GoogleCodeExporter commented 8 years ago
OK, so the message is displayed by you from VideoSourceError event handler. Am 
I right? If so, then it should be possible to have a fix. Just confirm it is 
your message and I will try to do some changes in code and then give a build to 
test.

Original comment by andrew.k...@gmail.com on 20 Aug 2010 at 2:37

GoogleCodeExporter commented 8 years ago
See attached.

Original comment by w3...@w3bbo.com on 20 Aug 2010 at 2:42

Attachments:

GoogleCodeExporter commented 8 years ago
Try this build. Let me know if it help.

Original comment by andrew.k...@gmail.com on 20 Aug 2010 at 2:53

Attachments:

GoogleCodeExporter commented 8 years ago
I successfully rebuilt my project using the latest version of AForge 2.1.3 and 
added a reference to the new AForge.Video.DirectShow.dll assembly.

However when I start the video source I get this MDA reported by Visual Studio 
(see attached screenshot).

Thanks for looking into this so quickly, btw :)

Original comment by w3...@w3bbo.com on 20 Aug 2010 at 3:31

Attachments:

GoogleCodeExporter commented 8 years ago
Try another one ... (really hard to debug without camera)

Original comment by andrew.k...@gmail.com on 20 Aug 2010 at 3:38

Attachments:

GoogleCodeExporter commented 8 years ago
The new version doesn't work either, I get the same MDA error (it only appears 
when I try to close the program).

I'll download a copy of the current source code and see if I can get it working 
at my end, then submit a patch to you.

Original comment by w3...@w3bbo.com on 20 Aug 2010 at 3:51

GoogleCodeExporter commented 8 years ago
> I get the same MDA error (it only appears when I try to close the program).
Does this mean you can access your camera and see what it is capturing? Does 
this mean all wroks, but just a crash in the end - on closing application?

Original comment by andrew.k...@gmail.com on 20 Aug 2010 at 5:08

GoogleCodeExporter commented 8 years ago
The video does not appear, the NewFrame event is never fired. The MDA is raised 
during finalization as the program ends.

Original comment by w3...@w3bbo.com on 20 Aug 2010 at 5:18

GoogleCodeExporter commented 8 years ago
OK, try to debug on your side. You have the camera, so it should be easer for 
you.

Original comment by andrew.k...@gmail.com on 20 Aug 2010 at 5:39

GoogleCodeExporter commented 8 years ago
I've spent some time on this, and I'm unsure of the solution:

This line is the problem:

captureGraph.FindInterface( PinCategory.Capture, MediaType.Video, sourceBase, 
typeof( IAMStreamConfig ).GUID, out streamConfigObject );

Even though no filter in the graph implements IAMStreamConfig, the method still 
returns a COM object, it just can't be cast (which is where it fails).

I'll see if I can work out a solution eventually, but I'm busy this week.

Original comment by w3...@w3bbo.com on 7 Sep 2010 at 8:31

GoogleCodeExporter commented 8 years ago
Just to say I've kind-of fixed it in this patch: 
http://code.google.com/p/aforge/issues/detail?id=189

Original comment by w3...@w3bbo.com on 12 Mar 2011 at 8:18

GoogleCodeExporter commented 8 years ago
Closing the ticket since it seems like it was resolved by ticket 189.

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