void ReleaseInternalObjects() { _recv?.Dispose(); _recv = null; _converter?.Dispose(); _converter = null; }
void ReleaseReceiverObjects() { _recv?.Dispose(); _recv = null; _converter?.Dispose(); _converter = null; // We don't dispose _override because it's reusable. }
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); }
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); }
void PrepareInternalObjects() { if (_recv == null) { _recv = RecvHelper.TryCreateRecv(_ndiName); } if (_converter == null) { _converter = new FormatConverter(_resources); } if (_override == null) { _override = new MaterialPropertyBlock(); } }
void ReleaseInternalObjects() { lock (threadlock) { videoFrameQueue.Clear(); audioBuffer.Clear(); metadataFrameQueue.Clear(); audioMetadataQueue.Clear(); _recv?.Dispose(); _recv = null; } _converter?.Dispose(); _converter = null; }
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(); } }