Replacing WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP with WEBRTC_ENABLE_PROTOBUF.
Bug: None Change-Id: I595b094e7fcb12723614df3197a40833932ba0a0 Reviewed-on: https://chromium-review.googlesource.com/533074 Reviewed-by: Michael T <tschumim@webrtc.org> Commit-Queue: Minyue Li <minyue@webrtc.org> Cr-Commit-Position: refs/heads/master@{#18568}
This commit is contained in:
parent
10e1f7548a
commit
7ed35f4643
@ -933,7 +933,6 @@ rtc_static_library("audio_network_adaptor") {
|
||||
":ana_config_proto",
|
||||
":ana_debug_dump_proto",
|
||||
]
|
||||
defines = [ "WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP" ]
|
||||
}
|
||||
|
||||
if (!build_with_chromium && is_clang) {
|
||||
@ -2178,10 +2177,7 @@ if (rtc_include_tests) {
|
||||
defines = audio_coding_defines
|
||||
|
||||
if (rtc_enable_protobuf) {
|
||||
defines += [
|
||||
"WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP",
|
||||
"WEBRTC_NETEQ_UNITTEST_BITEXACT",
|
||||
]
|
||||
defines += [ "WEBRTC_NETEQ_UNITTEST_BITEXACT" ]
|
||||
deps += [
|
||||
":ana_config_proto",
|
||||
":neteq_unittest_proto",
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include "webrtc/modules/audio_coding/audio_network_adaptor/frame_length_controller.h"
|
||||
#include "webrtc/modules/audio_coding/audio_network_adaptor/util/threshold_curve.h"
|
||||
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
RTC_PUSH_IGNORING_WUNDEF()
|
||||
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
|
||||
#include "external/webrtc/webrtc/modules/audio_coding/audio_network_adaptor/config.pb.h"
|
||||
@ -37,7 +37,7 @@ namespace webrtc {
|
||||
|
||||
namespace {
|
||||
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
|
||||
std::unique_ptr<FecControllerPlrBased> CreateFecControllerPlrBased(
|
||||
const audio_network_adaptor::config::FecController& config,
|
||||
@ -180,7 +180,7 @@ std::unique_ptr<BitrateController> CreateBitrateController(
|
||||
return std::unique_ptr<BitrateController>(new BitrateController(
|
||||
BitrateController::Config(initial_bitrate_bps, initial_frame_length_ms)));
|
||||
}
|
||||
#endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#endif // WEBRTC_ENABLE_PROTOBUF
|
||||
|
||||
} // namespace
|
||||
|
||||
@ -201,7 +201,7 @@ std::unique_ptr<ControllerManager> ControllerManagerImpl::Create(
|
||||
int initial_bitrate_bps,
|
||||
bool initial_fec_enabled,
|
||||
bool initial_dtx_enabled) {
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
audio_network_adaptor::config::ControllerManager controller_manager_config;
|
||||
controller_manager_config.ParseFromString(config_string);
|
||||
|
||||
@ -270,7 +270,7 @@ std::unique_ptr<ControllerManager> ControllerManagerImpl::Create(
|
||||
#else
|
||||
RTC_NOTREACHED();
|
||||
return nullptr;
|
||||
#endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#endif // WEBRTC_ENABLE_PROTOBUF
|
||||
}
|
||||
|
||||
ControllerManagerImpl::ControllerManagerImpl(const Config& config)
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
#include "webrtc/modules/audio_coding/audio_network_adaptor/mock/mock_controller.h"
|
||||
#include "webrtc/test/gtest.h"
|
||||
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
RTC_PUSH_IGNORING_WUNDEF()
|
||||
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
|
||||
#include "external/webrtc/webrtc/modules/audio_coding/audio_network_adaptor/config.pb.h"
|
||||
@ -203,7 +203,7 @@ TEST(ControllerManagerTest, DoNotReorderIfNetworkMetricsChangeTooSmall) {
|
||||
{kNumControllers - 2, kNumControllers - 1, 0, 1});
|
||||
}
|
||||
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
|
||||
namespace {
|
||||
|
||||
@ -439,6 +439,6 @@ TEST(ControllerManagerTest, CreateFromConfigStringAndCheckReordering) {
|
||||
ControllerType::CHANNEL, ControllerType::DTX,
|
||||
ControllerType::BIT_RATE});
|
||||
}
|
||||
#endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#endif // WEBRTC_ENABLE_PROTOBUF
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
#include "webrtc/base/ignore_wundef.h"
|
||||
#include "webrtc/base/protobuf_utils.h"
|
||||
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
RTC_PUSH_IGNORING_WUNDEF()
|
||||
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD
|
||||
#include "external/webrtc/webrtc/modules/audio_coding/audio_network_adaptor/debug_dump.pb.h"
|
||||
@ -26,7 +26,7 @@ RTC_POP_IGNORING_WUNDEF()
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
namespace {
|
||||
|
||||
using audio_network_adaptor::debug_dump::Event;
|
||||
@ -43,7 +43,7 @@ void DumpEventToFile(const Event& event, FileWrapper* dump_file) {
|
||||
}
|
||||
|
||||
} // namespace
|
||||
#endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#endif // WEBRTC_ENABLE_PROTOBUF
|
||||
|
||||
class DebugDumpWriterImpl final : public DebugDumpWriter {
|
||||
public:
|
||||
@ -62,17 +62,18 @@ class DebugDumpWriterImpl final : public DebugDumpWriter {
|
||||
|
||||
DebugDumpWriterImpl::DebugDumpWriterImpl(FILE* file_handle)
|
||||
: dump_file_(FileWrapper::Create()) {
|
||||
#ifndef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
RTC_NOTREACHED();
|
||||
#endif
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
dump_file_->OpenFromFileHandle(file_handle);
|
||||
RTC_CHECK(dump_file_->is_open());
|
||||
#else
|
||||
RTC_NOTREACHED();
|
||||
#endif
|
||||
}
|
||||
|
||||
void DebugDumpWriterImpl::DumpNetworkMetrics(
|
||||
const Controller::NetworkMetrics& metrics,
|
||||
int64_t timestamp) {
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
Event event;
|
||||
event.set_timestamp(timestamp);
|
||||
event.set_type(Event::NETWORK_METRICS);
|
||||
@ -100,13 +101,13 @@ void DebugDumpWriterImpl::DumpNetworkMetrics(
|
||||
}
|
||||
|
||||
DumpEventToFile(event, dump_file_.get());
|
||||
#endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#endif // WEBRTC_ENABLE_PROTOBUF
|
||||
}
|
||||
|
||||
void DebugDumpWriterImpl::DumpEncoderRuntimeConfig(
|
||||
const AudioEncoderRuntimeConfig& config,
|
||||
int64_t timestamp) {
|
||||
#ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
Event event;
|
||||
event.set_timestamp(timestamp);
|
||||
event.set_type(Event::ENCODER_RUNTIME_CONFIG);
|
||||
@ -133,7 +134,7 @@ void DebugDumpWriterImpl::DumpEncoderRuntimeConfig(
|
||||
dump_config->set_num_channels(*config.num_channels);
|
||||
|
||||
DumpEventToFile(event, dump_file_.get());
|
||||
#endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP
|
||||
#endif // WEBRTC_ENABLE_PROTOBUF
|
||||
}
|
||||
|
||||
std::unique_ptr<DebugDumpWriter> DebugDumpWriter::Create(FILE* file_handle) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user