Exemple #1
0
        private void _mjpg_Error(object sender, MjpegProcessor.ErrorEventArgs e)
        {
            Debug.WriteLine(e.Message);

            // RESET THE STREAM
            try
            {
                MJPGMaps grp = mjpegs[(MjpegDecoder)sender];
                ((MjpegDecoder)sender).StopStream();
                // restart stream
                ((MjpegDecoder)sender).ParseStream(new Uri(grp.ip));

                /*
                 * ((MjpegDecoder)sender).FrameReady += (o, ev) =>
                 * {
                 *  Dispatcher.BeginInvoke(new ThreadStart(delegate
                 *  {
                 *      grp.img.Source = ev.BitmapImage;
                 *  }));
                 * };
                 *
                 * ((MjpegDecoder)sender).Error += _mjpg_Error;
                 */
            }
            catch (Exception ev)
            {
                Debug.WriteLine(ev.Message);
            }
        }
Exemple #2
0
 void _mjpeg_Error(object sender, MjpegProcessor.ErrorEventArgs e)
 {
     MessageBox.Show(e.Message);
 }
 private void MjpegLeft_Error(object sender, MjpegProcessor.ErrorEventArgs e)
 {
     MessageBox.Show(e.Message);
 }
Exemple #4
0
 void decoder_Error(object sender, MjpegProcessor.ErrorEventArgs e)
 {
     //  tmr.Start();
     // throw new NotImplementedException();
 }