Class MediaTrackStats
Media track stats.
Implements
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class MediaTrackStats : BaseStats, IEquivalent<MediaTrackStats>
Properties
Bitrate
Gets the bitrate. Set by the encoder.
Declaration
public int Bitrate { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Detached
Gets whether the track is detached.
Declaration
public bool Detached { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
ExpectedFrameRate
Gets the expected frame rate. Video-only. Set by the stream.
Declaration
public double ExpectedFrameRate { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
FrameHeight
Gets the frame height. Video-only. Set by the encoder or decoder.
Declaration
public int FrameHeight { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
FrameRate
Gets the number of decoded frames in the last second. Video-only. Set by the encoder or decoder.
Declaration
public double FrameRate { get; }
Property Value
| Type | Description |
|---|---|
| System.Double |
FramesCorrupted
Gets the number of corrupted frames. Video-only. Set by the depacketizer.
Declaration
public long FramesCorrupted { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
FramesDecoded
Gets the number of frames decoded. Set by the decoder.
Declaration
public long FramesDecoded { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
FramesDropped
Gets the number of frames dropped. Video-only. Set by the depacketizer.
Declaration
public long FramesDropped { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
FramesEncoded
Gets the number of frames encoded. Set by the encoder.
Declaration
public long FramesEncoded { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
FramesReceived
Gets the number of frames received. Set by the depacketizer.
Declaration
public long FramesReceived { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
FramesSent
Gets the number of frames sent. Set by the packetizer.
Declaration
public long FramesSent { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
FrameWidth
Gets the frame width. Video-only. Set by the encoder or decoder.
Declaration
public int FrameWidth { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MaxBitrate
Gets the maximum bitrate. Set by the encoder.
Declaration
public int MaxBitrate { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
MinBitrate
Gets the minimum bitrate. Set by the encoder.
Declaration
public int MinBitrate { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Muted
Gets whether the track is muted.
Declaration
public bool Muted { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
RepairedRtpStreamId
Gets the first repaired RTP stream identifier.
Declaration
public string RepairedRtpStreamId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
RepairedRtpStreamIds
Gets the repaired RTP stream identifiers.
Declaration
public string[] RepairedRtpStreamIds { get; }
Property Value
| Type | Description |
|---|---|
| System.String[] |
RtpStreamId
Gets the first RTP stream identifier.
Declaration
public string RtpStreamId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
RtpStreamIds
Gets the RTP stream identifiers.
Declaration
public string[] RtpStreamIds { get; }
Property Value
| Type | Description |
|---|---|
| System.String[] |
Stopped
Gets whether the track is stopped. Set by source.
Declaration
public bool Stopped { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SynchronizationSource
Gets the first synchronization source.
Declaration
public long SynchronizationSource { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64 |
SynchronizationSources
Gets the synchronization sources.
Declaration
public long[] SynchronizationSources { get; }
Property Value
| Type | Description |
|---|---|
| System.Int64[] |
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 track stats from JSON.
Declaration
public static MediaTrackStats FromJson(string mediaTrackJson)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | mediaTrackJson | The media track's stats JSON. |
Returns
| Type | Description |
|---|---|
| MediaTrackStats |
FromJsonArray(String)
Derializes an array of media track stats from JSON.
Declaration
public static MediaTrackStats[] FromJsonArray(string mediaTracksJson)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | mediaTracksJson | The media tracks' stats JSON. |
Returns
| Type | Description |
|---|---|
| MediaTrackStats[] |
GetMediaQuality(Boolean)
Gets the track'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 double GetMediaQuality(bool audio)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | audio | Whether these are audio stats. |
Returns
| Type | Description |
|---|---|
| System.Double |
IsEquivalent(MediaTrackStats)
Checks if a track is equivalent to this one.
Declaration
public bool IsEquivalent(MediaTrackStats instance)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaTrackStats | instance | The track. |
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 |
|---|---|---|
| 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(MediaTrackStats)
Serializes media track stats to JSON.
Declaration
public static string ToJson(MediaTrackStats mediaTrack)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaTrackStats | mediaTrack | The media track's stats. |
Returns
| Type | Description |
|---|---|
| System.String |
ToJsonArray(MediaTrackStats[])
Serializes an array of media track stats to JSON.
Declaration
public static string ToJsonArray(MediaTrackStats[] mediaTracks)
Parameters
| Type | Name | Description |
|---|---|---|
| MediaTrackStats[] | mediaTracks | The media tracks' stats. |
Returns
| Type | Description |
|---|---|
| System.String |