To accommodate some downstream WebRTC users we need to loosen
the coupling between our code and the //third_party/protobuf. This includes using typedefs to define strings instead of assuming std::string. After this refactoring it will be possible to link with other protobuf implementations than the current one. We moved the PRESUBMIT check to another CL [1]. The goal of this presubmit is to avoid the direct usage of google::protobuf outside of the webrtc/base/protobuf_utils.h header file. [1] - https://codereview.webrtc.org/2753823003/ BUG=webrtc:7340 NOTRY=True Review-Url: https://codereview.webrtc.org/2747863003 Cr-Commit-Position: refs/heads/master@{#17466}
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/numerics/exp_filter.h"
|
||||
#include "webrtc/base/protobuf_utils.h"
|
||||
#include "webrtc/base/safe_conversions.h"
|
||||
#include "webrtc/base/timeutils.h"
|
||||
#include "webrtc/common_types.h"
|
||||
@ -192,7 +193,7 @@ AudioEncoderOpus::AudioEncoderOpus(
|
||||
audio_network_adaptor_creator_(
|
||||
audio_network_adaptor_creator
|
||||
? std::move(audio_network_adaptor_creator)
|
||||
: [this](const std::string& config_string,
|
||||
: [this](const ProtoString& config_string,
|
||||
RtcEventLog* event_log,
|
||||
const Clock* clock) {
|
||||
return DefaultAudioNetworkAdaptorCreator(config_string,
|
||||
@ -548,7 +549,7 @@ void AudioEncoderOpus::ApplyAudioNetworkAdaptor() {
|
||||
|
||||
std::unique_ptr<AudioNetworkAdaptor>
|
||||
AudioEncoderOpus::DefaultAudioNetworkAdaptorCreator(
|
||||
const std::string& config_string,
|
||||
const ProtoString& config_string,
|
||||
RtcEventLog* event_log,
|
||||
const Clock* clock) const {
|
||||
AudioNetworkAdaptorImpl::Config config;
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/base/optional.h"
|
||||
#include "webrtc/base/protobuf_utils.h"
|
||||
#include "webrtc/common_audio/smoothing_filter.h"
|
||||
#include "webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
|
||||
#include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h"
|
||||
@ -156,7 +157,7 @@ class AudioEncoderOpus final : public AudioEncoder {
|
||||
|
||||
void ApplyAudioNetworkAdaptor();
|
||||
std::unique_ptr<AudioNetworkAdaptor> DefaultAudioNetworkAdaptorCreator(
|
||||
const std::string& config_string,
|
||||
const ProtoString& config_string,
|
||||
RtcEventLog* event_log,
|
||||
const Clock* clock) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user