SrtBitrateRegulator

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

Base class of 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 with the IBitrateRegulatorFactory.

Parameters

bitrateRegulatorConfig

bitrate regulation configuration

onVideoTargetBitrateChange

call when you have to change video bitrate

onAudioTargetBitrateChange

call when you have to change audio bitrate

Inheritors

Constructors

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

Functions

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

Call regularly to get new SRT stats