// Open JPEG URL private void openJPEGURLToolStripMenuItem_Click(object sender, EventArgs e) { URLForm form = new URLForm(); form.Description = "Enter URL of an updating JPEG from a web camera:"; form.URLs = new string[] { "http://195.243.185.195/axis-cgi/jpg/image.cgi?camera=1", }; if (form.ShowDialog(this) == DialogResult.OK) { // create video source JPEGStream jpegSource = new JPEGStream(form.URL); // open it OpenVideoSource(jpegSource); } }
private void mjpegToolStripMenuItem_Click(object sender, EventArgs e) { URLForm form = new URLForm(); form.Description = "Enter URL of an updating JPEG from a web camera"; //Load recent URLs String[] urls = new String[recentURLs.Count]; recentURLs.CopyTo(urls, 0); form.URLs = urls; form.StartPosition = FormStartPosition.CenterScreen; if (form.ShowDialog(this) == DialogResult.OK) { //remove existing item (so it will be placed at top of list) if (recentURLs.Contains(form.URL)) { recentURLs.Remove(form.URL); } //update recent URLs if (recentURLs.Count == RECENT_URL_LIMIT) { recentURLs.RemoveAt(RECENT_URL_LIMIT - 1); } recentURLs.Add(form.URL); //open the stream String sourceName = showGetSourceNameBox(); if (sourceName != null) //user didn't select cancel { MJPEGStream s = new MJPEGStream(); s.Source = form.URL; Log.info(String.Format("Video source: {0}", s.Source)); VideoSource v = new VideoSource(sourceName, s); sources.Add(v); v.RemoveSelected += new VideoSource.RemoveEventHandler(r_RemoveSelected); v.setViewerGlobalStickey(showAllToolStripMenuItem.Checked); globalOptions.updateViewer(v); v.startCamera(); //start camera by default } } }
// Open MJPEG URL private void openMJPEGURLToolStripMenuItem_Click(object sender, EventArgs e) { URLForm form = new URLForm(); form.Description = "Enter URL of an MJPEG video stream:"; form.URLs = new string[] { "http://195.243.185.195/axis-cgi/mjpg/video.cgi?camera=4", "http://195.243.185.195/axis-cgi/mjpg/video.cgi?camera=3", }; if (form.ShowDialog(this) == DialogResult.OK) { // create video source MJPEGStream mjpegSource = new MJPEGStream(form.URL); // open it OpenVideoSource(mjpegSource); } }
// Open MJPEG URL private void openMJPEGURLToolStripMenuItem_Click(object sender, EventArgs e) { URLForm form = new URLForm(); form.Description = "Enter URL of an MJPEG video stream:"; form.URLs = new string[] { "http://195.243.185.195/axis-cgi/mjpg/video.cgi?camera=3", "http://195.243.185.195/axis-cgi/mjpg/video.cgi?camera=4", }; if (form.ShowDialog(this) == DialogResult.OK) { // create video source MJPEGStream mjpegSource = new MJPEGStream(form.URL); // open it OpenVideoSource(mjpegSource); } }
// Open JPEG URL private void openJPEGURLToolStripMenuItem_Click(object sender, EventArgs e) { URLForm form = new URLForm(); form.Description = "Enter URL of an updating JPEG from a web camera:"; form.URLs = new string[] { "http://195.243.185.195/axis-cgi/jpg/image.cgi?camera=1" }; if (form.ShowDialog(this) == DialogResult.OK) { // create video source JPEGStream jpegSource = new JPEGStream(form.URL); // open it OpenVideoSource(jpegSource); } }