Class EncodingInfo
Encoding information.
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class EncodingInfo : Info
Properties
Bitrate
Gets or sets the bitrate, in kbps.
Declaration
public int Bitrate { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Deactivated
Gets or sets whether this encoding is deactivated.
Declaration
public bool Deactivated { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
FrameRate
Gets or sets the frame-rate, in fps.
Declaration
public double FrameRate { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Height
Gets the height.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsEmpty
Gets or sets whether this encoding is empty.
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RtpStreamId
Gets or sets the RTP stream identifier.
Declaration
public string RtpStreamId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Scale
Gets or sets the target scale.
Declaration
public double Scale { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
ScaledHeight
Gets the scaled height.
Declaration
public int ScaledHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ScaledSize
Gets the scaled size.
Declaration
public Size ScaledSize { get; }
Property Value
Type | Description |
---|---|
Size |
ScaledWidth
Gets the scaled width.
Declaration
public int ScaledWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Size
Gets or sets the size.
Declaration
public Size Size { get; set; }
Property Value
Type | Description |
---|---|
Size |
SynchronizationSource
Gets or sets the synchronization source.
Declaration
public long SynchronizationSource { get; set; }
Property Value
Type | Description |
---|---|
System.Int64 |
Width
Gets the width.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
DeserializeProperties(String, String)
Deserializes the properties.
Declaration
protected override void DeserializeProperties(string key, string valueJson)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key. |
System.String | valueJson | The value in JSON format. |
Overrides
FromJson(String)
Deserializes an instance from JSON.
Declaration
public static EncodingInfo FromJson(string encodingInfoJson)
Parameters
Type | Name | Description |
---|---|---|
System.String | encodingInfoJson | The serialized JSON. |
Returns
Type | Description |
---|---|
EncodingInfo | The deserialized instance. |
FromJsonArray(String)
Deserializes an array from JSON.
Declaration
public static EncodingInfo[] FromJsonArray(string encodingInfosJson)
Parameters
Type | Name | Description |
---|---|---|
System.String | encodingInfosJson | The serialized JSON. |
Returns
Type | Description |
---|---|
EncodingInfo[] | The deserialized array. |
FromSdpRidAttribute(RidAttribute)
Converts an SDP RID attribute into an instance.
Declaration
public static EncodingInfo FromSdpRidAttribute(RidAttribute ridAttribute)
Parameters
Type | Name | Description |
---|---|---|
RidAttribute | ridAttribute | The SDP RID attribute. |
Returns
Type | Description |
---|---|
EncodingInfo |
IsEquivalent(EncodingInfo)
Determines whether the specified encoding is equivalent.
Declaration
public bool IsEquivalent(EncodingInfo encoding)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding | The encoding. |
Returns
Type | Description |
---|---|
System.Boolean |
IsEquivalent(EncodingInfo, EncodingInfo)
Determines whether the two encodings are equivalent.
Declaration
public static bool IsEquivalent(EncodingInfo encoding1, EncodingInfo encoding2)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding1 | The first encoding. |
EncodingInfo | encoding2 | The second encoding. |
Returns
Type | Description |
---|---|
System.Boolean |
IsEquivalent(EncodingInfo, EncodingInfo, Boolean)
Determines whether the two encodings are equivalent.
Declaration
public static bool IsEquivalent(EncodingInfo encoding1, EncodingInfo encoding2, bool restrictionsOnly)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding1 | The first encoding. |
EncodingInfo | encoding2 | The second encoding. |
System.Boolean | restrictionsOnly | Whether to check restrictions only. |
Returns
Type | Description |
---|---|
System.Boolean |
IsEquivalent(EncodingInfo, Boolean)
Determines whether the specified encoding is equivalent.
Declaration
public bool IsEquivalent(EncodingInfo encoding, bool restrictionsOnly)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding | The encoding. |
System.Boolean | restrictionsOnly | Whether to check restrictions only. |
Returns
Type | Description |
---|---|
System.Boolean |
Max(EncodingInfo, EncodingInfo)
Returns a new encoding with each value being the maximum of two input encodings.
Declaration
public static EncodingInfo Max(EncodingInfo encoding1, EncodingInfo encoding2)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding1 | The first encoding. |
EncodingInfo | encoding2 | The second encoding. |
Returns
Type | Description |
---|---|
EncodingInfo | A new encoding. |
Min(EncodingInfo, EncodingInfo)
Returns a new encoding with each value being the minimum of two input encodings.
Declaration
public static EncodingInfo Min(EncodingInfo encoding1, EncodingInfo encoding2)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding1 | The first encoding. |
EncodingInfo | encoding2 | The second encoding. |
Returns
Type | Description |
---|---|
EncodingInfo | A new encoding. |
SerializeProperties(Dictionary<String, String>)
Serializes the properties.
Declaration
protected override void SerializeProperties(Dictionary<string, string> jsonObject)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | jsonObject | The JSON object. |
Overrides
ToJson()
Serializes this instance to JSON.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
System.String |
ToJson(EncodingInfo)
Serializes an instance to JSON.
Declaration
public static string ToJson(EncodingInfo encodingInfo)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encodingInfo | The instance to serialize. |
Returns
Type | Description |
---|---|
System.String | The serialized JSON. |
ToJsonArray(EncodingInfo[])
Serializes an array to JSON.
Declaration
public static string ToJsonArray(EncodingInfo[] encodingInfos)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo[] | encodingInfos | The array to serialize. |
Returns
Type | Description |
---|---|
System.String | The serialized JSON. |
ToSdpRidAttribute(EncodingInfo, String)
Converts an instance into an SDP RID attribute.
Declaration
public static RidAttribute ToSdpRidAttribute(EncodingInfo encoding, string direction)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding | The encoding. |
System.String | direction | The direction. |
Returns
Type | Description |
---|---|
RidAttribute |
ToSdpRidAttribute(EncodingInfo, String, Boolean)
Converts an instance into an SDP RID attribute.
Declaration
public static RidAttribute ToSdpRidAttribute(EncodingInfo encoding, string direction, bool includeRestrictions)
Parameters
Type | Name | Description |
---|---|---|
EncodingInfo | encoding | The encoding. |
System.String | direction | The direction. |
System.Boolean | includeRestrictions | Whether to include restrictions. |
Returns
Type | Description |
---|---|
RidAttribute |
ToSdpRidAttribute(String)
Converts this instance into an SDP RID attribute.
Declaration
public RidAttribute ToSdpRidAttribute(string direction)
Parameters
Type | Name | Description |
---|---|---|
System.String | direction | The direction. |
Returns
Type | Description |
---|---|
RidAttribute |
ToSdpRidAttribute(String, Boolean)
Converts this instance into an SDP RID attribute.
Declaration
public RidAttribute ToSdpRidAttribute(string direction, bool includeRestrictions)
Parameters
Type | Name | Description |
---|---|---|
System.String | direction | The direction. |
System.Boolean | includeRestrictions | Whether to include restrictions. |
Returns
Type | Description |
---|---|
RidAttribute |
ToString()
Returns a string that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string that represents this instance. |