// Open URL private void openURLFileItem_Click(object sender, System.EventArgs e) { URLForm form = new URLForm(); form.Description = "Enter URL of an updating JPEG from a web camera:"; form.URLs = new string[] { "http://aleksandriacamk1.it.helsinki.fi/axis-cgi/jpg/image.cgi?resolution=320x240", "http://stareat.it.helsinki.fi/axis-cgi/jpg/image.cgi?resolution=320x240", "http://194.18.89.220/axis-cgi/jpg/image.cgi?resolution=320x240", "http://212.247.228.34/axis-cgi/jpg/image.cgi?resolution=352x240" }; if (form.ShowDialog(this) == DialogResult.OK) { // create video source JPEGSource jpegSource = new JPEGSource(); jpegSource.VideoSource = form.URL; jpegSource.Password = form.Password; jpegSource.Login = form.Name; jpegSource.PreAuthenticate = form.PreAuthenticate; // open it OpenVideoSource(jpegSource); // enable camera window cameraWindow.Enabled = true; } }
// Create video source object public IVideoSource CreateVideoSource(object config) { JPEGConfiguration cfg = (JPEGConfiguration) config; if (cfg != null) { JPEGSource source = new JPEGSource(); source.VideoSource = cfg.source; source.Login = cfg.login; source.Password = cfg.password; source.FrameInterval = cfg.frameInterval; return (IVideoSource) source; } return null; }
// Start receiving video frames public void Start() { videoSource.Start(); if (thread == null) { // create events stopEvent = new ManualResetEvent(false); execEvent = new ManualResetEvent(false); // create and start new thread thread = new Thread(new ThreadStart(WorkerThread)); thread.Name = this.controlCommand; thread.IsBackground = true; thread.Start(); JPEGSource.SetAllowUnsafeHeaderParsing20(); } }
// Constructor public FujikoCamera() { videoSource = new MJPEGSource(); JPEGSource.SetAllowUnsafeHeaderParsing20(); streamType = StreamType.MJpeg; }
// Constructor public BoschCamera() { videoSource = new JPEGSource(); //JPEGSource.SetAllowUnsafeHeaderParsing20(); streamType = StreamType.Jpeg; }
// Constructor public Axis2401() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }
// Constructor public Axis2460() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }
// 构造函数 public EasyNCamera() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }
// Constructor public PixordCamera() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }
// 构造函数 public EasyNCamera() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }
// Constructor public PixordCamera() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }
// Constructor public PanasonicCamera() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }
// Constructor public PanasonicCamera() { videoSource = new JPEGSource(); JPEGSource.SetAllowUnsafeHeaderParsing20(); streamType = StreamType.Jpeg; }
// Constructor public PanasonicCamera() { videoSource = new JPEGSource(); streamType = StreamType.Jpeg; }