using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using AForge.Controls; using AForge; using AForge.Video.DirectShow; using AForge.Video; using PictureBox = AForge.Controls.PictureBox; namespace test2 { public partial class Form1 : Form { public PictureBox picBox; public Form1() { InitializeComponent(); } public void video_NewFrame(object sender, NewFrameEventArgs eventArgs) { Bitmap img = (Bitmap)eventArgs.Frame.Clone(); //do processing here picBox.Image = img; } private void picBox_Click(object sender, EventArgs e) { MJPEGStream videoSource = new MJPEGStream("http://admin:admin@192.168.1.227:81/videostream.cgi?rate=11"); videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame); videoSource.Start(); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)