Beispiel #1
0
 internal RTCRtpCapabilities(RTCRtpCapabilitiesInternal capabilities)
 {
     codecs = Array.ConvertAll(capabilities.codecs.ToArray(),
                               v => new RTCRtpCodecCapability(ref v));
     headerExtensions = Array.ConvertAll(capabilities.extensionHeaders.ToArray(),
                                         v => new RTCRtpHeaderExtensionCapability(ref v));
 }
Beispiel #2
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);
        }