Exemple #1
0
        void ReleaseInternalObjects()
        {
            _recv?.Dispose();
            _recv = null;

            _converter?.Dispose();
            _converter = null;
        }
Exemple #2
0
        void ReleaseReceiverObjects()
        {
            _recv?.Dispose();
            _recv = null;

            _converter?.Dispose();
            _converter = null;

            // We don't dispose _override because it's reusable.
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        public static Interop.CaptureFrame TryCaptureFrame(Interop.Recv recv)
        {
            Interop.CaptureFrame captureFrame = new Interop.CaptureFrame();

            captureFrame.frameType = recv.Capture(
                out captureFrame.videoFrame,
                out captureFrame.audioFrame,
                out captureFrame.metadataFrame,
                0);

            return(captureFrame);
        }
Exemple #5
0
 void PrepareInternalObjects()
 {
     if (_recv == null)
     {
         _recv = RecvHelper.TryCreateRecv(_ndiName);
     }
     if (_converter == null)
     {
         _converter = new FormatConverter(_resources);
     }
     if (_override == null)
     {
         _override = new MaterialPropertyBlock();
     }
 }
Exemple #6
0
        void ReleaseInternalObjects()
        {
            lock (threadlock)
            {
                videoFrameQueue.Clear();
                audioBuffer.Clear();
                metadataFrameQueue.Clear();
                audioMetadataQueue.Clear();

                _recv?.Dispose();
                _recv = null;
            }
            _converter?.Dispose();
            _converter = null;
        }
Exemple #7
0
        void PrepareInternalObjects()
        {
            if (_recv == null)
            {
                _recv = RecvHelper.TryCreateRecv(_ndiName, _colorFormat, _bandwidth);
                if (_recv != null)
                {
                    // Send Connection acknowledgment
                    SendMetadataFrame(connectionAcknowledgement);
                }
            }

            if (_converter == null)
            {
                _converter = new FormatConverter(_resources);
            }
            if (_override == null)
            {
                _override = new MaterialPropertyBlock();
            }
        }