Beispiel #1
0
 public ClientReadThread(ClientSession client)
 {
     this.client = client;
     this.ffmpeg = client.FFMpeg;
     this.screen = client.VideoScreen;
     this.decoder = null;
     this.socket = null;
     this.stream = null;
 }
Beispiel #2
0
        public override void Stop()
        {
            base.Stop();

            if (decoder != null)
            {
                decoder.StopDecoding();
                decoder = null;
            }
        }
Beispiel #3
0
 public VideoDecoderWriteThread(VideoDecoder decoder, Process process, BufferPool encodedBuffers)
 {
     this.decoder = decoder;
     this.encodedBuffers = encodedBuffers;
     this.stream = process.StandardInput.BaseStream;
 }
Beispiel #4
0
 public VideoDecoderReadThread(VideoDecoder decoder, Process process, BufferPool decodedBuffers)
 {
     this.decoder = decoder;
     this.screen = decoder.VideoPreview;
     this.decodedBuffers = decodedBuffers;
     this.lockBounds = new Rectangle(0, 0, decoder.VideoWidth, decoder.VideoHeight);
     this.decodeBuffer = new Bitmap(decoder.VideoWidth, decoder.VideoHeight, PixelFormat.Format24bppRgb);
     this.stream = process.StandardOutput.BaseStream;
     this.frameSize = decoder.VideoWidth * decoder.VideoHeight * 3;
     this.readBuffer = new byte[frameSize];
     this.pos = 0;
 }
Beispiel #5
0
 public VideoDecoderErrorThread(VideoDecoder decoder, Process process)
 {
     reader = process.StandardError;
 }
Beispiel #6
0
        protected void readVideoStart(VideoStartPacket packet)
        {
            if (decoder != null)
            {
                decoder.StopDecoding();
                decoder = null;
            }

            decoder = new VideoDecoder(ffmpeg, packet.VideoWidth, packet.VideoHeight);
            screen.SetVideoSize(packet.VideoWidth, packet.VideoHeight);
            decoder.VideoPreview = screen;
            decoder.StartDecoding();
        }