fm.liveswitch.MediaStats Class Reference

Media stats. More...

Public Member Functions

fm.liveswitch.MediaTrackStats getTrack ()
 Gets the first track's stats. More...
fm.liveswitch.MediaTrackStats getTrack (String trackId)
 Gets a track by its identifier. More...
fm.liveswitch.MediaTrackStats[] getTracks ()
 Gets the tracks' stats. More...
 MediaStats ()
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...

Static Public Member Functions

static fm.liveswitch.MediaStats fromJson (String mediaJson)
 Derializes media stats from JSON. More...
static String toJson (fm.liveswitch.MediaStats media)
 Serializes media 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 stats.

Constructor & Destructor Documentation

◆ MediaStats()

fm.liveswitch.MediaStats.MediaStats ( )

Member Function Documentation

◆ deserializeProperties()

void fm.liveswitch.MediaStats.deserializeProperties ( String  key,
String  valueJson 

Deserializes the properties.

keyThe key.
valueJsonThe value in JSON format.

Reimplemented from fm.liveswitch.BaseStats.

◆ fromJson()

static fm.liveswitch.MediaStats fm.liveswitch.MediaStats.fromJson ( String  mediaJson)

Derializes media stats from JSON.

mediaJsonThe media's stats JSON.

◆ getTrack() [1/2]

fm.liveswitch.MediaTrackStats fm.liveswitch.MediaStats.getTrack ( )

Gets the first track's stats.

◆ getTrack() [2/2]

fm.liveswitch.MediaTrackStats fm.liveswitch.MediaStats.getTrack ( String  trackId)

Gets a track by its identifier.

trackIdThe track identifier.

◆ getTracks()

fm.liveswitch.MediaTrackStats [] fm.liveswitch.MediaStats.getTracks ( )

Gets the tracks' stats.

◆ serializeProperties()

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

Serializes the properties.

jsonObjectThe JSON object.

Reimplemented from fm.liveswitch.BaseStats.

◆ toJson() [1/2]

String fm.liveswitch.MediaStats.toJson ( )

Serializes this to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.MediaStats.toJson ( fm.liveswitch.MediaStats  media)

Serializes media stats to JSON.

mediaThe media's stats.