Exemplo n.º 1
0
        private void SetMediaStreamInfo(MediaFormat mediaFormat)
        {
            if (mediaFormat == null)
            {
                return;
            }

            IntPtr ptr = IntPtr.Zero;

            try
            {
                ptr = mediaFormat.AsNativeHandle();
                NativeWebRTC.SetMediaPacketSourceInfo(WebRtc.Handle, SourceId.Value, ptr).
                ThrowIfFailed("Failed to set the media stream info");
            }
            finally
            {
                MediaFormat.ReleaseNativeHandle(ptr);
            }
        }