Class RtpMapAttribute
Class for represent an SDP rtpmap attribute. See Section 6.6 of RFC 8866.
Inherited Members
Namespace: SipLib.Sdp
Assembly: SipLib.dll
Syntax
public class RtpMapAttribute
Constructors
| Edit this page View SourceRtpMapAttribute()
Constructor
Declaration
public RtpMapAttribute()
RtpMapAttribute(int, string, int)
Constructor
Declaration
public RtpMapAttribute(int payloadType, string encodingName, int clockRate)
Parameters
Type | Name | Description |
---|---|---|
int | payloadType | Payload type. |
string | encodingName | Encoding name. For example "PCMU" |
int | clockRate | Clock rate in samples/second. |
Fields
| Edit this page View SourceChannels
Specifies the number of channels. If not specified then the number of channels is 1. A value of 0 indicates that the number of channels is not set. This is the default case.
Declaration
public int Channels
Field Value
Type | Description |
---|---|
int |
ClockRate
Specifies the clock rate or sample rate.
Declaration
public int ClockRate
Field Value
Type | Description |
---|---|
int |
EncodingName
Specifies the encoding-name parameter. For example: PCMU
Declaration
public string? EncodingName
Field Value
Type | Description |
---|---|
string |
PayloadType
Represents the payload type number. For instance, 0 = PCMU by default.
Declaration
public int PayloadType
Field Value
Type | Description |
---|---|
int |
Methods
| Edit this page View SourceParseRtpMap(string)
Parses an attribute value string and returns a new RtpMapAttribute object.
Declaration
public static RtpMapAttribute? ParseRtpMap(string attrValue)
Parameters
Type | Name | Description |
---|---|---|
string | attrValue | Attribute value string. For example, if the SDP media description has an attribute line line "a=rtpmap 0 PCMU/8000", then the attribute value string would be "0 PCMU/8000". |
Returns
Type | Description |
---|---|
RtpMapAttribute | Returns a new RtpMapAttribute object if successful or null if a formatting error is detected. |
ToString()
Converts this object into a full SDP attribute line. For example: "a=rtpmap: 0 PCMU/8000".
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | Returns a full SDP attribute line. |