void ReleaseInternalObjects()
        {
            _recv?.Dispose();
            _recv = null;

            _converter?.Dispose();
            _converter = null;
        }
        public static Interop.VideoFrame?TryCaptureVideoFrame(Interop.Recv recv)
        {
            Interop.VideoFrame video;
            var type = recv.Capture(out video, IntPtr.Zero, IntPtr.Zero, 0);

            if (type != Interop.FrameType.Video)
            {
                return(null);
            }
            return((Interop.VideoFrame?)video);
        }
 void PrepareInternalObjects()
 {
     if (_recv == null)
     {
         _recv = RecvHelper.TryCreateRecv(_ndiName);
     }
     if (_converter == null)
     {
         _converter = new FormatConverter(_resources);
     }
     if (_override == null)
     {
         _override = new MaterialPropertyBlock();
     }
 }