fm.liveswitch.MediaStreamStats Class Reference

Media stream stats. More...

Public Member Functions

fm.liveswitch.StreamDirection getDirection ()
 Gets the direction. More...
 
int getMaxReceiveBitrate ()
 Gets the max receive bitrate. More...
 
int getMaxSendBitrate ()
 Gets the max send bitrate. More...
 
double getMediaQuality ()
 Gets the stream's estimated media quality as the minimum of the sender media quality and the receiver media quality. More...
 
double getNetworkQuality ()
 Gets the stream's estimated network quality as the minimum of the fm.liveswitch.MediaStreamStats#getSenderNetworkQuality and the fm.liveswitch.MediaStreamStats#getReceiverNetworkQuality. More...
 
fm.liveswitch.MediaReceiverStats getReceiver ()
 Gets the first receiver's stats. More...
 
double getReceiverMediaQuality ()
 Gets the receivers' minimum estimated media quality. More...
 
double getReceiverNetworkQuality ()
 Gets the receivers' minimum estimated network quality. More...
 
double getReceiverNetworkScore ()
 Gets the receivers' estimated network score. More...
 
fm.liveswitch.MediaReceiverStats[] getReceivers ()
 Gets the receivers' stats. More...
 
fm.liveswitch.MediaSenderStats getSender ()
 Gets the first sender's stats. More...
 
double getSenderMediaQuality ()
 Gets the senders' minimum estimated media quality. More...
 
double getSenderNetworkQuality ()
 Gets the senders' minimum estimated network quality. More...
 
fm.liveswitch.MediaSenderStats[] getSenders ()
 Gets the senders' stats. More...
 
 MediaStreamStats ()
 
String toJson ()
 Serializes this to JSON. More...
 
- Public Member Functions inherited from fm.liveswitch.StreamStats
boolean getIsHost ()
 Gets whether the transport's active candidate pair has a host candidate. More...
 
boolean getIsReflexive ()
 Gets whether the transport's active candidate pair has a reflexive candidate. More...
 
boolean getIsRelayed ()
 Gets whether the transport's active candidate pair has a relayed candidate. More...
 
fm.liveswitch.TransportStats getTransport ()
 Gets the transport's stats. More...
 
fm.liveswitch.StreamType getType ()
 Gets the type. 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.MediaStreamStats fromJson (String mediaStreamJson)
 Derializes media stream stats from JSON. More...
 
static fm.liveswitch.MediaStreamStats[] fromJsonArray (String mediaStreamsJson)
 Derializes an array of media stream stats from JSON. More...
 
static String toJson (fm.liveswitch.MediaStreamStats mediaStream)
 Serializes media stream stats to JSON. More...
 
static String toJsonArray (fm.liveswitch.MediaStreamStats[] mediaStreams)
 Serializes an array of media stream 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.StreamStats
 StreamStats ()
 
- Protected Member Functions inherited from fm.liveswitch.BaseStats
 BaseStats ()
 

Detailed Description

Media stream stats.

Constructor & Destructor Documentation

◆ MediaStreamStats()

fm.liveswitch.MediaStreamStats.MediaStreamStats ( )

Member Function Documentation

◆ deserializeProperties()

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

Deserializes the properties.

Parameters
keyThe key.
valueJsonThe value in JSON format.

Reimplemented from fm.liveswitch.StreamStats.

◆ fromJson()

static fm.liveswitch.MediaStreamStats fm.liveswitch.MediaStreamStats.fromJson ( String  mediaStreamJson)
static

Derializes media stream stats from JSON.

Parameters
mediaStreamJsonThe media stream's stats JSON.

◆ fromJsonArray()

static fm.liveswitch.MediaStreamStats [] fm.liveswitch.MediaStreamStats.fromJsonArray ( String  mediaStreamsJson)
static

Derializes an array of media stream stats from JSON.

Parameters
mediaStreamsJsonThe media streams' stats JSON.

◆ getDirection()

fm.liveswitch.StreamDirection fm.liveswitch.MediaStreamStats.getDirection ( )

Gets the direction.

◆ getMaxReceiveBitrate()

int fm.liveswitch.MediaStreamStats.getMaxReceiveBitrate ( )

Gets the max receive bitrate.

◆ getMaxSendBitrate()

int fm.liveswitch.MediaStreamStats.getMaxSendBitrate ( )

Gets the max send bitrate.

◆ getMediaQuality()

double fm.liveswitch.MediaStreamStats.getMediaQuality ( )

Gets the stream's estimated media quality as the minimum of the sender media quality and the receiver 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.

◆ getNetworkQuality()

double fm.liveswitch.MediaStreamStats.getNetworkQuality ( )

Gets the stream's estimated network quality as the minimum of the fm.liveswitch.MediaStreamStats#getSenderNetworkQuality and the fm.liveswitch.MediaStreamStats#getReceiverNetworkQuality.


The value ranges from 0.0 to 1.0, where 0.0 is the lowest quality and 1.0 is the highest quality.

◆ getReceiver()

fm.liveswitch.MediaReceiverStats fm.liveswitch.MediaStreamStats.getReceiver ( )

Gets the first receiver's stats.

◆ getReceiverMediaQuality()

double fm.liveswitch.MediaStreamStats.getReceiverMediaQuality ( )

Gets the receivers' minimum 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.

◆ getReceiverNetworkQuality()

double fm.liveswitch.MediaStreamStats.getReceiverNetworkQuality ( )

Gets the receivers' minimum 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.

◆ getReceiverNetworkScore()

double fm.liveswitch.MediaStreamStats.getReceiverNetworkScore ( )

Gets the receivers' estimated network score.


The value ranges from 1.0 to 5.0, where 1.0 is the lowest score and 5.0 is the highest score.

◆ getReceivers()

fm.liveswitch.MediaReceiverStats [] fm.liveswitch.MediaStreamStats.getReceivers ( )

Gets the receivers' stats.

◆ getSender()

fm.liveswitch.MediaSenderStats fm.liveswitch.MediaStreamStats.getSender ( )

Gets the first sender's stats.

◆ getSenderMediaQuality()

double fm.liveswitch.MediaStreamStats.getSenderMediaQuality ( )

Gets the senders' minimum 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.

◆ getSenderNetworkQuality()

double fm.liveswitch.MediaStreamStats.getSenderNetworkQuality ( )

Gets the senders' minimum 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.

◆ getSenders()

fm.liveswitch.MediaSenderStats [] fm.liveswitch.MediaStreamStats.getSenders ( )

Gets the senders' stats.

◆ serializeProperties()

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

Serializes the properties.

Parameters
jsonObjectThe JSON object.

Reimplemented from fm.liveswitch.StreamStats.

◆ toJson() [1/2]

String fm.liveswitch.MediaStreamStats.toJson ( )

Serializes this to JSON.

◆ toJson() [2/2]

static String fm.liveswitch.MediaStreamStats.toJson ( fm.liveswitch.MediaStreamStats  mediaStream)
static

Serializes media stream stats to JSON.

Parameters
mediaStreamThe media stream's stats.

◆ toJsonArray()

static String fm.liveswitch.MediaStreamStats.toJsonArray ( fm.liveswitch.MediaStreamStats[]  mediaStreams)
static

Serializes an array of media stream stats to JSON.

Parameters
mediaStreamsThe media streams' stats.