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 RidAttribute class.
Declaration
public RidAttribute(string id, string direction)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier. |
System.String | direction | The direction. |
RidAttribute(String, String, RidRestriction[])
Initializes a new instance of the RidAttribute class.
Declaration
public RidAttribute(string id, string direction, RidRestriction[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier. |
System.String | direction | The direction. |
RidRestriction[] | restrictions | The restrictions. |
RidAttribute(String, String, Int32[])
Initializes a new instance of the RidAttribute class.
Declaration
public RidAttribute(string id, string direction, int[] payloadTypes)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier. |
System.String | direction | The direction. |
System.Int32[] | payloadTypes | The payload types. |
RidAttribute(String, String, Int32[], RidRestriction[])
Initializes a new instance of the RidAttribute class.
Declaration
public RidAttribute(string id, string direction, int[] payloadTypes, RidRestriction[] restrictions)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The identifier. |
System.String | direction | The direction. |
System.Int32[] | payloadTypes | The payload types. |
RidRestriction[] | restrictions | The restrictions. |
Properties
Direction
Gets the direction.
Declaration
public string Direction { get; }
Property Value
Type | Description |
---|---|
System.String |
Id
Gets the identifier.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
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.Int32[] |
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 |
---|---|
RidRestriction[] |
Methods
FromAttributeValue(String)
Initializes a new instance of the RidAttribute class.
Declaration
public static RidAttribute FromAttributeValue(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | The attribute value. |
Returns
Type | Description |
---|---|
RidAttribute |
GetAttributeValue()
Gets the internal value of the attribute.
Declaration
protected override string GetAttributeValue()
Returns
Type | Description |
---|---|
System.String |
Overrides
GetRestrictionValue(String)
Gets a restriction value.
Declaration
public string GetRestrictionValue(string restrictionKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | restrictionKey | The restriction key. |
Returns
Type | Description |
---|---|
System.String |
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.String | id | The identifier |
Returns
Type | Description |
---|---|
System.Boolean |