views:

336

answers:

3

What is The Easiest, fastest Way to capture video stream from camera with C#?

+1  A: 

Probably look for a library that does everything for you.

Sergio Tapia
+5  A: 

Hi Ole,

As Papuccino1 wrote, you should look for a library that does just what you need. I looked this up for you:

http://www.codeproject.com/KB/directx/directxcapture.aspx :)

bomortensen
Ah yes, that site has probably everything you'll ever need newbie-intermediate level.
Sergio Tapia
And what is " The Easiest, fastest Way " for PRO's , Papuccino1?
Blender
A: 

Simpliest and easiest probably would be using Microsoft Expression Encoder SDK:

static void Main( string[] args )
{
    var job = new Microsoft.Expression.Encoder.Live.LiveJob();
    job.AddDeviceSource( job.VideoDevices[0],job.AudioDevices[0] );
    var w = new System.Windows.Forms.Form();
    w.Show();
    var source = job.DeviceSources[0];
    source.PreviewWindow = new Microsoft.Expression.Encoder.Live.PreviewWindow( new System.Runtime.InteropServices.HandleRef(w, w.Handle) );
    Console.ReadKey();
}
Konstantin Salavatov