Class MediaReceiverStats
Media receiver stats.
Implements
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class MediaReceiverStats : MediaComponentStats, IEquivalent<MediaReceiverStats>
Properties
BytesReceived
Gets the number of bytes received.
Declaration
public long BytesReceived { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
Jitter
Gets the jitter in milliseconds.
Declaration
public int Jitter { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
NetworkQuality
Gets the receiver's estimated network quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Declaration
public double NetworkQuality { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
PacketsDiscarded
Gets the number of packets discarded.
Declaration
public long PacketsDiscarded { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
PacketsDuplicated
Gets the number of packets duplicated.
Declaration
public long PacketsDuplicated { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
PacketsLost
Gets the number of packets lost.
Declaration
public long PacketsLost { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
PacketsReceived
Gets the number of packets received.
Declaration
public long PacketsReceived { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
PacketsRepaired
Gets the number of packets repaired.
Declaration
public long PacketsRepaired { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
RoundTripTime
Gets the round trip time in milliseconds.
Declaration
public int RoundTripTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Sink
Gets the sink stats.
Declaration
public MediaSinkStats Sink { get; }
Property Value
| Type | Description |
|---|---|
| MediaSinkStats |
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)
Derializes media receiver stats from JSON.
Declaration
public static MediaReceiverStats FromJson(string mediaReceiverJson)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | mediaReceiverJson | The media receiver's stats JSON. |
Returns
| Type | Description |
|---|---|
| MediaReceiverStats |
FromJsonArray(String)
Derializes media receiver stats array from JSON.
Declaration
public static MediaReceiverStats[] FromJsonArray(string mediaReceiversJson)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | mediaReceiversJson | The media receivers' stats JSON. |
Returns
| Type | Description |
|---|---|
| MediaReceiverStats[] |
GetMediaQuality(Boolean)
Gets the receiver's estimated media quality.
The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.
Declaration
public override double GetMediaQuality(bool audio)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | audio | Whether these are audio stats. |
Returns
| Type | Description |
|---|---|
| System.Double |
Overrides
IsEquivalent(MediaReceiverStats)
Checks if a media receiver is equivalent to this one.
Declaration
public bool IsEquivalent(MediaReceiverStats instance)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaReceiverStats | instance | The media receiver. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
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 to JSON.
Declaration
public string ToJson()
Returns
| Type | Description |
|---|---|
| System.String |
ToJson(MediaReceiverStats)
Serializes media receiver stats to JSON.
Declaration
public static string ToJson(MediaReceiverStats mediaReceiver)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaReceiverStats | mediaReceiver | The media receiver's stats. |
Returns
| Type | Description |
|---|---|
| System.String |
ToJsonArray(MediaReceiverStats[])
Serializes media receiver stats array to JSON.
Declaration
public static string ToJsonArray(MediaReceiverStats[] mediaReceivers)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaReceiverStats[] | mediaReceivers | The media receivers' stats. |
Returns
| Type | Description |
|---|---|
| System.String |