Remove webrtc::ProtoString.
Bug: None Change-Id: If99a977532eda41eada25f57ff0ff6fe17085986 Reviewed-on: https://webrtc-review.googlesource.com/c/122581 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Minyue Li <minyue@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26726}
This commit is contained in:
committed by
Commit Bot
parent
eaf6a8cbc8
commit
e45c688e67
@ -11,6 +11,7 @@
|
||||
#include "modules/audio_coding/audio_network_adaptor/controller_manager.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "modules/audio_coding/audio_network_adaptor/bitrate_controller.h"
|
||||
@ -213,7 +214,7 @@ ControllerManagerImpl::Config::Config(int min_reordering_time_ms,
|
||||
ControllerManagerImpl::Config::~Config() = default;
|
||||
|
||||
std::unique_ptr<ControllerManager> ControllerManagerImpl::Create(
|
||||
const ProtoString& config_string,
|
||||
const std::string& config_string,
|
||||
size_t num_encoder_channels,
|
||||
rtc::ArrayView<const int> encoder_frame_lengths_ms,
|
||||
int min_encoder_bitrate_bps,
|
||||
@ -229,7 +230,7 @@ std::unique_ptr<ControllerManager> ControllerManagerImpl::Create(
|
||||
}
|
||||
|
||||
std::unique_ptr<ControllerManager> ControllerManagerImpl::Create(
|
||||
const ProtoString& config_string,
|
||||
const std::string& config_string,
|
||||
size_t num_encoder_channels,
|
||||
rtc::ArrayView<const int> encoder_frame_lengths_ms,
|
||||
int min_encoder_bitrate_bps,
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "modules/audio_coding/audio_network_adaptor/controller.h"
|
||||
#include "rtc_base/constructor_magic.h"
|
||||
#include "rtc_base/protobuf_utils.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -47,7 +47,7 @@ class ControllerManagerImpl final : public ControllerManager {
|
||||
};
|
||||
|
||||
static std::unique_ptr<ControllerManager> Create(
|
||||
const ProtoString& config_string,
|
||||
const std::string& config_string,
|
||||
size_t num_encoder_channels,
|
||||
rtc::ArrayView<const int> encoder_frame_lengths_ms,
|
||||
int min_encoder_bitrate_bps,
|
||||
@ -58,7 +58,7 @@ class ControllerManagerImpl final : public ControllerManager {
|
||||
bool initial_dtx_enabled);
|
||||
|
||||
static std::unique_ptr<ControllerManager> Create(
|
||||
const ProtoString& config_string,
|
||||
const std::string& config_string,
|
||||
size_t num_encoder_channels,
|
||||
rtc::ArrayView<const int> encoder_frame_lengths_ms,
|
||||
int min_encoder_bitrate_bps,
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "modules/audio_coding/audio_network_adaptor/controller_manager.h"
|
||||
@ -15,7 +16,6 @@
|
||||
#include "modules/audio_coding/audio_network_adaptor/mock/mock_debug_dump_writer.h"
|
||||
#include "rtc_base/fake_clock.h"
|
||||
#include "rtc_base/ignore_wundef.h"
|
||||
#include "rtc_base/protobuf_utils.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
@ -266,7 +266,7 @@ constexpr int kInitialFrameLengthMs = 60;
|
||||
constexpr int kMinBitrateBps = 6000;
|
||||
|
||||
ControllerManagerStates CreateControllerManager(
|
||||
const ProtoString& config_string) {
|
||||
const std::string& config_string) {
|
||||
ControllerManagerStates states;
|
||||
constexpr size_t kNumEncoderChannels = 2;
|
||||
const std::vector<int> encoder_frame_lengths_ms = {20, 60};
|
||||
@ -319,8 +319,8 @@ void CheckControllersOrder(const std::vector<Controller*>& controllers,
|
||||
}
|
||||
|
||||
MATCHER_P(ControllerManagerEqual, value, "") {
|
||||
ProtoString value_string;
|
||||
ProtoString arg_string;
|
||||
std::string value_string;
|
||||
std::string arg_string;
|
||||
EXPECT_TRUE(arg.SerializeToString(&arg_string));
|
||||
EXPECT_TRUE(value.SerializeToString(&value_string));
|
||||
return arg_string == value_string;
|
||||
@ -339,7 +339,7 @@ TEST(ControllerManagerTest, DebugDumpLoggedWhenCreateFromConfigString) {
|
||||
AddFrameLengthControllerConfig(&config);
|
||||
AddBitrateControllerConfig(&config);
|
||||
|
||||
ProtoString config_string;
|
||||
std::string config_string;
|
||||
config.SerializeToString(&config_string);
|
||||
|
||||
constexpr size_t kNumEncoderChannels = 2;
|
||||
@ -373,7 +373,7 @@ TEST(ControllerManagerTest, CreateFromConfigStringAndCheckDefaultOrder) {
|
||||
AddFrameLengthControllerConfig(&config);
|
||||
AddBitrateControllerConfig(&config);
|
||||
|
||||
ProtoString config_string;
|
||||
std::string config_string;
|
||||
config.SerializeToString(&config_string);
|
||||
|
||||
auto states = CreateControllerManager(config_string);
|
||||
@ -395,7 +395,7 @@ TEST(ControllerManagerTest, CreateCharPointFreeConfigAndCheckDefaultOrder) {
|
||||
AddDtxControllerConfig(&config);
|
||||
AddBitrateControllerConfig(&config);
|
||||
|
||||
ProtoString config_string;
|
||||
std::string config_string;
|
||||
config.SerializeToString(&config_string);
|
||||
|
||||
auto states = CreateControllerManager(config_string);
|
||||
@ -426,7 +426,7 @@ TEST(ControllerManagerTest, CreateFromConfigStringAndCheckReordering) {
|
||||
|
||||
AddBitrateControllerConfig(&config);
|
||||
|
||||
ProtoString config_string;
|
||||
std::string config_string;
|
||||
config.SerializeToString(&config_string);
|
||||
|
||||
auto states = CreateControllerManager(config_string);
|
||||
|
||||
@ -10,11 +10,12 @@
|
||||
|
||||
#include "modules/audio_coding/audio_network_adaptor/debug_dump_writer.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/ignore_wundef.h"
|
||||
#include "rtc_base/numerics/safe_conversions.h"
|
||||
#include "rtc_base/protobuf_utils.h"
|
||||
#include "rtc_base/system/file_wrapper.h"
|
||||
|
||||
#if WEBRTC_ENABLE_PROTOBUF
|
||||
@ -38,7 +39,7 @@ using audio_network_adaptor::debug_dump::EncoderRuntimeConfig;
|
||||
|
||||
void DumpEventToFile(const Event& event, FileWrapper* dump_file) {
|
||||
RTC_CHECK(dump_file->is_open());
|
||||
ProtoString dump_data;
|
||||
std::string dump_data;
|
||||
event.SerializeToString(&dump_data);
|
||||
int32_t size = rtc::checked_cast<int32_t>(event.ByteSizeLong());
|
||||
dump_file->Write(&size, sizeof(size));
|
||||
|
||||
Reference in New Issue
Block a user