Fix ClangTidy issues in video/
These are manual edits please verify there are no typos. Feel free to auto-submit if there are no issues. Bug: webrtc:10410 Change-Id: Iedb3be944828a1caba55bbbd4dc0b56c55bbb7d5 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127624 Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27123}
This commit is contained in:
parent
a594ef0893
commit
1f4173e420
@ -21,7 +21,6 @@
|
||||
#include "test/gmock.h"
|
||||
#include "test/gtest.h"
|
||||
|
||||
using ::testing::_;
|
||||
using ::testing::AnyNumber;
|
||||
using ::testing::InvokeWithoutArgs;
|
||||
using ::testing::Return;
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
#include "test/gtest.h"
|
||||
#include "video/test/mock_video_stream_encoder.h"
|
||||
|
||||
using ::testing::NiceMock;
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class VieKeyRequestTest : public ::testing::Test {
|
||||
|
||||
@ -203,7 +203,7 @@ absl::optional<int64_t> FrameEncodeTimer::ExtractEncodeStartTime(
|
||||
EncodedImageCallback::DropReason::kDroppedByEncoder);
|
||||
encode_start_list->pop_front();
|
||||
}
|
||||
if (encode_start_list->size() > 0 &&
|
||||
if (!encode_start_list->empty() &&
|
||||
encode_start_list->front().rtp_timestamp ==
|
||||
encoded_image->Timestamp()) {
|
||||
result.emplace(encode_start_list->front().encode_start_time_ms);
|
||||
|
||||
@ -1012,7 +1012,7 @@ std::unique_ptr<test::FrameGenerator> VideoQualityTest::CreateFrameGenerator(
|
||||
params_.video[video_idx].fps);
|
||||
} else {
|
||||
std::vector<std::string> slides = params_.screenshare[video_idx].slides;
|
||||
if (slides.size() == 0) {
|
||||
if (slides.empty()) {
|
||||
slides.push_back(test::ResourcePath("web_screenshot_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("presentation_1850_1110", "yuv"));
|
||||
slides.push_back(test::ResourcePath("photo_1850_1110", "yuv"));
|
||||
@ -1206,8 +1206,8 @@ void VideoQualityTest::RunWithAnalyzer(const Params& params) {
|
||||
task_queue_.SendTask([this, &send_call_config, &recv_call_config,
|
||||
&send_transport, &recv_transport]() {
|
||||
if (params_.audio.enabled)
|
||||
InitializeAudioDevice(
|
||||
&send_call_config, &recv_call_config, params_.audio.use_real_adm);
|
||||
InitializeAudioDevice(&send_call_config, &recv_call_config,
|
||||
params_.audio.use_real_adm);
|
||||
|
||||
CreateCalls(send_call_config, recv_call_config);
|
||||
send_transport = CreateSendTransport();
|
||||
@ -1298,21 +1298,21 @@ void VideoQualityTest::RunWithAnalyzer(const Params& params) {
|
||||
|
||||
rtc::scoped_refptr<AudioDeviceModule> VideoQualityTest::CreateAudioDevice() {
|
||||
#ifdef WEBRTC_WIN
|
||||
RTC_LOG(INFO) << "Using latest version of ADM on Windows";
|
||||
// We must initialize the COM library on a thread before we calling any of
|
||||
// the library functions. All COM functions in the ADM will return
|
||||
// CO_E_NOTINITIALIZED otherwise. The legacy ADM for Windows used internal
|
||||
// COM initialization but the new ADM requires COM to be initialized
|
||||
// externally.
|
||||
com_initializer_ = absl::make_unique<webrtc_win::ScopedCOMInitializer>(
|
||||
webrtc_win::ScopedCOMInitializer::kMTA);
|
||||
RTC_CHECK(com_initializer_->Succeeded());
|
||||
RTC_CHECK(webrtc_win::core_audio_utility::IsSupported());
|
||||
RTC_CHECK(webrtc_win::core_audio_utility::IsMMCSSSupported());
|
||||
return CreateWindowsCoreAudioAudioDeviceModule();
|
||||
RTC_LOG(INFO) << "Using latest version of ADM on Windows";
|
||||
// We must initialize the COM library on a thread before we calling any of
|
||||
// the library functions. All COM functions in the ADM will return
|
||||
// CO_E_NOTINITIALIZED otherwise. The legacy ADM for Windows used internal
|
||||
// COM initialization but the new ADM requires COM to be initialized
|
||||
// externally.
|
||||
com_initializer_ = absl::make_unique<webrtc_win::ScopedCOMInitializer>(
|
||||
webrtc_win::ScopedCOMInitializer::kMTA);
|
||||
RTC_CHECK(com_initializer_->Succeeded());
|
||||
RTC_CHECK(webrtc_win::core_audio_utility::IsSupported());
|
||||
RTC_CHECK(webrtc_win::core_audio_utility::IsMMCSSSupported());
|
||||
return CreateWindowsCoreAudioAudioDeviceModule();
|
||||
#else
|
||||
// Use legacy factory method on all platforms except Windows.
|
||||
return AudioDeviceModule::Create(AudioDeviceModule::kPlatformDefaultAudio);
|
||||
// Use legacy factory method on all platforms except Windows.
|
||||
return AudioDeviceModule::Create(AudioDeviceModule::kPlatformDefaultAudio);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1348,7 +1348,7 @@ void VideoQualityTest::InitializeAudioDevice(Call::Config* send_call_config,
|
||||
}
|
||||
// Always initialize the ADM before injecting a valid audio transport.
|
||||
RTC_CHECK(audio_device->RegisterAudioCallback(
|
||||
send_call_config->audio_state->audio_transport()) == 0);
|
||||
send_call_config->audio_state->audio_transport()) == 0);
|
||||
}
|
||||
|
||||
void VideoQualityTest::SetupAudio(Transport* transport) {
|
||||
@ -1428,8 +1428,8 @@ void VideoQualityTest::RunWithRenderers(const Params& params) {
|
||||
Call::Config recv_call_config(recv_event_log_.get());
|
||||
|
||||
if (params_.audio.enabled)
|
||||
InitializeAudioDevice(
|
||||
&send_call_config, &recv_call_config, params_.audio.use_real_adm);
|
||||
InitializeAudioDevice(&send_call_config, &recv_call_config,
|
||||
params_.audio.use_real_adm);
|
||||
|
||||
CreateCalls(send_call_config, recv_call_config);
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ size_t CalculateMaxHeaderSize(const RtpConfig& config) {
|
||||
size_t header_size = kRtpHeaderSize;
|
||||
size_t extensions_size = 0;
|
||||
size_t fec_extensions_size = 0;
|
||||
if (config.extensions.size() > 0) {
|
||||
if (!config.extensions.empty()) {
|
||||
RtpHeaderExtensionMap extensions_map(config.extensions);
|
||||
extensions_size = RtpHeaderExtensionSize(RTPSender::VideoExtensionSizes(),
|
||||
extensions_map);
|
||||
|
||||
@ -30,12 +30,10 @@
|
||||
namespace webrtc {
|
||||
namespace internal {
|
||||
namespace {
|
||||
using testing::NiceMock;
|
||||
using testing::StrictMock;
|
||||
using testing::ReturnRef;
|
||||
using testing::Return;
|
||||
using testing::Invoke;
|
||||
using testing::_;
|
||||
using testing::Invoke;
|
||||
using testing::NiceMock;
|
||||
using testing::Return;
|
||||
|
||||
constexpr int64_t kDefaultInitialBitrateBps = 333000;
|
||||
const double kDefaultBitratePriority = 0.5;
|
||||
|
||||
@ -817,7 +817,7 @@ void VideoStreamEncoder::ConfigureQualityScaler(
|
||||
scaling_settings.thresholds;
|
||||
|
||||
if (quality_scaling_allowed) {
|
||||
if (quality_scaler_.get() == nullptr) {
|
||||
if (quality_scaler_ == nullptr) {
|
||||
// Quality scaler has not already been configured.
|
||||
|
||||
// Use experimental thresholds if available.
|
||||
|
||||
@ -42,7 +42,6 @@ namespace webrtc {
|
||||
|
||||
using ScaleReason = AdaptationObserverInterface::AdaptReason;
|
||||
using ::testing::_;
|
||||
using ::testing::Return;
|
||||
|
||||
namespace {
|
||||
const int kMinPixelsPerFrame = 320 * 180;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user