For all of these tests I used a Logitech c525 USB webcam. It is important to note that this webcam does not support taking single pictures or snapshots, and my goal was to try and simulate this feature as closely as possible.
This first test was actually a very simple project. I started with the source code I found here, which actually complied very nicely in Visual C# express 2010. I tidied up the interface a fair bit, and added a textbox that checks for an integer value when you press "Start". The textbox sets an interval in ms for how frequently a snapshot should be taken. I thought that doing this in WIA makes the most sense and was the easiest to implement. The biggest problem with this program (and this problem is carried over to the next 2 test programs as well) is that I wasn't able to figure out how to resize the captured video. Aside from that, the snapshot function worked very well!
The next thing I wanted to do, mostly for fun, was record video using a webcam. The first thing I tried was DirectShow.Net. I downloaded the library files, but for whatever reason I still had problems recording video. I had to also add a reference for DirectShowLib-2005.dll, which is located with the source code files. The bulk of the code I used for the video capture aspect of this program came from the sample project located in Samples -> Capture -> CapWMV, which can be found through that link above.
Unfortunately I was very unhappy with the quality of video that was recorded, so I decided to look for another method.
I ran into a lot of problems with this program, but thankfully the end result is a much higher quality video recording.
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/> <supportedRuntime version="v2.0.50727"></supportedRuntime> </startup>
Just so I can end this series of tests with a usable program, I took the program from Test 4 above, removed all the snapshot code (because, really, who needs that?) and converted the program into a pure Webcam recorder. You connect to your Webcam, it automatically resizes the window based on the resolution you chose, and then you can record video! That's it! At least it's sort of useful, right??