Example #1
0
        public UnsafeStreamCodec(IImageCompression imageCompression, UnsafeStreamCodecParameters parameters)
        {
            _sendFullImage = (parameters & UnsafeStreamCodecParameters.UpdateImageEveryTwoSeconds) ==
                             UnsafeStreamCodecParameters.UpdateImageEveryTwoSeconds;
            _keepCompressor = (parameters & UnsafeStreamCodecParameters.DontDisposeImageCompressor) ==
                              UnsafeStreamCodecParameters.DontDisposeImageCompressor;

            if (_sendFullImage)
            {
                _fullImageStopwatch = Stopwatch.StartNew();
            }
            _checkBlock      = new Size(50, 1);
            ImageCompression = imageCompression;
            ImageQuality     = 70;
        }
Example #2
0
 public UnsafeStreamCodec(UnsafeStreamCodecParameters parameters) : this(new JpgCompression(70), parameters)
 {
 }