1
Reply

process in a lot of count of continual frames?

Bahar Jalali

Bahar Jalali

Jun 10 2012 6:11 AM
2k
hi
i have an ip camera that i use this code for get it's video frames. 

BitmapImage src;
Bitmap xxxxxbitmap;



public MainWindow()
        {
            InitializeComponent();
            _mjpeg = new MjpegDecoder();
            _mjpeg.FrameReady += mjpeg_FrameReady;
        }


 private void button2_Click(object sender, RoutedEventArgs e)
        {
            _mjpeg.ParseStream(new Uri("http://192.168.1.10:88/cgi-bin/guest/Video.cgi?media=Mjpeg"), "admin", "admin");
        }


and : 


        private void mjpeg_FrameReady(object sender, FrameReadyEventArgs e)
        {
                src = e.BitmapImage;
               xxxxxbitmap = BitmapImage2Bitmap(src);
               processimage(xxxxxbitmap);     
        }


my function "bitmapimage2bitmap" work correct and i test it. but when i use it in the mjpeg_FrameReady it don't work. i think my program is hanged and don't do any thing, because of counter of frames that they come rapidly and continual. 
i have tested every of functions and they work correct, but when i use in frameready it has problem, no error but hang!
so how must i do a process on my frames?

Answers (1)
Next Recommended Forum