Esempio n. 1
0
        public RtpReceiver(IntPtr native)
        {
            _native = new RtpReceiverSafeHandle(native);

            // Get the track, check the type then wrap it
            var trackPtr = RtpReceiverInterops.GetTrack(_native);

            Track = MediaStreamTrackInterop.IsAudioTrack(trackPtr)
                ? (MediaStreamTrack) new AudioTrack(trackPtr)
                : (MediaStreamTrack) new VideoTrack(trackPtr);
        }
Esempio n. 2
0
 protected override void ReleaseHandle(IntPtr handle) => RtpReceiverInterops.Destroy(handle);
Esempio n. 3
0
 internal IntPtr GetRtpReceiverInterface() => RtpReceiverInterops.GetRtpReceiverInterface(_native);