Example #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);
        }
Example #2
0
 protected override void ReleaseHandle(IntPtr handle) => RtpReceiverInterops.Destroy(handle);
Example #3
0
 internal IntPtr GetRtpReceiverInterface() => RtpReceiverInterops.GetRtpReceiverInterface(_native);