A simple configuration for congestion control. (#305)

This commit is contained in:
Raja Subramanian
2021-12-31 00:26:29 +05:30
committed by GitHub
parent 107e7bbb39
commit 98586c2490
8 changed files with 254 additions and 108 deletions
+11
View File
@@ -65,6 +65,8 @@ type RTCConfig struct {
// Which side runs bandwidth estimation
UseSendSideBWE bool `yaml:"send_side_bandwidth_estimation"`
CongestionControl CongestionControlConfig `yaml:"congestion_control"`
}
type PLIThrottleConfig struct {
@@ -73,6 +75,11 @@ type PLIThrottleConfig struct {
HighQuality time.Duration `yaml:"high_quality"`
}
type CongestionControlConfig struct {
Enabled bool `yaml:"enabled"`
AllowPause bool `yaml:"allow_pause"`
}
type AudioConfig struct {
// minimum level to be considered active, 0-127, where 0 is loudest
ActiveLevel uint8 `yaml:"active_level"`
@@ -158,6 +165,10 @@ func NewConfig(confString string, c *cli.Context) (*Config, error) {
MidQuality: time.Second,
HighQuality: time.Second,
},
CongestionControl: CongestionControlConfig{
Enabled: true,
AllowPause: true,
},
},
Audio: AudioConfig{
ActiveLevel: 30, // -30dBov = 0.03