如
上图为Form1,主窗体。
引用AForge.Controls.dll后,工具箱出现控件,videosourceplayer就是我们要放到窗体中的视频流播放器控件
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using AForge;
using AForge.Controls;
using AForge.Imaging;
using AForge.Video;
using AForge.Video.DirectShow;
namespace shujuku
{
public partial class window2 : UserControl
{
private const int statLength = 15;
private int statIndex = 0;
private int statReady = 0;
private int[