Exemplo n.º 1
0
        private void UnregisterExtraPreviewCallback()
        {
            Native.UnsetExtraPreviewCallback(_handle).
            ThrowIfFailed("Failed to unset extra preview callback.");

            _extraPreviewCallback = null;
        }
Exemplo n.º 2
0
        private void RegisterExtraPreviewCallback()
        {
            _extraPreviewCallback = (frame, streamId, _) =>
            {
                _extraPreview?.Invoke(this, new ExtraPreviewEventArgs(new PreviewFrame(frame), streamId));
            };

            Native.SetExtraPreviewCallback(_handle, _extraPreviewCallback).
            ThrowIfFailed("Failed to set extra preview callback.");
        }