Break the ANA build-target into ANA and ANA-config
This is done to solve a dependency-cycle with the RtcEventLog - now the RtcEventLog can depend on the config part of ANA, and be able to peer inside, while the implementation part of ANA can invoke the RtcEventLog. BUG=webrtc:8111 TBR=stefan@webrtc.org Review-Url: https://codereview.webrtc.org/3010343002 Cr-Commit-Position: refs/heads/master@{#19793}
This commit is contained in:
parent
adfc2795bb
commit
1e7dd31001
@ -881,9 +881,18 @@ if (rtc_enable_protobuf) {
|
||||
}
|
||||
}
|
||||
|
||||
rtc_static_library("audio_network_adaptor_config") {
|
||||
sources = [
|
||||
"audio_network_adaptor/audio_network_adaptor_config.cc",
|
||||
"audio_network_adaptor/include/audio_network_adaptor_config.h",
|
||||
]
|
||||
deps = [
|
||||
"../../api:optional",
|
||||
]
|
||||
}
|
||||
|
||||
rtc_static_library("audio_network_adaptor") {
|
||||
sources = [
|
||||
"audio_network_adaptor/audio_network_adaptor.cc",
|
||||
"audio_network_adaptor/audio_network_adaptor_impl.cc",
|
||||
"audio_network_adaptor/audio_network_adaptor_impl.h",
|
||||
"audio_network_adaptor/bitrate_controller.cc",
|
||||
@ -910,6 +919,10 @@ rtc_static_library("audio_network_adaptor") {
|
||||
"audio_network_adaptor/util/threshold_curve.h",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
":audio_network_adaptor_config",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"../..:webrtc_common",
|
||||
"../../api:optional",
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
|
||||
#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -13,27 +13,10 @@
|
||||
|
||||
#include "webrtc/api/audio_codecs/audio_encoder.h"
|
||||
#include "webrtc/api/optional.h"
|
||||
#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor_config.h"
|
||||
|
||||
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.
|
||||
|
||||
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_CONFIG_H_
|
||||
#define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_CONFIG_H_
|
||||
|
||||
#include "webrtc/api/optional.h"
|
||||
|
||||
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;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ADAPTOR_CONFIG_H_
|
||||
Loading…
x
Reference in New Issue
Block a user