public ClientReadThread(ClientSession client) { this.client = client; this.ffmpeg = client.FFMpeg; this.screen = client.VideoScreen; this.decoder = null; this.socket = null; this.stream = null; }
public override void Stop() { base.Stop(); if (decoder != null) { decoder.StopDecoding(); decoder = null; } }
public VideoDecoderWriteThread(VideoDecoder decoder, Process process, BufferPool encodedBuffers) { this.decoder = decoder; this.encodedBuffers = encodedBuffers; this.stream = process.StandardInput.BaseStream; }
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; }
public VideoDecoderErrorThread(VideoDecoder decoder, Process process) { reader = process.StandardError; }
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(); }