/// <summary> /// /// </summary> /// <param name="connectionId"></param> /// <param name="kind"></param> /// <param name="direction"></param> /// <returns></returns> public RTCRtpTransceiver AddTransceiver(string connectionId, TrackKind kind, RTCRtpTransceiverDirection direction) { var transceiver = _mapConnectionIdAndPeer[connectionId].peer.AddTransceiver(kind); transceiver.Direction = direction; return(transceiver); }
/// <summary> /// /// </summary> /// <param name="kind"></param> /// <returns></returns> public RTCRtpTransceiver AddTransceiver(TrackKind kind) { IntPtr ptr = NativeMethods.PeerConnectionAddTransceiverWithType( GetSelfOrThrow(), kind); return(CreateTransceiver(ptr)); }
/// <summary> /// /// </summary> /// <param name="kind"></param> /// <param name="init"></param> /// <returns></returns> public RTCRtpTransceiver AddTransceiver(TrackKind kind, RTCRtpTransceiverInit init = null) { IntPtr ptr = PeerConnectionAddTransceiverWithType( GetSelfOrThrow(), kind, init); return(CreateTransceiver(ptr)); }
/// <summary> /// /// </summary> /// <param name="kind"></param> /// <returns></returns> public static RTCRtpCapabilities GetCapabilities(TrackKind kind) { WebRTC.Context.GetReceiverCapabilities(kind, out IntPtr ptr); RTCRtpCapabilitiesInternal capabilitiesInternal = Marshal.PtrToStructure <RTCRtpCapabilitiesInternal>(ptr); RTCRtpCapabilities capabilities = new RTCRtpCapabilities(capabilitiesInternal); Marshal.FreeHGlobal(ptr); return(capabilities); }
static IntPtr PeerConnectionAddTransceiverWithType(IntPtr pc, TrackKind kind, RTCRtpTransceiverInit init) { if (init == null) { return(NativeMethods.PeerConnectionAddTransceiverWithType(pc, kind)); } RTCRtpTransceiverInitInternal _init = init.Cast(); return(NativeMethods.PeerConnectionAddTransceiverWithTypeAndInit(pc, kind, ref _init)); }
public static extern IntPtr PeerConnectionAddTransceiverWithType(IntPtr pc, TrackKind kind);
public void GetReceiverCapabilities(TrackKind kind, out IntPtr capabilities) { NativeMethods.ContextGetReceiverCapabilities(self, kind, out capabilities); }
public static extern void ContextGetReceiverCapabilities(IntPtr context, TrackKind kind, out IntPtr capabilities);
public IntPtr PeerConnectionAddTransceiverWithType(IntPtr pc, TrackKind kind) { return(NativeMethods.PeerConnectionAddTransceiverWithType(self, pc, kind)); }
public virtual RTCRtpTransceiver AddTransceiver(string connectionId, TrackKind kind, RTCRtpTransceiverDirection direction = RTCRtpTransceiverDirection.SendRecv) { return(m_handler.AddTransceiver(connectionId, kind, direction)); }