Backup/motion/VideoSource/JPEGStream.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
// Motion Detector
//
// Copyright ?Andrew Kirillov, 2005
// andrew.kirillov@gmail.com
//
namespace VideoSource
{
using System;
using System.Drawing;
using System.IO;
using System.Threading;
using System.Net;
/// <summary>
/// JPEGSource - JPEG downloader
/// </summary>
public class JPEGStream : 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 = false;
private bool preventCaching = false;
private int frameInterval = 0; // frame interval in miliseconds
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;
// 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; }
}
// PreventCaching property
// If the property is set to true, we are trying to prevent caching
// appneding fake parameter to URL. It's needed is client is behind
// proxy server.
public bool PreventCaching
{
get { return preventCaching; }
set { preventCaching = value; }
}
// FrameInterval property - interval between frames
// If the property is set 100, than the source will produce 10 frames
// per second if it possible
public int FrameInterval
{
get { return frameInterval; }
set { frameInterval = value; }
后面还有 260 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。