SimpleBitrateRegulator

class SimpleBitrateRegulator(metricsTracker: EndpointMetricsTracker, bitrateRegulatorConfig: BitrateRegulatorConfig, onVideoTargetBitrateChange: (Int) -> Unit, onAudioTargetBitrateChange: (Int) -> Unit) : BitrateRegulator(source)

A BitrateRegulator that reduce video bitrate when packets are lost.

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(metricsTracker: EndpointMetricsTracker, bitrateRegulatorConfig: BitrateRegulatorConfig, onVideoTargetBitrateChange: (Int) -> Unit, onAudioTargetBitrateChange: (Int) -> Unit)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Factory interface you must use to create a SimpleBitrateRegulator object. If you want to create a custom RTMP bitrate regulation implementation, create a factory that implements this interface.

Properties

Link copied to clipboard
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
open override fun update(currentVideoBitrate: Int, currentAudioBitrate: Int)

Called regularly to get new endpoint metrics