fm.liveswitch.MediaTrackStats Class Reference

Media track stats. More...

Public Member Functions

int getBitrate ()
 Gets the bitrate. More...
 
boolean getDetached ()
 Gets whether the track is detached. More...
 
int getFrameHeight ()
 Gets the frame height. More...
 
double getFrameRate ()
 Gets the frame rate. More...
 
long getFramesCorrupted ()
 Gets the number of corrupted frames. More...
 
long getFramesDecoded ()
 Gets the number of frames decoded. More...
 
long getFramesDropped ()
 Gets the number of frames dropped. More...
 
long getFramesEncoded ()
 Gets the number of frames encoded. More...
 
long getFramesReceived ()
 Gets the number of frames received. More...
 
long getFramesSent ()
 Gets the number of frames sent. More...
 
int getFrameWidth ()
 Gets the frame width. More...
 
int getMaxBitrate ()
 Gets the maximum bitrate. More...
 
int getMinBitrate ()
 Gets the minimum bitrate. More...
 
boolean getMuted ()
 Gets whether the track is muted. More...
 
String getRepairedRtpStreamId ()
 Gets the first repaired RTP stream identifier. More...
 
String[] getRepairedRtpStreamIds ()
 Gets the repaired RTP stream identifiers. More...
 
String getRtpStreamId ()
 Gets the first RTP stream identifier. More...
 
String[] getRtpStreamIds ()
 Gets the RTP stream identifiers. More...
 
boolean getStopped ()
 Gets whether the track is stopped. More...
 
long getSynchronizationSource ()
 Gets the first synchronization source. More...
 
long[] getSynchronizationSources ()
 Gets the synchronization sources. More...
 
boolean isEquivalent (fm.liveswitch.MediaTrackStats instance)
 Checks if a track is equivalent to this one. More...
 
 MediaTrackStats ()
 
String toJson ()
 Serializes this to JSON. More...
 
- Public Member Functions inherited from fm.liveswitch.BaseStats
String getId ()
 Gets the identifier of the object generating these stats. More...
 
java.util.Date getTimestamp ()
 Gets the timestamp when these stats were generated. More...
 
- Public Member Functions inherited from fm.liveswitch.IEquivalent< fm.liveswitch.MediaTrackStats >
abstract boolean isEquivalent (T instance)
 Checks if an instance is equivalent to this one. More...
 

Static Public Member Functions

static fm.liveswitch.MediaTrackStats fromJson (String mediaTrackJson)
 Derializes media track stats from JSON. More...
 
static fm.liveswitch.MediaTrackStats[] fromJsonArray (String mediaTracksJson)
 Derializes an array of media track stats from JSON. More...
 
static String toJson (fm.liveswitch.MediaTrackStats mediaTrack)
 Serializes media track stats to JSON. More...
 
static String toJsonArray (fm.liveswitch.MediaTrackStats[] mediaTracks)
 Serializes an array of media track stats to JSON. More...
 

Protected Member Functions

void deserializeProperties (String key, String valueJson)
 Deserializes the properties. More...
 
void serializeProperties (java.util.HashMap< String, String > jsonObject)
 Serializes the properties. More...
 
- Protected Member Functions inherited from fm.liveswitch.BaseStats
 BaseStats ()
 

Detailed Description

Media track stats.

Constructor & Destructor Documentation

◆ MediaTrackStats()

fm.liveswitch.MediaTrackStats.MediaTrackStats ( )

Member Function Documentation

◆ deserializeProperties()

void fm.liveswitch.MediaTrackStats.deserializeProperties ( String  key,
String  valueJson 
)
protected

Deserializes the properties.

Parameters
keyThe key.
valueJsonThe value in JSON format.

Reimplemented from fm.liveswitch.BaseStats.

◆ fromJson()

static fm.liveswitch.MediaTrackStats fm.liveswitch.MediaTrackStats.fromJson ( String  mediaTrackJson)
static

Derializes media track stats from JSON.

Parameters
mediaTrackJsonThe media track's stats JSON.

◆ fromJsonArray()

static fm.liveswitch.MediaTrackStats [] fm.liveswitch.MediaTrackStats.fromJsonArray ( String  mediaTracksJson)
static

Derializes an array of media track stats from JSON.

Parameters
mediaTracksJsonThe media tracks' stats JSON.

◆ getBitrate()

int fm.liveswitch.MediaTrackStats.getBitrate ( )

Gets the bitrate.

Set by the encoder.

◆ getDetached()

boolean fm.liveswitch.MediaTrackStats.getDetached ( )

Gets whether the track is detached.

◆ getFrameHeight()

int fm.liveswitch.MediaTrackStats.getFrameHeight ( )

Gets the frame height.

Video-only. Set by encoder or decoder.

◆ getFrameRate()

double fm.liveswitch.MediaTrackStats.getFrameRate ( )

Gets the frame rate.

Video-only. Set by encoder or decoder.

◆ getFramesCorrupted()

long fm.liveswitch.MediaTrackStats.getFramesCorrupted ( )

Gets the number of corrupted frames.

Video-only. Set by depacketizer.

◆ getFramesDecoded()

long fm.liveswitch.MediaTrackStats.getFramesDecoded ( )

Gets the number of frames decoded.

Set by decoder.

◆ getFramesDropped()

long fm.liveswitch.MediaTrackStats.getFramesDropped ( )

Gets the number of frames dropped.

Video-only. Set by depacketizer.

◆ getFramesEncoded()

long fm.liveswitch.MediaTrackStats.getFramesEncoded ( )

Gets the number of frames encoded.

Set by encoder.

◆ getFramesReceived()

long fm.liveswitch.MediaTrackStats.getFramesReceived ( )

Gets the number of frames received.

Set by depacketizer.

◆ getFramesSent()

long fm.liveswitch.MediaTrackStats.getFramesSent ( )

Gets the number of frames sent.

Set by packetizer.

◆ getFrameWidth()

int fm.liveswitch.MediaTrackStats.getFrameWidth ( )

Gets the frame width.

Video-only. Set by encoder or decoder.

◆ getMaxBitrate()

int fm.liveswitch.MediaTrackStats.getMaxBitrate ( )

Gets the maximum bitrate.

Set by the encoder.

◆ getMinBitrate()

int fm.liveswitch.MediaTrackStats.getMinBitrate ( )

Gets the minimum bitrate.

Set by the encoder.

◆ getMuted()

boolean fm.liveswitch.MediaTrackStats.getMuted ( )

Gets whether the track is muted.

◆ getRepairedRtpStreamId()

String fm.liveswitch.MediaTrackStats.getRepairedRtpStreamId ( )

Gets the first repaired RTP stream identifier.

◆ getRepairedRtpStreamIds()

String [] fm.liveswitch.MediaTrackStats.getRepairedRtpStreamIds ( )

Gets the repaired RTP stream identifiers.

◆ getRtpStreamId()

String fm.liveswitch.MediaTrackStats.getRtpStreamId ( )

Gets the first RTP stream identifier.

◆ getRtpStreamIds()

String [] fm.liveswitch.MediaTrackStats.getRtpStreamIds ( )

Gets the RTP stream identifiers.

◆ getStopped()

boolean fm.liveswitch.MediaTrackStats.getStopped ( )

Gets whether the track is stopped.

Set by source.

◆ getSynchronizationSource()

long fm.liveswitch.MediaTrackStats.getSynchronizationSource ( )

Gets the first synchronization source.

◆ getSynchronizationSources()

long [] fm.liveswitch.MediaTrackStats.getSynchronizationSources ( )

Gets the synchronization sources.

◆ isEquivalent()

boolean fm.liveswitch.MediaTrackStats.isEquivalent ( fm.liveswitch.MediaTrackStats  instance)

Checks if a track is equivalent to this one.

Parameters
instanceThe track.

◆ serializeProperties()

void fm.liveswitch.MediaTrackStats.serializeProperties ( java.util.HashMap< String, String >  jsonObject)
protected

Serializes the properties.

Parameters
jsonObjectThe JSON object.

Reimplemented from fm.liveswitch.BaseStats.

◆ toJson() [1/2]

String fm.liveswitch.MediaTrackStats.toJson ( )

Serializes this to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.MediaTrackStats.toJson ( fm.liveswitch.MediaTrackStats  mediaTrack)
static

Serializes media track stats to JSON.

Parameters
mediaTrackThe media track's stats.

◆ toJsonArray()

static String fm.liveswitch.MediaTrackStats.toJsonArray ( fm.liveswitch.MediaTrackStats[]  mediaTracks)
static

Serializes an array of media track stats to JSON.

Parameters
mediaTracksThe media tracks' stats.