Backup/motion/VideoSource/MJPEGStream.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Motion Detector
//
// Copyright ?Andrew Kirillov, 2005
// andrew.kirillov@gmail.com
//
namespace VideoSource
{
using System;
using System.Drawing;
using System.IO;
using System.Text;
using System.Threading;
using System.Net;
/// <summary>
/// MJPEGSource - MJPEG stream support
/// </summary>
public class MJPEGStream : IVideoSource
{
private string source;
private string login = null;
private string password = null;
private object userData = null;
private int framesReceived;
private int bytesReceived;
private bool useSeparateConnectionGroup = true;
private const int bufSize = 512 * 1024; // buffer size
private const int readSize = 1024; // portion size to read
private Thread thread = null;
private ManualResetEvent stopEvent = null;
private ManualResetEvent reloadEvent = null;
// new frame event
public event CameraEventHandler NewFrame;
// SeparateConnectioGroup property
// indicates to open WebRequest in separate connection group
public bool SeparateConnectionGroup
{
get { return useSeparateConnectionGroup; }
set { useSeparateConnectionGroup = value; }
}
// VideoSource property
public string VideoSource
{
get { return source; }
set
{
source = value;
// signal to reload
if (thread != null)
reloadEvent.Set();
}
}
// Login property
public string Login
{
get { return login; }
后面还有 351 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。