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... | |
A bitrate monitor.
- (double) bitrate |
Gets the bitrate, in kbps.
+ (FMLiveSwitchBitrateMonitor*) bitrateMonitorWithSystemClock: | (NSObject< FMLiveSwitchISystemClock > *) | systemClock |
Initializes a new instance of the FMLiveSwitchBitrateMonitor class.
systemClock | The system clock. |
- (instancetype) initWithSystemClock: | (NSObject< FMLiveSwitchISystemClock > *) | systemClock |
Initializes a new instance of the FMLiveSwitchBitrateMonitor class.
systemClock | The system clock. |
- (void) reset |
Resets this instance.
- (double) smoothedBitrate |
Gets the smoothed bitrate, in kbps.
- (NSObject<FMLiveSwitchISystemClock>*) systemClock |
Gets the system clock.
- (double) testBitrateWithBitCount: | (long long) | bitCount |
Returns the new bitrate if a new sample is added.
bitCount | The new bit count. |
- (double) testSmoothedBitrateWithBitCount: | (long long) | bitCount |
Returns the new bitrate if a new sample is added.
bitCount | The new bit count. |
- (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).
bitCount | The new bit count. |