FMLiveSwitchMediaTrackStats Class Reference

Media track stats. More...

Instance Methods

(int) - bitrate
 Gets the bitrate. More...
 
(void) - deserializePropertiesWithKey:valueJson:
 Deserializes the properties. More...
 
(bool) - detached
 Gets whether the track is detached. More...
 
(double) - expectedFrameRate
 Gets the expected frame rate. More...
 
(int) - frameHeight
 Gets the frame height. More...
 
(double) - frameRate
 Gets the number of decoded frames in the last second. More...
 
(long long) - framesCorrupted
 Gets the number of corrupted frames. More...
 
(long long) - framesDecoded
 Gets the number of frames decoded. More...
 
(long long) - framesDropped
 Gets the number of frames dropped. More...
 
(long long) - framesEncoded
 Gets the number of frames encoded. More...
 
(long long) - framesReceived
 Gets the number of frames received. More...
 
(long long) - framesSent
 Gets the number of frames sent. More...
 
(int) - frameWidth
 Gets the frame width. More...
 
(double) - getMediaQualityWithAudio:
 Gets the track's estimated media quality. More...
 
(instancetype) - init
 
(bool) - isEquivalentWithInstance:
 Checks if a track is equivalent to this one. More...
 
(int) - maxBitrate
 Gets the maximum bitrate. More...
 
(int) - minBitrate
 Gets the minimum bitrate. More...
 
(bool) - muted
 Gets whether the track is muted. More...
 
(NSString *) - repairedRtpStreamId
 Gets the first repaired RTP stream identifier. More...
 
(NSMutableArray *) - repairedRtpStreamIds
 Gets the repaired RTP stream identifiers. More...
 
(NSString *) - rtpStreamId
 Gets the first RTP stream identifier. More...
 
(NSMutableArray *) - rtpStreamIds
 Gets the RTP stream identifiers. More...
 
(void) - serializePropertiesWithJsonObject:
 Serializes the properties. More...
 
(bool) - stopped
 Gets whether the track is stopped. More...
 
(long long) - synchronizationSource
 Gets the first synchronization source. More...
 
(NSMutableArray *) - synchronizationSources
 Gets the synchronization sources. More...
 
(NSString *) - toJson
 Serializes this to JSON. More...
 
- Instance Methods inherited from FMLiveSwitchBaseStats
(NSString *) - id
 Gets the identifier of the object generating these stats. More...
 
(NSDate *) - timestamp
 Gets the timestamp when these stats were generated. More...
 
- Instance Methods inherited from <FMLiveSwitchIEquivalent>
(bool) - isEquivalentWithInstance:
 Checks if an instance is equivalent to this one. More...
 

Class Methods

(NSMutableArray *) + fromJsonArrayWithMediaTracksJson:
 Derializes an array of media track stats from JSON. More...
 
(FMLiveSwitchMediaTrackStats *) + fromJsonWithMediaTrackJson:
 Derializes media track stats from JSON. More...
 
(FMLiveSwitchMediaTrackStats *) + mediaTrackStats
 
(NSString *) + toJsonArrayWithMediaTracks:
 Serializes an array of media track stats to JSON. More...
 
(NSString *) + toJsonWithMediaTrack:
 Serializes media track stats to JSON. More...
 
- Class Methods inherited from FMLiveSwitchBaseStats
(FMLiveSwitchBaseStats *) + baseStats
 

Detailed Description

Media track stats.

Method Documentation

◆ bitrate

- (int) bitrate

Gets the bitrate.

Set by the encoder.

◆ deserializePropertiesWithKey:valueJson:

- (void) deserializePropertiesWithKey: (NSString *)  key
valueJson: (NSString *)  valueJson 

Deserializes the properties.

Parameters
keyThe key.
valueJsonThe value in JSON format.

Implements FMLiveSwitchBaseStats.

◆ detached

- (bool) detached

Gets whether the track is detached.

◆ expectedFrameRate

- (double) expectedFrameRate

Gets the expected frame rate.

Video-only. Set by the stream.

◆ frameHeight

- (int) frameHeight

Gets the frame height.

Video-only. Set by the encoder or decoder.

◆ frameRate

- (double) frameRate

Gets the number of decoded frames in the last second.

Video-only. Set by the encoder or decoder.

◆ framesCorrupted

- (long long) framesCorrupted

Gets the number of corrupted frames.

Video-only. Set by the depacketizer.

◆ framesDecoded

- (long long) framesDecoded

Gets the number of frames decoded.

Set by the decoder.

◆ framesDropped

- (long long) framesDropped

Gets the number of frames dropped.

Video-only. Set by the depacketizer.

◆ framesEncoded

- (long long) framesEncoded

Gets the number of frames encoded.

Set by the encoder.

◆ framesReceived

- (long long) framesReceived

Gets the number of frames received.

Set by the depacketizer.

◆ framesSent

- (long long) framesSent

Gets the number of frames sent.

Set by the packetizer.

◆ frameWidth

- (int) frameWidth

Gets the frame width.

Video-only. Set by the encoder or decoder.

◆ fromJsonArrayWithMediaTracksJson:

+ (NSMutableArray*) fromJsonArrayWithMediaTracksJson: (NSString *)  mediaTracksJson

Derializes an array of media track stats from JSON.

Parameters
mediaTracksJsonThe media tracks' stats JSON.

◆ fromJsonWithMediaTrackJson:

+ (FMLiveSwitchMediaTrackStats*) fromJsonWithMediaTrackJson: (NSString *)  mediaTrackJson

Derializes media track stats from JSON.

Parameters
mediaTrackJsonThe media track's stats JSON.

◆ getMediaQualityWithAudio:

- (double) getMediaQualityWithAudio: (bool)  audio

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.

Parameters
audioWhether these are audio stats.

◆ init

- (instancetype) init

Implements FMLiveSwitchBaseStats.

◆ isEquivalentWithInstance:

- (bool) isEquivalentWithInstance: (FMLiveSwitchMediaTrackStats *)  instance

Checks if a track is equivalent to this one.

Parameters
instanceThe track.

◆ maxBitrate

- (int) maxBitrate

Gets the maximum bitrate.

Set by the encoder.

◆ mediaTrackStats

+ (FMLiveSwitchMediaTrackStats*) mediaTrackStats

◆ minBitrate

- (int) minBitrate

Gets the minimum bitrate.

Set by the encoder.

◆ muted

- (bool) muted

Gets whether the track is muted.

◆ repairedRtpStreamId

- (NSString*) repairedRtpStreamId

Gets the first repaired RTP stream identifier.

◆ repairedRtpStreamIds

- (NSMutableArray*) repairedRtpStreamIds

Gets the repaired RTP stream identifiers.

◆ rtpStreamId

- (NSString*) rtpStreamId

Gets the first RTP stream identifier.

◆ rtpStreamIds

- (NSMutableArray*) rtpStreamIds

Gets the RTP stream identifiers.

◆ serializePropertiesWithJsonObject:

- (void) serializePropertiesWithJsonObject: (NSMutableDictionary< NSString *, NSString * > *)  jsonObject

Serializes the properties.

Parameters
jsonObjectThe JSON object.

Implements FMLiveSwitchBaseStats.

◆ stopped

- (bool) stopped

Gets whether the track is stopped.

Set by source.

◆ synchronizationSource

- (long long) synchronizationSource

Gets the first synchronization source.

◆ synchronizationSources

- (NSMutableArray*) synchronizationSources

Gets the synchronization sources.

◆ toJson

- (NSString*) toJson

Serializes this to JSON.

◆ toJsonArrayWithMediaTracks:

+ (NSString*) toJsonArrayWithMediaTracks: (NSMutableArray *)  mediaTracks

Serializes an array of media track stats to JSON.

Parameters
mediaTracksThe media tracks' stats.

◆ toJsonWithMediaTrack:

+ (NSString*) toJsonWithMediaTrack: (FMLiveSwitchMediaTrackStats *)  mediaTrack

Serializes media track stats to JSON.

Parameters
mediaTrackThe media track's stats.