Enable cpplint in media/

Bug: webrtc:5584
Change-Id: I2fd1395d35596d9002e19cc90fcda3a5d4cde9e7
Reviewed-on: https://webrtc-review.googlesource.com/16564
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20504}
This commit is contained in:
Steve Anton 2017-10-31 09:53:08 -07:00 committed by Commit Bot
parent 7995d8cdde
commit e78bcb97c3
42 changed files with 84 additions and 41 deletions

View file

@ -20,7 +20,10 @@ CPPLINT_BLACKLIST = [
'common_types.cc', 'common_types.cc',
'common_types.h', 'common_types.h',
'examples/objc', 'examples/objc',
'media', 'media/base/streamparams.h',
'media/base/videocommon.h',
'media/engine/fakewebrtcdeviceinfo.h',
'media/sctp/sctptransport.cc',
'modules/audio_coding', 'modules/audio_coding',
'modules/audio_device', 'modules/audio_device',
'modules/audio_processing', 'modules/audio_processing',

View file

@ -30,7 +30,7 @@ class AdaptedVideoTrackSource
protected: protected:
// Allows derived classes to initialize |video_adapter_| with a custom // Allows derived classes to initialize |video_adapter_| with a custom
// alignment. // alignment.
AdaptedVideoTrackSource(int required_alignment); explicit AdaptedVideoTrackSource(int required_alignment);
// Checks the apply_rotation() flag. If the frame needs rotation, and it is a // Checks the apply_rotation() flag. If the frame needs rotation, and it is a
// plain memory frame, it is rotated. Subclasses producing native frames must // plain memory frame, it is rotated. Subclasses producing native frames must
// handle apply_rotation() themselves. // handle apply_rotation() themselves.

View file

@ -229,9 +229,9 @@ TEST(CodecTest, TestIntersectFeedbackParams) {
const FeedbackParam b3("b", "3"); const FeedbackParam b3("b", "3");
const FeedbackParam c3("c", "3"); const FeedbackParam c3("c", "3");
TestCodec c1; TestCodec c1;
c1.AddFeedbackParam(a1); // Only match with c2. c1.AddFeedbackParam(a1); // Only match with c2.
c1.AddFeedbackParam(b2); // Same param different values. c1.AddFeedbackParam(b2); // Same param different values.
c1.AddFeedbackParam(c3); // Not in c2. c1.AddFeedbackParam(c3); // Not in c2.
TestCodec c2; TestCodec c2;
c2.AddFeedbackParam(a1); c2.AddFeedbackParam(a1);
c2.AddFeedbackParam(b3); c2.AddFeedbackParam(b3);

View file

@ -11,6 +11,8 @@
#ifndef MEDIA_BASE_DEVICE_H_ #ifndef MEDIA_BASE_DEVICE_H_
#define MEDIA_BASE_DEVICE_H_ #define MEDIA_BASE_DEVICE_H_
#include <string>
#include "rtc_base/stringencode.h" #include "rtc_base/stringencode.h"
namespace cricket { namespace cricket {

View file

@ -16,6 +16,8 @@
#include <memory> #include <memory>
#include <set> #include <set>
#include <string> #include <string>
#include <tuple>
#include <utility>
#include <vector> #include <vector>
#include "api/call/audio_sink.h" #include "api/call/audio_sink.h"
@ -948,8 +950,6 @@ inline FakeVideoMediaChannel::~FakeVideoMediaChannel() {
class FakeDataEngine : public DataEngineInterface { class FakeDataEngine : public DataEngineInterface {
public: public:
FakeDataEngine(){};
virtual DataMediaChannel* CreateChannel(const MediaConfig& config) { virtual DataMediaChannel* CreateChannel(const MediaConfig& config) {
FakeDataMediaChannel* ch = new FakeDataMediaChannel(this, DataOptions()); FakeDataMediaChannel* ch = new FakeDataMediaChannel(this, DataOptions());
channels_.push_back(ch); channels_.push_back(ch);

View file

@ -12,6 +12,7 @@
#define MEDIA_BASE_FAKENETWORKINTERFACE_H_ #define MEDIA_BASE_FAKENETWORKINTERFACE_H_
#include <map> #include <map>
#include <set>
#include <vector> #include <vector>
#include "media/base/mediachannel.h" #include "media/base/mediachannel.h"

View file

@ -11,6 +11,7 @@
#ifndef MEDIA_BASE_MEDIACHANNEL_H_ #ifndef MEDIA_BASE_MEDIACHANNEL_H_
#define MEDIA_BASE_MEDIACHANNEL_H_ #define MEDIA_BASE_MEDIACHANNEL_H_
#include <map>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
@ -1223,7 +1224,7 @@ class DataMediaChannel : public MediaChannel {
}; };
DataMediaChannel() {} DataMediaChannel() {}
DataMediaChannel(const MediaConfig& config) : MediaChannel(config) {} explicit DataMediaChannel(const MediaConfig& config) : MediaChannel(config) {}
virtual ~DataMediaChannel() {} virtual ~DataMediaChannel() {}
virtual bool SetSendParameters(const DataSendParameters& params) = 0; virtual bool SetSendParameters(const DataSendParameters& params) = 0;

View file

@ -16,6 +16,8 @@
#endif #endif
#include <string> #include <string>
#include <tuple>
#include <utility>
#include <vector> #include <vector>
#include "api/audio_codecs/audio_decoder_factory.h" #include "api/audio_codecs/audio_decoder_factory.h"

View file

@ -10,6 +10,8 @@
#include "media/base/rtpdataengine.h" #include "media/base/rtpdataengine.h"
#include <map>
#include "media/base/codec.h" #include "media/base/codec.h"
#include "media/base/mediaconstants.h" #include "media/base/mediaconstants.h"
#include "media/base/rtputils.h" #include "media/base/rtputils.h"

View file

@ -11,6 +11,7 @@
#ifndef MEDIA_BASE_RTPDATAENGINE_H_ #ifndef MEDIA_BASE_RTPDATAENGINE_H_
#define MEDIA_BASE_RTPDATAENGINE_H_ #define MEDIA_BASE_RTPDATAENGINE_H_
#include <map>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
@ -61,7 +62,7 @@ class RtpClock {
class RtpDataMediaChannel : public DataMediaChannel { class RtpDataMediaChannel : public DataMediaChannel {
public: public:
RtpDataMediaChannel(const MediaConfig& config); explicit RtpDataMediaChannel(const MediaConfig& config);
virtual ~RtpDataMediaChannel(); virtual ~RtpDataMediaChannel();
virtual bool SetSendParameters(const DataSendParameters& params); virtual bool SetSendParameters(const DataSendParameters& params);

View file

@ -114,7 +114,7 @@ void UpdateRtpAuthTag(uint8_t* rtp,
memcpy(auth_tag, output, tag_length); memcpy(auth_tag, output, tag_length);
} }
} } // namespace
bool GetUint8(const void* data, size_t offset, int* value) { bool GetUint8(const void* data, size_t offset, int* value) {
if (!data || !value) { if (!data || !value) {

View file

@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include <vector>
#include "media/base/rtputils.h" #include "media/base/rtputils.h"
#include "media/base/fakertp.h" #include "media/base/fakertp.h"
#include "rtc_base/asyncpacketsocket.h" #include "rtc_base/asyncpacketsocket.h"

View file

@ -14,6 +14,7 @@
#include <cmath> #include <cmath>
#include <cstdlib> #include <cstdlib>
#include <limits> #include <limits>
#include <utility>
#include "api/optional.h" #include "api/optional.h"
#include "media/base/mediaconstants.h" #include "media/base/mediaconstants.h"

View file

@ -10,6 +10,7 @@
#include <limits.h> // For INT_MAX #include <limits.h> // For INT_MAX
#include <limits>
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include <limits>
#include "media/base/videobroadcaster.h" #include "media/base/videobroadcaster.h"
#include "api/video/i420_buffer.h" #include "api/video/i420_buffer.h"
#include "api/video/video_frame.h" #include "api/video/video_frame.h"

View file

@ -10,7 +10,7 @@
// Common definition for video, including fourcc and VideoFormat. // Common definition for video, including fourcc and VideoFormat.
#ifndef MEDIA_BASE_VIDEOCOMMON_H_ // NOLINT #ifndef MEDIA_BASE_VIDEOCOMMON_H_
#define MEDIA_BASE_VIDEOCOMMON_H_ #define MEDIA_BASE_VIDEOCOMMON_H_
#include <stdint.h> #include <stdint.h>
@ -226,4 +226,4 @@ struct VideoFormat : VideoFormatPod {
} // namespace cricket } // namespace cricket
#endif // MEDIA_BASE_VIDEOCOMMON_H_ // NOLINT #endif // MEDIA_BASE_VIDEOCOMMON_H_

View file

@ -26,7 +26,7 @@ class VideoSinkInterface {
// Should be called by the source when it discards the frame due to rate // Should be called by the source when it discards the frame due to rate
// limiting. // limiting.
virtual void OnDiscardedFrame(){}; virtual void OnDiscardedFrame() {}
}; };
} // namespace rtc } // namespace rtc

View file

@ -11,6 +11,8 @@
#ifndef MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ #ifndef MEDIA_BASE_VIDEOSOURCEINTERFACE_H_
#define MEDIA_BASE_VIDEOSOURCEINTERFACE_H_ #define MEDIA_BASE_VIDEOSOURCEINTERFACE_H_
#include <limits>
#include "api/optional.h" #include "api/optional.h"
#include "media/base/videosinkinterface.h" #include "media/base/videosinkinterface.h"

View file

@ -11,6 +11,8 @@
#ifndef MEDIA_ENGINE_APM_HELPERS_H_ #ifndef MEDIA_ENGINE_APM_HELPERS_H_
#define MEDIA_ENGINE_APM_HELPERS_H_ #define MEDIA_ENGINE_APM_HELPERS_H_
#include <cstdint>
namespace webrtc { namespace webrtc {
class AudioProcessing; class AudioProcessing;
@ -22,8 +24,8 @@ enum EcModes {
}; };
struct AgcConfig { struct AgcConfig {
unsigned short targetLeveldBOv; uint16_t targetLeveldBOv;
unsigned short digitalCompressionGaindB; uint16_t digitalCompressionGaindB;
bool limiterEnable; bool limiterEnable;
}; };

View file

@ -247,9 +247,11 @@ TEST(ApmHelpersTest, TypingDetectionStatus_DefaultMode) {
// TODO(kthelgason): Reenable this test on simulator. // TODO(kthelgason): Reenable this test on simulator.
// See bugs.webrtc.org/5569 // See bugs.webrtc.org/5569
#if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR
#define MAYBE_TypingDetectionStatus_EnableDisable DISABLED_TypingDetectionStatus_EnableDisable #define MAYBE_TypingDetectionStatus_EnableDisable \
DISABLED_TypingDetectionStatus_EnableDisable
#else #else
#define MAYBE_TypingDetectionStatus_EnableDisable TypingDetectionStatus_EnableDisable #define MAYBE_TypingDetectionStatus_EnableDisable \
TypingDetectionStatus_EnableDisable
#endif #endif
TEST(ApmHelpersTest, MAYBE_TypingDetectionStatus_EnableDisable) { TEST(ApmHelpersTest, MAYBE_TypingDetectionStatus_EnableDisable) {
TestHelper helper; TestHelper helper;

View file

@ -597,9 +597,9 @@ void FakeCall::SetBitrateConfigMask(
void FakeCall::SetBitrateAllocationStrategy( void FakeCall::SetBitrateAllocationStrategy(
std::unique_ptr<rtc::BitrateAllocationStrategy> std::unique_ptr<rtc::BitrateAllocationStrategy>
bitrate_allocation_strategy){ bitrate_allocation_strategy) {
// TODO(alexnarest): not implemented // TODO(alexnarest): not implemented
}; }
void FakeCall::SignalChannelNetworkState(webrtc::MediaType media, void FakeCall::SignalChannelNetworkState(webrtc::MediaType media,
webrtc::NetworkState state) { webrtc::NetworkState state) {

View file

@ -11,6 +11,7 @@
#ifndef MEDIA_ENGINE_FAKEWEBRTCDEVICEINFO_H_ #ifndef MEDIA_ENGINE_FAKEWEBRTCDEVICEINFO_H_
#define MEDIA_ENGINE_FAKEWEBRTCDEVICEINFO_H_ #define MEDIA_ENGINE_FAKEWEBRTCDEVICEINFO_H_
#include <string>
#include <vector> #include <vector>
#include "media/engine/webrtcvideocapturer.h" #include "media/engine/webrtcvideocapturer.h"

View file

@ -22,11 +22,8 @@ class FakeWebRtcVcmFactory;
// Fake class for mocking out webrtc::VideoCaptureModule. // Fake class for mocking out webrtc::VideoCaptureModule.
class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule { class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
public: public:
FakeWebRtcVideoCaptureModule(FakeWebRtcVcmFactory* factory) explicit FakeWebRtcVideoCaptureModule(FakeWebRtcVcmFactory* factory)
: factory_(factory), : factory_(factory), callback_(NULL), running_(false) {}
callback_(NULL),
running_(false) {
}
~FakeWebRtcVideoCaptureModule(); ~FakeWebRtcVideoCaptureModule();
void RegisterCaptureDataCallback( void RegisterCaptureDataCallback(
rtc::VideoSinkInterface<webrtc::VideoFrame>* callback) override { rtc::VideoSinkInterface<webrtc::VideoFrame>* callback) override {

View file

@ -10,6 +10,8 @@
#include "media/engine/payload_type_mapper.h" #include "media/engine/payload_type_mapper.h"
#include <utility>
#include "api/audio_codecs/audio_format.h" #include "api/audio_codecs/audio_format.h"
#include "common_types.h" // NOLINT(build/include) #include "common_types.h" // NOLINT(build/include)
#include "media/base/mediaconstants.h" #include "media/base/mediaconstants.h"

View file

@ -9,6 +9,8 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include <algorithm>
#include <string>
#include "media/base/streamparams.h" #include "media/base/streamparams.h"
#include "media/engine/constants.h" #include "media/engine/constants.h"

View file

@ -11,6 +11,7 @@
#ifndef MEDIA_ENGINE_SIMULCAST_H_ #ifndef MEDIA_ENGINE_SIMULCAST_H_
#define MEDIA_ENGINE_SIMULCAST_H_ #define MEDIA_ENGINE_SIMULCAST_H_
#include <string>
#include <vector> #include <vector>
#include "call/video_config.h" #include "call/video_config.h"

View file

@ -11,6 +11,7 @@
#include "media/engine/videodecodersoftwarefallbackwrapper.h" #include "media/engine/videodecodersoftwarefallbackwrapper.h"
#include <string> #include <string>
#include <utility>
#include "media/engine/internaldecoderfactory.h" #include "media/engine/internaldecoderfactory.h"
#include "modules/video_coding/include/video_error_codes.h" #include "modules/video_coding/include/video_error_codes.h"

View file

@ -10,6 +10,8 @@
#include "media/engine/videoencodersoftwarefallbackwrapper.h" #include "media/engine/videoencodersoftwarefallbackwrapper.h"
#include <utility>
#include "media/base/h264_profile_level_id.h" #include "media/base/h264_profile_level_id.h"
#include "media/engine/internalencoderfactory.h" #include "media/engine/internalencoderfactory.h"
#include "modules/video_coding/include/video_error_codes.h" #include "modules/video_coding/include/video_error_codes.h"

View file

@ -330,12 +330,12 @@ const int kHighKbps = 300;
const int kMinLowDurationMs = 4000; const int kMinLowDurationMs = 4000;
const int kMinPixelsPerFrame = 1; const int kMinPixelsPerFrame = 1;
const int kMinPixelsStop = 320 * 180; const int kMinPixelsStop = 320 * 180;
const std::string kFieldTrial = "WebRTC-VP8-Forced-Fallback-Encoder"; const char kFieldTrial[] = "WebRTC-VP8-Forced-Fallback-Encoder";
} // namespace } // namespace
class ForcedFallbackTest : public VideoEncoderSoftwareFallbackWrapperTest { class ForcedFallbackTest : public VideoEncoderSoftwareFallbackWrapperTest {
public: public:
ForcedFallbackTest(const std::string& field_trials) explicit ForcedFallbackTest(const std::string& field_trials)
: VideoEncoderSoftwareFallbackWrapperTest(field_trials) {} : VideoEncoderSoftwareFallbackWrapperTest(field_trials) {}
~ForcedFallbackTest() override {} ~ForcedFallbackTest() override {}
@ -392,7 +392,7 @@ class ForcedFallbackTest : public VideoEncoderSoftwareFallbackWrapperTest {
class ForcedFallbackTestEnabled : public ForcedFallbackTest { class ForcedFallbackTestEnabled : public ForcedFallbackTest {
public: public:
ForcedFallbackTestEnabled() ForcedFallbackTestEnabled()
: ForcedFallbackTest(kFieldTrial + "/Enabled-" + : ForcedFallbackTest(std::string(kFieldTrial) + "/Enabled-" +
std::to_string(kLowKbps) + "," + std::to_string(kLowKbps) + "," +
std::to_string(kHighKbps) + "," + std::to_string(kHighKbps) + "," +
std::to_string(kMinLowDurationMs) + "," + std::to_string(kMinLowDurationMs) + "," +
@ -402,7 +402,7 @@ class ForcedFallbackTestEnabled : public ForcedFallbackTest {
class ForcedFallbackTestDisabled : public ForcedFallbackTest { class ForcedFallbackTestDisabled : public ForcedFallbackTest {
public: public:
ForcedFallbackTestDisabled() ForcedFallbackTestDisabled()
: ForcedFallbackTest(kFieldTrial + "/Disabled/") {} : ForcedFallbackTest(std::string(kFieldTrial) + "/Disabled/") {}
}; };
TEST_F(ForcedFallbackTestDisabled, NoFallbackWithoutFieldTrial) { TEST_F(ForcedFallbackTestDisabled, NoFallbackWithoutFieldTrial) {

View file

@ -11,6 +11,9 @@
#include "media/engine/webrtcmediaengine.h" #include "media/engine/webrtcmediaengine.h"
#include <algorithm> #include <algorithm>
#include <memory>
#include <tuple>
#include <utility>
#include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h"

View file

@ -11,6 +11,7 @@
#ifndef MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ #ifndef MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_
#define MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_ #define MEDIA_ENGINE_WEBRTCMEDIAENGINE_H_
#include <memory>
#include <string> #include <string>
#include <vector> #include <vector>

View file

@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include <memory>
#include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h"
#include "media/engine/webrtcmediaengine.h" #include "media/engine/webrtcmediaengine.h"

View file

@ -82,4 +82,4 @@ class WebRtcVideoCapturer : public VideoCapturer,
} // namespace cricket } // namespace cricket
#endif // MEDIA_WEBRTC_WEBRTCVIDEOCAPTURER_H_ #endif // MEDIA_ENGINE_WEBRTCVIDEOCAPTURER_H_

View file

@ -26,8 +26,8 @@
using cricket::VideoFormat; using cricket::VideoFormat;
static const std::string kTestDeviceName = "JuberTech FakeCam Q123"; static const char kTestDeviceName[] = "JuberTech FakeCam Q123";
static const std::string kTestDeviceId = "foo://bar/baz"; static const char kTestDeviceId[] = "foo://bar/baz";
const VideoFormat kDefaultVideoFormat = const VideoFormat kDefaultVideoFormat =
VideoFormat(640, 400, VideoFormat::FpsToInterval(30), cricket::FOURCC_ANY); VideoFormat(640, 400, VideoFormat::FpsToInterval(30), cricket::FOURCC_ANY);
@ -75,8 +75,7 @@ TEST_F(WebRtcVideoCapturerTest, TestInit) {
} }
TEST_F(WebRtcVideoCapturerTest, TestInitVcm) { TEST_F(WebRtcVideoCapturerTest, TestInitVcm) {
EXPECT_TRUE(capturer_->Init(factory_->Create( EXPECT_TRUE(capturer_->Init(factory_->Create(kTestDeviceId)));
reinterpret_cast<const char*>(kTestDeviceId.c_str()))));
} }
TEST_F(WebRtcVideoCapturerTest, TestCapture) { TEST_F(WebRtcVideoCapturerTest, TestCapture) {
@ -101,8 +100,7 @@ TEST_F(WebRtcVideoCapturerTest, TestCapture) {
} }
TEST_F(WebRtcVideoCapturerTest, TestCaptureVcm) { TEST_F(WebRtcVideoCapturerTest, TestCaptureVcm) {
EXPECT_TRUE(capturer_->Init(factory_->Create( EXPECT_TRUE(capturer_->Init(factory_->Create(kTestDeviceId)));
reinterpret_cast<const char*>(kTestDeviceId.c_str()))));
cricket::VideoCapturerListener listener(capturer_.get()); cricket::VideoCapturerListener listener(capturer_.get());
EXPECT_TRUE(capturer_->GetSupportedFormats()->empty()); EXPECT_TRUE(capturer_->GetSupportedFormats()->empty());
VideoFormat format; VideoFormat format;

View file

@ -9,6 +9,7 @@
*/ */
#include <memory> #include <memory>
#include <utility>
#include "media/engine/webrtcvideocapturer.h" #include "media/engine/webrtcvideocapturer.h"
#include "media/engine/webrtcvideocapturerfactory.h" #include "media/engine/webrtcvideocapturerfactory.h"

View file

@ -12,6 +12,8 @@
#ifndef MEDIA_ENGINE_WEBRTCVIDEOCAPTURERFACTORY_H_ #ifndef MEDIA_ENGINE_WEBRTCVIDEOCAPTURERFACTORY_H_
#define MEDIA_ENGINE_WEBRTCVIDEOCAPTURERFACTORY_H_ #define MEDIA_ENGINE_WEBRTCVIDEOCAPTURERFACTORY_H_
#include <memory>
#include "media/base/videocapturerfactory.h" #include "media/base/videocapturerfactory.h"
namespace cricket { namespace cricket {

View file

@ -11,6 +11,8 @@
#ifndef MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ #ifndef MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_
#define MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_ #define MEDIA_ENGINE_WEBRTCVIDEODECODERFACTORY_H_
#include <string>
#include "common_types.h" // NOLINT(build/include) #include "common_types.h" // NOLINT(build/include)
#include "media/base/codec.h" #include "media/base/codec.h"
#include "rtc_base/refcount.h" #include "rtc_base/refcount.h"

View file

@ -11,6 +11,7 @@
#ifndef MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_ #ifndef MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_
#define MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_ #define MEDIA_ENGINE_WEBRTCVIDEOENCODERFACTORY_H_
#include <string>
#include <vector> #include <vector>
#include "common_types.h" // NOLINT(build/include) #include "common_types.h" // NOLINT(build/include)

View file

@ -11,6 +11,7 @@
#include <algorithm> #include <algorithm>
#include <map> #include <map>
#include <memory> #include <memory>
#include <utility>
#include <vector> #include <vector>
#include "api/test/mock_video_decoder_factory.h" #include "api/test/mock_video_decoder_factory.h"

View file

@ -74,9 +74,7 @@ class VoEWrapper {
VoEWrapper() VoEWrapper()
: engine_(webrtc::VoiceEngine::Create()), base_(engine_) { : engine_(webrtc::VoiceEngine::Create()), base_(engine_) {
} }
VoEWrapper(webrtc::VoEBase* base) explicit VoEWrapper(webrtc::VoEBase* base) : engine_(NULL), base_(base) {}
: engine_(NULL), base_(base) {
}
~VoEWrapper() {} ~VoEWrapper() {}
webrtc::VoiceEngine* engine() const { return engine_.get(); } webrtc::VoiceEngine* engine() const { return engine_.get(); }
webrtc::VoEBase* base() const { return base_.get(); } webrtc::VoEBase* base() const { return base_.get(); }

View file

@ -16,6 +16,7 @@
#include <cstdio> #include <cstdio>
#include <functional> #include <functional>
#include <string> #include <string>
#include <utility>
#include <vector> #include <vector>
#include "api/call/audio_sink.h" #include "api/call/audio_sink.h"
@ -77,7 +78,9 @@ const int kMaxPayloadType = 127;
class ProxySink : public webrtc::AudioSinkInterface { class ProxySink : public webrtc::AudioSinkInterface {
public: public:
ProxySink(AudioSinkInterface* sink) : sink_(sink) { RTC_DCHECK(sink); } explicit ProxySink(AudioSinkInterface* sink) : sink_(sink) {
RTC_DCHECK(sink);
}
void OnData(const Data& audio) override { sink_->OnData(audio); } void OnData(const Data& audio) override { sink_->OnData(audio); }
@ -418,7 +421,7 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
"WebRTC-Audio-MinimizeResamplingOnMobile")) { "WebRTC-Audio-MinimizeResamplingOnMobile")) {
options.auto_gain_control = rtc::Optional<bool>(false); options.auto_gain_control = rtc::Optional<bool>(false);
LOG(LS_INFO) << "Disable AGC according to field trial."; LOG(LS_INFO) << "Disable AGC according to field trial.";
if (!(options.noise_suppression.value_or(false) or if (!(options.noise_suppression.value_or(false) ||
options.echo_cancellation.value_or(false))) { options.echo_cancellation.value_or(false))) {
// If possible, turn off the high-pass filter. // If possible, turn off the high-pass filter.
LOG(LS_INFO) << "Disable high-pass filter in response to field trial."; LOG(LS_INFO) << "Disable high-pass filter in response to field trial.";

View file

@ -9,6 +9,7 @@
*/ */
#include <memory> #include <memory>
#include <utility>
#include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h"