BitrateRegulator

abstract class BitrateRegulator(val bitrateRegulatorConfig: BitrateRegulatorConfig, val onVideoTargetBitrateChange: (Int) -> Unit, val onAudioTargetBitrateChange: (Int) -> Unit) : IBitrateRegulator

Abstract class for the bitrate regulation implementation.

If you want to implement your custom bitrate regulator, it must inherit from this class. The bitrate regulator object is created by streamers through the IBitrateRegulator.Factory.

Parameters

bitrateRegulatorConfig

bitrate regulation configuration

onVideoTargetBitrateChange

call when you have to change video bitrate

onAudioTargetBitrateChange

call when you have to change audio bitrate

Constructors

Link copied to clipboard
constructor(bitrateRegulatorConfig: BitrateRegulatorConfig, onVideoTargetBitrateChange: (Int) -> Unit, onAudioTargetBitrateChange: (Int) -> Unit)

Properties

Link copied to clipboard
Link copied to clipboard
protected val onAudioTargetBitrateChange: (Int) -> Unit
Link copied to clipboard
protected val onVideoTargetBitrateChange: (Int) -> Unit

Functions

Link copied to clipboard
abstract fun update(stats: Any, currentVideoBitrate: Int, currentAudioBitrate: Int)

Calls regularly to get new stats