dbremner / aforge

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

changes to directshow library to support video capture cards #333

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I've modified the most recent updates to the video.directshow library to 
support video capture cards (for ispy).

Basicaly the worker thread needs to be set to run in STA and the code that 
creates the filter was failing.

Original issue reported on code.google.com by sean.p.t...@gmail.com on 25 Feb 2013 at 8:56

Attachments:

GoogleCodeExporter commented 8 years ago
So the only new thing is TrySetApartmentState() call? Is it?

Sorry for asking this, but analysing your code is difficult because you made 
hundreds of changes for no reason. It is much easier when patch is sent 
containing only the useful changes.

What is done in FilterInfo?

Original comment by andrew.k...@gmail.com on 25 Feb 2013 at 10:07

GoogleCodeExporter commented 8 years ago
yeah sorry i ran it through a code cleaner (resharper).

The changes are adding the trysetapartmentstate call and also in

public static object CreateFilter( string filterMoniker ) {...}

... in filterinfo.cs

Original comment by sean.p.t...@gmail.com on 25 Feb 2013 at 10:11

GoogleCodeExporter commented 8 years ago
I have no idea why but some video cards shit themselves when they hit your code:

Win32.CreateBindCtx( 0, out bindCtx )

or

Win32.MkParseDisplayName( bindCtx, filterMoniker, ref n, out moniker )

- the update fixes the issue. Why I have no idea but it now seems to work with 
everything.

Original comment by sean.p.t...@gmail.com on 25 Feb 2013 at 10:29

GoogleCodeExporter commented 8 years ago
Andrew, I updated parts of the library with new patch files, to be applied over 
r1710

Original comment by ericnewt...@gmail.com on 13 Mar 2013 at 2:56

Attachments:

GoogleCodeExporter commented 8 years ago
Additional patches I missed above.

Original comment by ericnewt...@gmail.com on 13 Mar 2013 at 3:16

Attachments: