示例#1
0
        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);
        }
示例#3
0
 void PrepareInternalObjects()
 {
     if (_recv == null)
     {
         _recv = RecvHelper.TryCreateRecv(_ndiName);
     }
     if (_converter == null)
     {
         _converter = new FormatConverter(_resources);
     }
     if (_override == null)
     {
         _override = new MaterialPropertyBlock();
     }
 }