mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-06 21:04:11 +02:00
add passive estimator & REMB back. (#35)
This commit is contained in:
parent
0de8ffc773
commit
9936a04fea
4 changed files with 41 additions and 11 deletions
|
@ -28,6 +28,7 @@ type WebRTC struct {
|
|||
IpRetrievalUrl string
|
||||
|
||||
EstimatorEnabled bool
|
||||
EstimatorPassive bool
|
||||
EstimatorInitialBitrate int
|
||||
}
|
||||
|
||||
|
@ -79,6 +80,11 @@ func (WebRTC) Init(cmd *cobra.Command) error {
|
|||
return err
|
||||
}
|
||||
|
||||
cmd.PersistentFlags().Bool("webrtc.estimator.passive", false, "passive estimator mode, when it does not switch pipelines, only estimates")
|
||||
if err := viper.BindPFlag("webrtc.estimator.passive", cmd.PersistentFlags().Lookup("webrtc.estimator.passive")); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cmd.PersistentFlags().Int("webrtc.estimator.initial_bitrate", 1_000_000, "initial bitrate for the bandwidth estimator")
|
||||
if err := viper.BindPFlag("webrtc.estimator.initial_bitrate", cmd.PersistentFlags().Lookup("webrtc.estimator.initial_bitrate")); err != nil {
|
||||
return err
|
||||
|
@ -154,5 +160,6 @@ func (s *WebRTC) Set() {
|
|||
// bandwidth estimator
|
||||
|
||||
s.EstimatorEnabled = viper.GetBool("webrtc.estimator.enabled")
|
||||
s.EstimatorPassive = viper.GetBool("webrtc.estimator.passive")
|
||||
s.EstimatorInitialBitrate = viper.GetInt("webrtc.estimator.initial_bitrate")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue