Exemplo n.º 1
0
    private void ClientReceiveFrame(Parsec.ParsecFrame frame, IntPtr image, IntPtr opaque)
    {
        // Debug.Log($"Frame received at {Time.time}. Format:{frame.format} Size:{frame.width}x{frame.height} ActualSize:{frame.fullWidth}x{frame.fullHeight} ByteSize:{frame.size}");

        decoder.Decode(frame, image);

        Vector2 padding = new Vector2((float)frame.width / frame.fullWidth, (float)frame.height / frame.fullHeight);

        parsecGuestView.Populate(decoder.Y, decoder.U, decoder.V, padding, decoder.AspectRatio);
    }
 private void OnClientReceiveFrame(Parsec.ParsecFrame frame, IntPtr image, IntPtr opaque)
 {
     parsecFrameDecoder.Decode(frame, image);
     // TODO: Could just initialize the guest view with the decoder?
     parsecGuestView.Populate(parsecFrameDecoder.Y, parsecFrameDecoder.U, parsecFrameDecoder.V, parsecFrameDecoder.Padding, parsecFrameDecoder.AspectRatio);
 }