Exemplo n.º 1
0
        void videoGrabber_BufferData(object sender, VideoGrabberBufferDataEventArgs e)
        {
            try
            {
                if (!isSendProfileCamera)
                {
                    isSendProfileCamera = true;
                    user.Send(new AdHocDesktop_TcpObject(AdHocDesktop_TcpCommand.ProfileCamera, profile.Src, profile.Dest, e.Size));
                }

                byte[] buffer = ImageUtil.BitmapToJpegByte(e.Bitmap);
                user.Send(new AdHocDesktop_TcpObject(AdHocDesktop_TcpCommand.StreamingCamera, profile.Src, profile.Dest, buffer));
                buffer = null;
            }
            catch (Exception)
            {
            }
        }