Exemplo n.º 1
0
    protected void camera()
    {
        bool active = true;

        while (active)
        {
            videoChannel.Flash(42);
            videoChannel.Receive(ref imageBuffer, imageBuffer.Length);

            lock (imageBuffer)
            {
                imagePixBuf = new Gdk.Pixbuf(imageBuffer, Gdk.Colorspace.Rgb, false, 8, cam_width, cam_height, 3 * cam_width);
                active      = cameraActive;
            }

            Thread.Sleep((int)(1000.0 / fps));
        }
        videoChannel.Flash(0);
    }