Ejemplo n.º 1
0
        private static void TransmitNextFrame()
        {
            try
            {
                byte[] imageData = _screenCapture.Capture();
                ProtoClient.SendImageToServer(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight);

                // Uncomment the following to enable debugging
                // MiscUtils.SaveRGBArrayToImageFile(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight, AppConstants.DEBUG_IMAGE_FILE_NAME);
            }
            catch (Exception ex)
            {
                throw new Exception("Error occured during capture: " + ex.Message, ex);
            }
        }
Ejemplo n.º 2
0
        private void TransmitNextFrame()
        {
            foreach (HyperionClient hyperionClient in _hyperionClients)
            {
                try
                {
                    byte[] imageData = _screenCapture.Capture();
                    hyperionClient.SendImageData(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight);

                    // Uncomment the following to enable debugging
                    // MiscUtils.SaveRGBArrayToImageFile(imageData, _screenCapture.CaptureWidth, _screenCapture.CaptureHeight, AppConstants.DEBUG_IMAGE_FILE_NAME);
                }
                catch (Exception ex)
                {
                    throw new Exception("Error occured while sending image to server: " + ex.Message, ex);
                }
            }
        }