Class RidAttribute
The SDP media attribute "rid" specifies restrictions defining a unique RTP payload configuration.
Inherited Members
Namespace: FM.LiveSwitch.Sdp.Rtp
Assembly: FM.LiveSwitch.dll
Syntax
public class RidAttribute : Attribute
Constructors
RidAttribute(String, String)
Initializes a new instance of the Rid
Declaration
public RidAttribute(string id, string direction)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The identifier. |
System. |
direction | The direction. |
RidAttribute(String, String, RidRestriction[])
Initializes a new instance of the Rid
Declaration
public RidAttribute(string id, string direction, RidRestriction[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The identifier. |
System. |
direction | The direction. |
Rid |
restrictions | The restrictions. |
RidAttribute(String, String, Int32[])
Initializes a new instance of the Rid
Declaration
public RidAttribute(string id, string direction, int[] payloadTypes)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The identifier. |
System. |
direction | The direction. |
System. |
payloadTypes | The payload types. |
RidAttribute(String, String, Int32[], RidRestriction[])
Initializes a new instance of the Rid
Declaration
public RidAttribute(string id, string direction, int[] payloadTypes, RidRestriction[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The identifier. |
System. |
direction | The direction. |
System. |
payloadTypes | The payload types. |
Rid |
restrictions | The restrictions. |
Properties
Direction
Gets the direction.
Declaration
public string Direction { get; }
Property Value
Type | Description |
---|---|
System. |
Id
Gets the identifier.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System. |
PayloadTypes
Gets or sets the payload types that can be used in the associated stream. This property is optional and may be null.
Declaration
public int[] PayloadTypes { get; set; }
Property Value
Type | Description |
---|---|
System. |
Restrictions
Gets or sets the codec-agnostic restrictions to which the corresponding stream will conform. This property is optional and may be null.
Declaration
public RidRestriction[] Restrictions { get; set; }
Property Value
Type | Description |
---|---|
Rid |
Methods
FromAttributeValue(String)
Initializes a new instance of the Rid
Declaration
public static RidAttribute FromAttributeValue(string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
value | The attribute value. |
Returns
Type | Description |
---|---|
Rid |
GetAttributeValue()
Gets the internal value of the attribute.
Declaration
protected override string GetAttributeValue()
Returns
Type | Description |
---|---|
System. |
Overrides
GetRestrictionValue(String)
Gets a restriction value.
Declaration
public string GetRestrictionValue(string restrictionKey)
Parameters
Type | Name | Description |
---|---|---|
System. |
restrictionKey | The restriction key. |
Returns
Type | Description |
---|---|
System. |
ValidateId(String)
Validates that the identifier conforms to RFC syntax, which means that it only contains alpha-numeric characters and/or the hyphen and underscore. See https://tools.ietf.org/html/draft-ietf-avtext-rid/ and https://tools.ietf.org/html/draft-ietf-mmusic-rid/ for more info.
Declaration
public static bool ValidateId(string id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The identifier |
Returns
Type | Description |
---|---|
System. |