From bdf3072f1a06c7af95420e314cac4de72b7f8248 Mon Sep 17 00:00:00 2001 From: kjellander Date: Fri, 8 Sep 2017 11:00:21 -0700 Subject: [PATCH] Revert of Remove typedefs.h from webrtc/ root (part 1) (patchset #3 id:40001 of https://codereview.webrtc.org/3007253002/ ) Reason for revert: Breaks the Chromium WebRTC FYI bots: https://build.chromium.org/p/chromium.webrtc.fyi/builders/ios-simulator/builds/2834 https://build.chromium.org/p/chromium.webrtc.fyi/builders/Win%20Builder/builds/11775 Example: FAILED: obj/third_party/libjingle_xmpp/libjingle_xmpp_unittests/xmpplogintask_unittest.obj ninja -t msvc -e environment.x86 -- E:\b\c\goma_client/gomacc.exe "e:\b\c\win_toolchain\vs_files\f53e4598951162bad6330f7a167486c7ae5db1e5\vc\bin\amd64_x86/cl.exe" /nologo /showIncludes @obj/third_party/libjingle_xmpp/libjingle_xmpp_unittests/xmpplogintask_unittest.obj.rsp /c ../../third_party/libjingle_xmpp/xmpp/xmpplogintask_unittest.cc /Foobj/third_party/libjingle_xmpp/libjingle_xmpp_unittests/xmpplogintask_unittest.obj /Fd"obj/third_party/libjingle_xmpp/libjingle_xmpp_unittests_cc.pdb" ../../third_party/libjingle_xmpp/xmpp/xmpplogintask_unittest.cc(95): error C3861: 'FALLTHROUGH': identifier not found Original issue's description: > Remove typedefs.h from webrtc/ root (part 1) > > Split out webrtc-specific #defines from typedefs.h, into rtc_base/annotations.h and rtc_base/arch.h. > Also removes the curiously named WEBRTC_CPU_DETECTION #define. > > BUG=webrtc:6854 > > Review-Url: https://codereview.webrtc.org/3007253002 > Cr-Commit-Position: refs/heads/master@{#19752} > Committed: https://chromium.googlesource.com/external/webrtc/+/a895836321e68b67ca2081c3bdbf6c08d8ee4b57 TBR=kwiberg@webrtc.org,solenberg@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=webrtc:6854 Review-Url: https://codereview.webrtc.org/3013543002 Cr-Commit-Position: refs/heads/master@{#19754} --- .../common_audio/resampler/sinc_resampler.cc | 4 +- .../common_audio/resampler/sinc_resampler.h | 2 +- .../modules/audio_coding/neteq/neteq_impl.cc | 2 +- .../ios/voice_processing_audio_unit.mm | 4 +- .../remote_bitrate_estimator/test/bwe.cc | 2 +- .../rtp_rtcp/source/rtp_format_h264.cc | 2 +- webrtc/modules/video_coding/jitter_buffer.cc | 2 +- .../rtp_frame_reference_finder.cc | 2 +- webrtc/rtc_base/BUILD.gn | 2 - webrtc/rtc_base/annotations.h | 45 ------- webrtc/rtc_base/arch.h | 58 --------- webrtc/rtc_base/checks.cc | 6 +- webrtc/rtc_base/checks.h | 16 +-- webrtc/rtc_base/httpbase.cc | 2 +- webrtc/typedefs.h | 110 +++++++++++++++++- webrtc/video/rtp_video_stream_receiver.cc | 2 +- webrtc/video/video_stream_encoder.cc | 4 +- 17 files changed, 127 insertions(+), 138 deletions(-) delete mode 100644 webrtc/rtc_base/annotations.h delete mode 100644 webrtc/rtc_base/arch.h diff --git a/webrtc/common_audio/resampler/sinc_resampler.cc b/webrtc/common_audio/resampler/sinc_resampler.cc index 2f17ded98b..acf7d0fae9 100644 --- a/webrtc/common_audio/resampler/sinc_resampler.cc +++ b/webrtc/common_audio/resampler/sinc_resampler.cc @@ -160,12 +160,12 @@ SincResampler::SincResampler(double io_sample_rate_ratio, AlignedMalloc(sizeof(float) * kKernelStorageSize, 16))), input_buffer_(static_cast( AlignedMalloc(sizeof(float) * input_buffer_size_, 16))), -#if (defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__)) +#if defined(WEBRTC_CPU_DETECTION) convolve_proc_(nullptr), #endif r1_(input_buffer_.get()), r2_(input_buffer_.get() + kKernelSize / 2) { -#if (defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__)) +#if defined(WEBRTC_CPU_DETECTION) InitializeCPUSpecificFeatures(); RTC_DCHECK(convolve_proc_); #endif diff --git a/webrtc/common_audio/resampler/sinc_resampler.h b/webrtc/common_audio/resampler/sinc_resampler.h index 50059e53c7..fa92163f86 100644 --- a/webrtc/common_audio/resampler/sinc_resampler.h +++ b/webrtc/common_audio/resampler/sinc_resampler.h @@ -149,7 +149,7 @@ class SincResampler { // TODO(ajm): Move to using a global static which must only be initialized // once by the user. We're not doing this initially, because we don't have // e.g. a LazyInstance helper in webrtc. -#if (defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__)) +#if defined(WEBRTC_CPU_DETECTION) typedef float (*ConvolveProc)(const float*, const float*, const float*, double); ConvolveProc convolve_proc_; diff --git a/webrtc/modules/audio_coding/neteq/neteq_impl.cc b/webrtc/modules/audio_coding/neteq/neteq_impl.cc index f4ace1b160..7858e846f6 100644 --- a/webrtc/modules/audio_coding/neteq/neteq_impl.cc +++ b/webrtc/modules/audio_coding/neteq/neteq_impl.cc @@ -935,7 +935,7 @@ int NetEqImpl::GetAudioInternal(AudioFrame* audio_frame, bool* muted) { static_cast(output_size_samples_)); // Skipping break on purpose. Execution should move on into the // next case. - RTC_FALLTHROUGH(); + FALLTHROUGH(); } case kAudioRepetition: { // TODO(hlundin): Write test for this. diff --git a/webrtc/modules/audio_device/ios/voice_processing_audio_unit.mm b/webrtc/modules/audio_device/ios/voice_processing_audio_unit.mm index 591a176d8f..3701f3fee3 100644 --- a/webrtc/modules/audio_device/ios/voice_processing_audio_unit.mm +++ b/webrtc/modules/audio_device/ios/voice_processing_audio_unit.mm @@ -434,12 +434,12 @@ void VoiceProcessingAudioUnit::DisposeAudioUnit() { case kStarted: Stop(); // Fall through. - RTC_FALLTHROUGH(); + FALLTHROUGH(); case kInitialized: Uninitialize(); break; case kUninitialized: - RTC_FALLTHROUGH(); + FALLTHROUGH(); case kInitRequired: break; } diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe.cc index 566f93bfac..abc301cfca 100644 --- a/webrtc/modules/remote_bitrate_estimator/test/bwe.cc +++ b/webrtc/modules/remote_bitrate_estimator/test/bwe.cc @@ -97,7 +97,7 @@ BweSender* CreateBweSender(BandwidthEstimatorType estimator, case kBbrEstimator: return new BbrBweSender(observer, clock); case kTcpEstimator: - RTC_FALLTHROUGH(); + FALLTHROUGH(); case kNullEstimator: return new NullBweSender(); } diff --git a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc index eb33bccd02..5aa7e27d23 100644 --- a/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc +++ b/webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc @@ -574,7 +574,7 @@ bool RtpDepacketizerH264::ProcessStapAOrSingleNalu( } case H264::NaluType::kIdr: parsed_payload->frame_type = kVideoFrameKey; - RTC_FALLTHROUGH(); + FALLTHROUGH(); case H264::NaluType::kSlice: { rtc::Optional pps_id = PpsParser::ParsePpsIdFromSlice( &payload_data[start_offset], end_offset - start_offset); diff --git a/webrtc/modules/video_coding/jitter_buffer.cc b/webrtc/modules/video_coding/jitter_buffer.cc index eaf09beb1d..a5560808dd 100644 --- a/webrtc/modules/video_coding/jitter_buffer.cc +++ b/webrtc/modules/video_coding/jitter_buffer.cc @@ -749,7 +749,7 @@ VCMFrameBufferEnum VCMJitterBuffer::InsertPacket(const VCMPacket& packet, frame_event_->Set(); } } - RTC_FALLTHROUGH(); + FALLTHROUGH(); } // Note: There is no break here - continuing to kDecodableSession. case kDecodableSession: { diff --git a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc index 82af3397e8..e167e15c52 100644 --- a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc +++ b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc @@ -71,7 +71,7 @@ void RtpFrameReferenceFinder::RetryStashedFrames() { case kHandOff: complete_frame = true; frame_callback_->OnCompleteFrame(std::move(*frame_it)); - RTC_FALLTHROUGH(); + FALLTHROUGH(); case kDrop: frame_it = stashed_frames_.erase(frame_it); } diff --git a/webrtc/rtc_base/BUILD.gn b/webrtc/rtc_base/BUILD.gn index 76de9c0dfd..902024f3f1 100644 --- a/webrtc/rtc_base/BUILD.gn +++ b/webrtc/rtc_base/BUILD.gn @@ -98,8 +98,6 @@ rtc_static_library("rtc_base_approved") { all_dependent_configs = [ ":rtc_base_approved_all_dependent_config" ] sources = [ - "annotations.h", - "arch.h", "array_view.h", "arraysize.h", "atomicops.h", diff --git a/webrtc/rtc_base/annotations.h b/webrtc/rtc_base/annotations.h deleted file mode 100644 index 25dac33a33..0000000000 --- a/webrtc/rtc_base/annotations.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef WEBRTC_RTC_BASE_ANNOTATIONS_H_ -#define WEBRTC_RTC_BASE_ANNOTATIONS_H_ - -// Annotate a function indicating the caller must examine the return value. -// Use like: -// int foo() RTC_WARN_UNUSED_RESULT; -// To explicitly ignore a result, cast to void. -// TODO(kwiberg): Remove when we can use [[nodiscard]] from C++17. -#if defined(__clang__) -#define RTC_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) -#elif defined(__GNUC__) -// gcc has a __warn_unused_result__ attribute, but you can't quiet it by -// casting to void, so we don't use it. -#define RTC_WARN_UNUSED_RESULT -#else -#define RTC_WARN_UNUSED_RESULT -#endif - -// Macro to be used for switch-case fallthrough (required for enabling -// -Wimplicit-fallthrough warning on Clang). -#if defined(__clang__) -#define RTC_FALLTHROUGH() [[clang::fallthrough]] -#else -#define RTC_FALLTHROUGH() do { } while (0) -#endif - -// Prevent the compiler from warning about an unused variable. For example: -// int result = DoSomething(); -// assert(result == 17); -// RTC_UNUSED(result); -// Note: In most cases it is better to remove the unused variable rather than -// suppressing the compiler warning. -#define RTC_UNUSED(x) static_cast(x) - -#endif // WEBRTC_RTC_BASE_ANNOTATIONS_H_ diff --git a/webrtc/rtc_base/arch.h b/webrtc/rtc_base/arch.h deleted file mode 100644 index 0137503d2e..0000000000 --- a/webrtc/rtc_base/arch.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -// This file contains platform-specific defines. -// Much of it is derived from Chromium's build/build_config.h. - -#ifndef WEBRTC_RTC_BASE_ARCH_H_ -#define WEBRTC_RTC_BASE_ARCH_H_ - -// Processor architecture detection. For more info on what's defined, see: -// http://msdn.microsoft.com/en-us/library/b0084kay.aspx -// http://www.agner.org/optimize/calling_conventions.pdf -// or with gcc, run: "echo | gcc -E -dM -" -#if defined(_M_X64) || defined(__x86_64__) -#define WEBRTC_ARCH_X86_FAMILY -#define WEBRTC_ARCH_X86_64 -#define WEBRTC_ARCH_64_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__aarch64__) -#define WEBRTC_ARCH_ARM_FAMILY -#define WEBRTC_ARCH_64_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(_M_IX86) || defined(__i386__) -#define WEBRTC_ARCH_X86_FAMILY -#define WEBRTC_ARCH_X86 -#define WEBRTC_ARCH_32_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__ARMEL__) -#define WEBRTC_ARCH_ARM_FAMILY -#define WEBRTC_ARCH_32_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__MIPSEL__) -#define WEBRTC_ARCH_MIPS_FAMILY -#if defined(__LP64__) -#define WEBRTC_ARCH_64_BITS -#else -#define WEBRTC_ARCH_32_BITS -#endif -#define WEBRTC_ARCH_LITTLE_ENDIAN -#elif defined(__pnacl__) -#define WEBRTC_ARCH_32_BITS -#define WEBRTC_ARCH_LITTLE_ENDIAN -#else -#error Please add support for your architecture in rtc_base/arch.h -#endif - -#if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN)) -#error Define either WEBRTC_ARCH_LITTLE_ENDIAN or WEBRTC_ARCH_BIG_ENDIAN -#endif - -#endif // WEBRTC_RTC_BASE_ARCH_H_ diff --git a/webrtc/rtc_base/checks.cc b/webrtc/rtc_base/checks.cc index ee0bbb8b17..533240f066 100644 --- a/webrtc/rtc_base/checks.cc +++ b/webrtc/rtc_base/checks.cc @@ -100,7 +100,7 @@ FatalMessage::FatalMessage(const char* file, int line, std::string* result) { delete result; } -RTC_NO_RETURN FatalMessage::~FatalMessage() { +NO_RETURN FatalMessage::~FatalMessage() { fflush(stdout); fflush(stderr); stream_ << std::endl << "#" << std::endl; @@ -136,8 +136,6 @@ template std::string* MakeCheckOpString( } // namespace rtc // Function to call from the C version of the RTC_CHECK and RTC_DCHECK macros. -RTC_NO_RETURN void rtc_FatalMessage(const char* file, - int line, - const char* msg) { +NO_RETURN void rtc_FatalMessage(const char* file, int line, const char* msg) { rtc::FatalMessage(file, line).stream() << msg; } diff --git a/webrtc/rtc_base/checks.h b/webrtc/rtc_base/checks.h index d1a3ccb91b..f9507e239c 100644 --- a/webrtc/rtc_base/checks.h +++ b/webrtc/rtc_base/checks.h @@ -11,6 +11,8 @@ #ifndef WEBRTC_RTC_BASE_CHECKS_H_ #define WEBRTC_RTC_BASE_CHECKS_H_ +#include "webrtc/typedefs.h" + // If you for some reson need to know if DCHECKs are on, test the value of // RTC_DCHECK_IS_ON. (Test its value, not if it's defined; it'll always be // defined, to either a true or a false value.) @@ -20,20 +22,10 @@ #define RTC_DCHECK_IS_ON 0 #endif -// Annotate a function that will not return control flow to the caller. -#if defined(_MSC_VER) -#define RTC_NO_RETURN __declspec(noreturn) -#elif defined(__GNUC__) -#define RTC_NO_RETURN __attribute__ ((__noreturn__)) -#else -#define RTC_NO_RETURN -#endif - #ifdef __cplusplus extern "C" { #endif -RTC_NO_RETURN - void rtc_FatalMessage(const char* file, int line, const char* msg); +NO_RETURN void rtc_FatalMessage(const char* file, int line, const char* msg); #ifdef __cplusplus } // extern "C" #endif @@ -240,7 +232,7 @@ class FatalMessage { FatalMessage(const char* file, int line); // Used for RTC_CHECK_EQ(), etc. Takes ownership of the given string. FatalMessage(const char* file, int line, std::string* result); - RTC_NO_RETURN ~FatalMessage(); + NO_RETURN ~FatalMessage(); std::ostream& stream() { return stream_; } diff --git a/webrtc/rtc_base/httpbase.cc b/webrtc/rtc_base/httpbase.cc index cb7bac1ec1..64cb5d9f09 100644 --- a/webrtc/rtc_base/httpbase.cc +++ b/webrtc/rtc_base/httpbase.cc @@ -537,7 +537,7 @@ bool HttpBase::DoReceiveLoop(HttpError* error) { case SR_EOS: // Clean close, with no error. read_error = 0; - RTC_FALLTHROUGH(); // Fall through to HandleStreamClose. + FALLTHROUGH(); // Fall through to HandleStreamClose. case SR_ERROR: *error = HandleStreamClose(read_error); return true; diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h index 84a7c08ee5..bd0bee75c2 100644 --- a/webrtc/typedefs.h +++ b/webrtc/typedefs.h @@ -8,14 +8,118 @@ * be found in the AUTHORS file in the root of the source tree. */ +// This file contains platform-specific typedefs and defines. +// Much of it is derived from Chromium's build/build_config.h. + #ifndef WEBRTC_TYPEDEFS_H_ #define WEBRTC_TYPEDEFS_H_ -// TODO(solenberg): Delete this file once downstream projects have been updated. +// Processor architecture detection. For more info on what's defined, see: +// http://msdn.microsoft.com/en-us/library/b0084kay.aspx +// http://www.agner.org/optimize/calling_conventions.pdf +// or with gcc, run: "echo | gcc -E -dM -" +#if defined(_M_X64) || defined(__x86_64__) +#define WEBRTC_ARCH_X86_FAMILY +#define WEBRTC_ARCH_X86_64 +#define WEBRTC_ARCH_64_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#elif defined(__aarch64__) +#define WEBRTC_ARCH_ARM_FAMILY +#define WEBRTC_ARCH_64_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#elif defined(_M_IX86) || defined(__i386__) +#define WEBRTC_ARCH_X86_FAMILY +#define WEBRTC_ARCH_X86 +#define WEBRTC_ARCH_32_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#elif defined(__ARMEL__) +#define WEBRTC_ARCH_ARM_FAMILY +#define WEBRTC_ARCH_32_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#elif defined(__MIPSEL__) +#define WEBRTC_ARCH_MIPS_FAMILY +#if defined(__LP64__) +#define WEBRTC_ARCH_64_BITS +#else +#define WEBRTC_ARCH_32_BITS +#endif +#define WEBRTC_ARCH_LITTLE_ENDIAN +#elif defined(__pnacl__) +#define WEBRTC_ARCH_32_BITS +#define WEBRTC_ARCH_LITTLE_ENDIAN +#else +#error Please add support for your architecture in typedefs.h +#endif + +#if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN)) +#error Define either WEBRTC_ARCH_LITTLE_ENDIAN or WEBRTC_ARCH_BIG_ENDIAN +#endif + +// TODO(zhongwei.yao): WEBRTC_CPU_DETECTION is only used in one place; we should +// probably just remove it. +#if (defined(WEBRTC_ARCH_X86_FAMILY) && !defined(__SSE2__)) +#define WEBRTC_CPU_DETECTION +#endif #include -#include "webrtc/rtc_base/arch.h" -#include "webrtc/rtc_base/annotations.h" +// Annotate a function indicating the caller must examine the return value. +// Use like: +// int foo() RTC_WARN_UNUSED_RESULT; +// To explicitly ignore a result, cast to void. +// TODO(kwiberg): Remove when we can use [[nodiscard]] from C++17. +#if defined(__clang__) +#define RTC_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) +#elif defined(__GNUC__) +// gcc has a __warn_unused_result__ attribute, but you can't quiet it by +// casting to void, so we don't use it. +#define RTC_WARN_UNUSED_RESULT +#else +#define RTC_WARN_UNUSED_RESULT +#endif + +// Put after a variable that might not be used, to prevent compiler warnings: +// int result ATTRIBUTE_UNUSED = DoSomething(); +// assert(result == 17); +// Deprecated since it only works with GCC & clang. See RTC_UNUSED below. +// TODO(terelius): Remove. +#ifndef ATTRIBUTE_UNUSED +#if defined(__GNUC__) || defined(__clang__) +#define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) +#else +#define ATTRIBUTE_UNUSED +#endif +#endif + +// Macro to be used for switch-case fallthrough (required for enabling +// -Wimplicit-fallthrough warning on Clang). +#ifndef FALLTHROUGH +#if defined(__clang__) +#define FALLTHROUGH() [[clang::fallthrough]] +#else +#define FALLTHROUGH() do { } while (0) +#endif +#endif + +#ifndef NO_RETURN +// Annotate a function that will not return control flow to the caller. +#if defined(_MSC_VER) +#define NO_RETURN __declspec(noreturn) +#elif defined(__GNUC__) +#define NO_RETURN __attribute__ ((__noreturn__)) +#else +#define NO_RETURN +#endif +#endif + +// Prevent the compiler from warning about an unused variable. For example: +// int result = DoSomething(); +// assert(result == 17); +// RTC_UNUSED(result); +// Note: In most cases it is better to remove the unused variable rather than +// suppressing the compiler warning. +#ifndef RTC_UNUSED +#define RTC_UNUSED(x) static_cast(x) +#endif // RTC_UNUSED #endif // WEBRTC_TYPEDEFS_H_ diff --git a/webrtc/video/rtp_video_stream_receiver.cc b/webrtc/video/rtp_video_stream_receiver.cc index 500c0bcab2..a47055abf0 100644 --- a/webrtc/video/rtp_video_stream_receiver.cc +++ b/webrtc/video/rtp_video_stream_receiver.cc @@ -268,7 +268,7 @@ int32_t RtpVideoStreamReceiver::OnReceivedPayloadData( switch (tracker_.CopyAndFixBitstream(&packet)) { case video_coding::H264SpsPpsTracker::kRequestKeyframe: keyframe_request_sender_->RequestKeyFrame(); - RTC_FALLTHROUGH(); + FALLTHROUGH(); case video_coding::H264SpsPpsTracker::kDrop: return 0; case video_coding::H264SpsPpsTracker::kInsert: diff --git a/webrtc/video/video_stream_encoder.cc b/webrtc/video/video_stream_encoder.cc index 7d810dc194..52dcbf0832 100644 --- a/webrtc/video/video_stream_encoder.cc +++ b/webrtc/video/video_stream_encoder.cc @@ -978,7 +978,7 @@ void VideoStreamEncoder::AdaptDown(AdaptReason reason) { break; } // Scale down resolution. - RTC_FALLTHROUGH(); + FALLTHROUGH(); } case VideoSendStream::DegradationPreference::kMaintainFramerate: // Scale down resolution. @@ -1056,7 +1056,7 @@ void VideoStreamEncoder::AdaptUp(AdaptReason reason) { break; } // Scale up resolution. - RTC_FALLTHROUGH(); + FALLTHROUGH(); } case VideoSendStream::DegradationPreference::kMaintainFramerate: { // Scale up resolution.