Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1737)

Unified Diff: webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h

Issue 2745473003: Resolve cyclic dependency between audio network adaptor and event log api (Closed)
Patch Set: Revert "Activated checks for rtc_event_log_api" Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h
diff --git a/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h b/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h
index 0ad4a1e5f3b510380ed53da90666a40821fdf8c7..2ef88542ee7993286f1dd0237b717ff94059f3f4 100644
--- a/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h
+++ b/webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h
@@ -15,28 +15,29 @@
namespace webrtc {
+struct AudioEncoderRuntimeConfig {
+ AudioEncoderRuntimeConfig();
+ AudioEncoderRuntimeConfig(const AudioEncoderRuntimeConfig& other);
+ ~AudioEncoderRuntimeConfig();
+ rtc::Optional<int> bitrate_bps;
+ rtc::Optional<int> frame_length_ms;
+ // Note: This is what we tell the encoder. It doesn't have to reflect
+ // the actual NetworkMetrics; it's subject to our decision.
+ rtc::Optional<float> uplink_packet_loss_fraction;
+ rtc::Optional<bool> enable_fec;
+ rtc::Optional<bool> enable_dtx;
+
+ // Some encoders can encode fewer channels than the actual input to make
+ // better use of the bandwidth. |num_channels| sets the number of channels
+ // to encode.
+ rtc::Optional<size_t> num_channels;
+};
+
// An AudioNetworkAdaptor optimizes the audio experience by suggesting a
// suitable runtime configuration (bit rate, frame length, FEC, etc.) to the
// encoder based on network metrics.
class AudioNetworkAdaptor {
public:
- struct EncoderRuntimeConfig {
- EncoderRuntimeConfig();
- EncoderRuntimeConfig(const EncoderRuntimeConfig& other);
- ~EncoderRuntimeConfig();
- rtc::Optional<int> bitrate_bps;
- rtc::Optional<int> frame_length_ms;
- // Note: This is what we tell the encoder. It doesn't have to reflect
- // the actual NetworkMetrics; it's subject to our decision.
- rtc::Optional<float> uplink_packet_loss_fraction;
- rtc::Optional<bool> enable_fec;
- rtc::Optional<bool> enable_dtx;
-
- // Some encoders can encode fewer channels than the actual input to make
- // better use of the bandwidth. |num_channels| sets the number of channels
- // to encode.
- rtc::Optional<size_t> num_channels;
- };
virtual ~AudioNetworkAdaptor() = default;
@@ -54,7 +55,7 @@ class AudioNetworkAdaptor {
virtual void SetOverhead(size_t overhead_bytes_per_packet) = 0;
- virtual EncoderRuntimeConfig GetEncoderRuntimeConfig() = 0;
+ virtual AudioEncoderRuntimeConfig GetEncoderRuntimeConfig() = 0;
virtual void StartDebugDump(FILE* file_handle) = 0;

Powered by Google App Engine
This is Rietveld 408576698