public MediaStreamTrack(IntPtr handle) { if (handle == IntPtr.Zero) { throw new ArgumentException(nameof(handle)); } Handle = new MediaStreamTrackSafeHandle(handle); var nativeIdString = MediaStreamTrackInterop.Id(Handle); if (nativeIdString == IntPtr.Zero) { Id = null; } else { Id = Marshal.PtrToStringAnsi(nativeIdString); } }
public static extern IntPtr Id(MediaStreamTrackSafeHandle hande);
public static extern bool IsAudioTrack(MediaStreamTrackSafeHandle mediaStreamTrackPtr);
public static extern IntPtr AddTrack(PeerConnectionSafeHandle handle, MediaStreamTrackSafeHandle mediaStreamTrackSafeHandle, string streamId);
public static extern void AddSink(MediaStreamTrackSafeHandle videoTrackSafeHandle, VideoSinkAdapterSafeHandle videoSinkAdapterSafeHandle);