Esempio n. 1
0
        void ReleaseSenderObjects()
        {
            // Total synchronization: This may cause a frame hiccup, but it's
            // needed to dispose the readback buffers safely.
            AsyncGPUReadback.WaitAllRequests();

            // Game view capture method: Leave the sender instance without
            // disposing (we're not the owner) but synchronize it. It's needed to
            // dispose the readback buffers safely too.
            if (SharedInstance.IsGameViewSend(_send))
            {
                _send.SendVideoAsync(); // Sync by null-send
                _send = null;
            }

            // Private objet disposal
            _send?.Dispose();
            _send = null;

            _pool?.Dispose();
            _pool = null;

            _converter?.Dispose();
            _converter = null;

            // We don't dispose _onReadback because it's reusable.
        }
Esempio n. 2
0
        void ReleaseInternalObjects()
        {
            _send?.Dispose();
            _send = null;

            _converter?.Dispose();
            _converter = null;
        }
Esempio n. 3
0
        void ReleaseInternalObjects()
        {
            _recv?.Dispose();
            _recv = null;

            _converter?.Dispose();
            _converter = null;
        }
Esempio n. 4
0
        void ReleaseReceiverObjects()
        {
            _recv?.Dispose();
            _recv = null;

            _converter?.Dispose();
            _converter = null;

            // We don't dispose _override because it's reusable.
        }
Esempio n. 5
0
        void ReleaseInternalObjects()
        {
            if (_send != null && !SharedInstance.IsGameViewSend(_send))
            {
                _send.Dispose();
            }
            _send = null;

            _converter?.Dispose();
            _converter = null;
        }
Esempio n. 6
0
        void ReleaseInternalObjects()
        {
            lock (threadlock)
            {
                videoFrameQueue.Clear();
                audioBuffer.Clear();
                metadataFrameQueue.Clear();
                audioMetadataQueue.Clear();

                _recv?.Dispose();
                _recv = null;
            }
            _converter?.Dispose();
            _converter = null;
        }