• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 #ifndef MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_CONFIG_H_
12 #define MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_CONFIG_H_
13 
14 #include <stddef.h>
15 
16 #include "absl/types/optional.h"
17 
18 namespace webrtc {
19 
20 struct AudioEncoderRuntimeConfig {
21   AudioEncoderRuntimeConfig();
22   AudioEncoderRuntimeConfig(const AudioEncoderRuntimeConfig& other);
23   ~AudioEncoderRuntimeConfig();
24   AudioEncoderRuntimeConfig& operator=(const AudioEncoderRuntimeConfig& other);
25   bool operator==(const AudioEncoderRuntimeConfig& other) const;
26   absl::optional<int> bitrate_bps;
27   absl::optional<int> frame_length_ms;
28   // Note: This is what we tell the encoder. It doesn't have to reflect
29   // the actual NetworkMetrics; it's subject to our decision.
30   absl::optional<float> uplink_packet_loss_fraction;
31   absl::optional<bool> enable_fec;
32   absl::optional<bool> enable_dtx;
33 
34   // Some encoders can encode fewer channels than the actual input to make
35   // better use of the bandwidth. |num_channels| sets the number of channels
36   // to encode.
37   absl::optional<size_t> num_channels;
38 
39   // This is true if the last frame length change was an increase, and otherwise
40   // false.
41   // The value of this boolean is used to apply a different offset to the
42   // per-packet overhead that is reported by the BWE. The exact offset value
43   // is most important right after a frame length change, because the frame
44   // length change affects the overhead. In the steady state, the exact value is
45   // not important because the BWE will compensate.
46   bool last_fl_change_increase = false;
47 };
48 
49 }  // namespace webrtc
50 
51 #endif  // MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_CONFIG_H_
52