⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtpavpconstants.cs

📁 pureIRCd是一个用c语音写的irc(RFC459)服务,可以给您带来很多的方便
💻 CS
字号:
namespace SDP
{
    /// <summary>
    /// This class defines some constants that can be used when creating MediaFields with the RTP/AVP
    /// transport protocol.
    /// </summary>
    public class RtpAvpConstants
    {
        /// <summary>
        /// Reserved Payload type. 
        /// An int greater than or equal to 0 and less than AVP_DEFINED_STATIC_MAX,
        /// but has not been assigned a value.
        /// </summary>
        public const string RESERVED = "0";

        /// <summary>
        /// Unassigned Payload type.
        /// An int greater than or equal to AVP_DEFINED_STATIC_MAX and less than
        /// AVP_DYNAMIC_MIN - currently unassigned.
        /// </summary>
        public const string UNASSIGNED = "35";

        /// <summary>
        /// Dynamic Payload type. 
        /// Any int less than 0 or greater than or equal to AVP_DYNAMIC_MIN
        /// </summary>
        public const string DYNAMIC = "-35";

        /// <summary>
        /// RTP/AVP Protocol
        /// </summary>
        public const string RTP_AVP = "RTP/AVP";

        /// <summary>
        /// RTP mapping attribute.
        /// 
        /// SDP is case-sensitive; RFC2327 specifies 'rtpmap' (all smallcap)
        /// </summary>
        public const string RTPMAP = "rtpmap";

        /// <summary>
        /// RTP mapping attribute.
        /// </summary>
        public const string FMTP = "FMTP";

        /// <summary>
        /// Static RTP/AVP payload type for the PCMU audio codec.
        /// </summary>
        public const int PCMU = 0;

        ///<summary>
        /// Static RTP/AVP payload type for the TENSIXTEEN audio codec.
        ///</summary>
        public const int TENSIXTEEN = 1;

        /// <summary>
        /// Static RTP/AVP payload type for the G726_32 audio codec.
        /// </summary>
        public const int G726_32 = 2;

        ///<summary>
        /// Static RTP/AVP payload type for the GSM audio codec.
        ///</summary>
        public const int GSM = 3;

        /// <summary>
        /// Static RTP/AVP payload type for the G723 audio codec.
        /// </summary>
        public const int G723 = 4;

        ///<summary>
        /// Static RTP/AVP payload type for the DVI4_8000 audio codec
        ///</summary>
        public const int DVI4_8000 = 5;

        /// <summary>
        /// Static RTP/AVP payload type for the DVI4_16000 audio codec.
        /// </summary>
        public const int DVI4_16000 = 6;

        /// <summary>
        /// Static RTP/AVP payload type for the LPC audio codec
        /// </summary>
        public const int LPC = 7;

        ///<summary>
        /// Static RTP/AVP payload type for the PCMA audio codec.
        ///</summary>
        public const int PCMA = 8;

        /// <summary>
        /// Static RTP/AVP payload type for the G722 audio codec.
        /// </summary>
        public const int G722 = 9;

        /// <summary>
        /// Static RTP/AVP payload type for the L16_2CH audio codec.
        /// </summary>
        public const int L16_2CH = 10;

        /// <summary>
        /// Static RTP/AVP payload type for the L16_1CH audio codec.
        /// </summary>
        public const int L16_1CH = 11;

        /// <summary>
        /// Static RTP/AVP payload type for QCELP audio codec
        /// </summary>
        public const int QCELP = 12;

        /// <summary>
        /// Static RTP/AVP payload type for the CN audio codec.
        /// </summary>
        public const int CN = 13;

        /// <summary>
        /// Static RTP/AVP payload type for the MPA audio codec.
        /// </summary>
        public const int MPA = 14;

        /// <summary>
        /// Static RTP/AVP payload type for the G728 audio codec.
        /// </summary>
        public const int G728 = 15;

        /// <summary>
        /// Static RTP/AVP payload type for the DVI4_11025 audio codec
        /// </summary>
        public const int DVI4_11025 = 16;

        /// <summary>
        /// Static RTP/AVP payload type for the DVI4_22050 audio codec.
        /// </summary>
        public const int DVI4_22050 = 17;

        /// <summary>
        /// Static RTP/AVP payload type for the G729 audio codec.
        /// </summary>
        public const int G729 = 18;

        /// <summary>
        /// Static RTP/AVP payload type for the CN audio codec.
        /// </summary>
        public const int CN_DEPRECATED = 19;

        /// <summary>
        /// Static RTP/AVP payload type for the CELB video codec.
        /// </summary>
        public const int CELB = 25;

        /// <summary>
        /// Static RTP/AVP payload type for the JPEG video codec.
        /// </summary>
        public const int JPEG = 26;

        /// <summary>
        /// Static RTP/AVP payload type for the NV video codec
        /// </summary>
        public const int NV = 28;

        /// <summary>
        /// Static RTP/AVP payload type for the H261 video codec.
        /// </summary>
        public const int H261 = 31;

        /// <summary>
        /// Static RTP/AVP payload type for the MPV video codec.
        /// </summary>
        public const int MPV = 32;

        /// <summary>
        /// Static RTP/AVP payload type for the MP2T video codec.
        /// </summary>
        public const int MP2T = 33;

        /// <summary>
        /// Static RTP/AVP payload type for the H263 video codec.
        /// </summary>
        public const int H263 = 34;

        /// <summary>
        /// Highest defined static payload type. This is (currently) 35.
        /// </summary>
        public const int AVP_DEFINED_STATIC_MAX = 35;

        /// <summary>
        /// The minimum defined dynamic format value
        /// </summary>
        public const int AVP_DYNAMIC_MIN = -35;

        /// <summary>
        /// Names of AVP (Audio-Video Profile) payload types indexed on their static payload types.
        /// </summary>
        public static readonly string[] avpTypeNames = new string[]{ "PCMU",
        "1016", 
        "G721", 
        "GSM",  
        "G723",  
        "DVI4_8000",      
        "DVI4_16000",     
        "LPC",       
        "PCMA",    
        "G722",      
        "L16_2CH",    
        "L16_1CH",     
        "QCELP",
        "CN",
        "MPA", 
        "G728",
        "DVI4_11025",
        "DVI4_22050",
        "G729",
        "CN_DEPRECATED",
        //"H263",
        "UNASSIGNED",
        "UNASSIGNED",
        "UNASSIGNED",
        "UNASSIGNED",
        "UNASSIGNED",
        "CelB",
        "JPEG",
        "UNASSIGNED",
        "nv",
        "UNASSIGNED",
        "UNASSIGNED",
        "H261",
        "MPV",
        "MP2T",
        "H263",
    };

        /// <summary>
        /// Clock rates for various AVP payload types indexed by their static payload types.
        /// </summary>
        public static readonly int[] avpClockRates ={ 8000,
        8000, 
        8000, 
        8000,  
        8000,  
        8000,      
        16000,     
        8000,       
        8000,    
        8000,      
        44100,    
        44100,
        -1,
        -1,
        90000, 
        8000,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        -1,
        90000,
        90000,
        -1,
        90000,
        -1,
        -1,
        90000,
        90000,
        90000,
        -1
    };

        /// <summary>
        /// Channels per static type.
        /// </summary>
        public static readonly int[] avpChannels = { 1,
         1, 
         1, 
         1,  
         1,  
         1,      
         1,     
         1,       
         1,    
         1,      
         2,    
         1,
         -1,
         -1,
         1, 
         1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
         -1,
     };
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -