FMLiveSwitchBitrateMonitor Class Reference

A bitrate monitor. More...

Instance Methods

(double) - bitrate
 Gets the bitrate, in kbps. More...
 
(instancetype) - initWithSystemClock:
 Initializes a new instance of the FMLiveSwitchBitrateMonitor class. More...
 
(void) - reset
 Resets this instance. More...
 
(double) - smoothedBitrate
 Gets the smoothed bitrate, in kbps. More...
 
(NSObject< FMLiveSwitchISystemClock > *) - systemClock
 Gets the system clock. More...
 
(double) - testBitrateWithBitCount:
 Returns the new bitrate if a new sample is added. More...
 
(double) - testSmoothedBitrateWithBitCount:
 Returns the new bitrate if a new sample is added. More...
 
(void) - updateWithBitCount:
 Adds a sample. More...
 

Class Methods

(FMLiveSwitchBitrateMonitor *) + bitrateMonitorWithSystemClock:
 Initializes a new instance of the FMLiveSwitchBitrateMonitor class. More...
 

Detailed Description

A bitrate monitor.

Method Documentation

◆ bitrate

- (double) bitrate

Gets the bitrate, in kbps.

◆ bitrateMonitorWithSystemClock:

+ (FMLiveSwitchBitrateMonitor*) bitrateMonitorWithSystemClock: (NSObject< FMLiveSwitchISystemClock > *)  systemClock

Initializes a new instance of the FMLiveSwitchBitrateMonitor class.

Parameters
systemClockThe system clock.

◆ initWithSystemClock:

- (instancetype) initWithSystemClock: (NSObject< FMLiveSwitchISystemClock > *)  systemClock

Initializes a new instance of the FMLiveSwitchBitrateMonitor class.

Parameters
systemClockThe system clock.

◆ reset

- (void) reset

Resets this instance.

◆ smoothedBitrate

- (double) smoothedBitrate

Gets the smoothed bitrate, in kbps.

◆ systemClock

Gets the system clock.

◆ testBitrateWithBitCount:

- (double) testBitrateWithBitCount: (long long)  bitCount

Returns the new bitrate if a new sample is added.

Parameters
bitCountThe new bit count.

◆ testSmoothedBitrateWithBitCount:

- (double) testSmoothedBitrateWithBitCount: (long long)  bitCount

Returns the new bitrate if a new sample is added.

Parameters
bitCountThe new bit count.

◆ updateWithBitCount:

- (void) updateWithBitCount: (long long)  bitCount

Adds a sample.

This sample should be the total bits sent (or received) over the lifetime of the owning class. A sample should be added every time a packet is sent (or received).

Parameters
bitCountThe new bit count.