/// <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));
        }
Esempio n. 4
0
        /// <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));
        }
Esempio n. 6
0
 public static extern IntPtr PeerConnectionAddTransceiverWithType(IntPtr pc, TrackKind kind);
Esempio n. 7
0
 public void GetReceiverCapabilities(TrackKind kind, out IntPtr capabilities)
 {
     NativeMethods.ContextGetReceiverCapabilities(self, kind, out capabilities);
 }
Esempio n. 8
0
 public static extern void ContextGetReceiverCapabilities(IntPtr context, TrackKind kind, out IntPtr capabilities);
Esempio n. 9
0
 public IntPtr PeerConnectionAddTransceiverWithType(IntPtr pc, TrackKind kind)
 {
     return(NativeMethods.PeerConnectionAddTransceiverWithType(self, pc, kind));
 }
Esempio n. 10
0
 public virtual RTCRtpTransceiver AddTransceiver(string connectionId, TrackKind kind, RTCRtpTransceiverDirection direction = RTCRtpTransceiverDirection.SendRecv)
 {
     return(m_handler.AddTransceiver(connectionId, kind, direction));
 }