C# webcam  
Author Message
Arpit Arora





PostPosted: Visual C# General, C# webcam Top

Hello,

Can someone suggest me how to get control of the USB logitech **** using .NET 2005 C#. I tried using WIA and I can capture images but I dont like the device selection window that pops up when we use ShowSelectDevice.

I've learned that avicap32.dll and platform invoke can also be used but I dont understand anything when I look at the codes online. Is there any good tutorial or any starting point I should follow. Or any other approach to interface with the **** using C#.

Thank You.




Visual C#1  
 
 
GavH





PostPosted: Visual C# General, C# webcam Top

Hello Arpit,

You really have two options left.

VFW (Video for Windows) or DirectShow - the succesor to VFW.

They both require a level of emersion within there respective technologies, and also neither are supported nativley by .Net.

The prefered method would be to use DirectShow, which has a steep learning curve, however some excellent examples exist on the web, and there is a fantastic open source library available DirectShowLib, that will allow you to access its methods directly from within C#. The advantages of using DirectShow are performance and compatibility but it comes at a cost of complexity.

DirectShowNet project : http://www.hide-link.com/

DirectShowNet samples and lib : http://www.hide-link.com/

Other DirectShow example (using directshow interfaces in c#) : http://www.hide-link.com/ ;forumid=4377&exp=0&select=1641931

VFW can be accessed through win32 interop directly, or indirectly by using this free active X control, and if all you want is a simple **** this is most likely your easiest route: http://www.hide-link.com/

VFW : WIN32 example http://www.hide-link.com/

Regards



 
 
timvw





PostPosted: Visual C# General, C# webcam Top

Here's another c# sample that uses avicap: http://www.timvw.be/wp-content/code/csharp/testavicap32.zip