Replace RTC_FALLTHROUGH with ABSL_FALLTHROUGH_INTENTED

Bug: None
Change-Id: I7287403f3fb13b8e30f92ca3cf1882b03bb53a6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/166176
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30283}
This commit is contained in:
Danil Chapovalov
2020-01-16 14:41:10 +01:00
committed by Commit Bot
parent 4c1086a36a
commit 64f1f3f04e
23 changed files with 130 additions and 384 deletions

View File

@ -58,9 +58,7 @@ rtc_library("video_frame") {
rtc_source_set("recordable_encoded_frame") {
visibility = [ "*" ]
sources = [
"recordable_encoded_frame.h",
]
sources = [ "recordable_encoded_frame.h" ]
deps = [
":encoded_image",
@ -75,9 +73,7 @@ rtc_source_set("recordable_encoded_frame") {
rtc_source_set("video_frame_type") {
visibility = [ "*" ]
sources = [
"video_frame_type.h",
]
sources = [ "video_frame_type.h" ]
}
rtc_library("video_frame_i420") {
@ -146,16 +142,12 @@ rtc_library("encoded_frame") {
"encoded_frame.h",
]
deps = [
"../../modules/video_coding:encoded_frame",
]
deps = [ "../../modules/video_coding:encoded_frame" ]
}
rtc_source_set("video_codec_constants") {
visibility = [ "*" ]
sources = [
"video_codec_constants.h",
]
sources = [ "video_codec_constants.h" ]
deps = []
}
@ -189,9 +181,7 @@ rtc_library("video_bitrate_allocator") {
rtc_source_set("video_bitrate_allocator_factory") {
visibility = [ "*" ]
sources = [
"video_bitrate_allocator_factory.h",
]
sources = [ "video_bitrate_allocator_factory.h" ]
deps = [
":video_bitrate_allocator",
"../../rtc_base:rtc_base_approved",
@ -201,9 +191,7 @@ rtc_source_set("video_bitrate_allocator_factory") {
rtc_source_set("video_stream_decoder") {
visibility = [ "*" ]
sources = [
"video_stream_decoder.h",
]
sources = [ "video_stream_decoder.h" ]
deps = [
":encoded_frame",
@ -288,17 +276,15 @@ rtc_library("builtin_video_bitrate_allocator_factory") {
"../../media:rtc_media_base",
"../../modules/video_coding:video_coding_utility",
"../../modules/video_coding:webrtc_vp9_helpers",
"../../rtc_base/system:fallthrough",
"../video_codecs:video_codecs_api",
"//third_party/abseil-cpp/absl/base:core_headers",
]
}
if (rtc_include_tests) {
rtc_library("video_unittests") {
testonly = true
sources = [
"video_stream_decoder_create_unittest.cc",
]
sources = [ "video_stream_decoder_create_unittest.cc" ]
deps = [
":video_stream_decoder_create",
"../../test:test_support",

View File

@ -12,12 +12,12 @@
#include <memory>
#include "absl/base/macros.h"
#include "api/video/video_bitrate_allocator.h"
#include "api/video_codecs/video_codec.h"
#include "modules/video_coding/codecs/vp9/svc_rate_allocator.h"
#include "modules/video_coding/utility/default_video_bitrate_allocator.h"
#include "modules/video_coding/utility/simulcast_rate_allocator.h"
#include "rtc_base/system/fallthrough.h"
namespace webrtc {
@ -34,7 +34,7 @@ class BuiltinVideoBitrateAllocatorFactory
std::unique_ptr<VideoBitrateAllocator> rate_allocator;
switch (codec.codecType) {
case kVideoCodecVP8:
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
case kVideoCodecH264:
rate_allocator.reset(new SimulcastRateAllocator(codec));
break;

View File

@ -58,12 +58,8 @@ rtc_library("video_codecs_api") {
rtc_source_set("bitstream_parser_api") {
visibility = [ "*" ]
sources = [
"bitstream_parser.h",
]
deps = [
"..:array_view",
]
sources = [ "bitstream_parser.h" ]
deps = [ "..:array_view" ]
}
rtc_library("builtin_video_decoder_factory") {
@ -143,13 +139,13 @@ rtc_library("rtc_software_fallback_wrappers") {
"../../modules/video_coding:video_codec_interface",
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
"../../rtc_base/system:fallthrough",
"../../rtc_base/system:rtc_export",
"../../system_wrappers:field_trial",
"../video:encoded_image",
"../video:video_bitrate_allocation",
"../video:video_frame",
"../video:video_rtp_headers",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/types:optional",
]
}

View File

@ -16,12 +16,12 @@
#include <string>
#include <utility>
#include "absl/base/macros.h"
#include "api/video/encoded_image.h"
#include "api/video_codecs/video_codec.h"
#include "modules/video_coding/include/video_error_codes.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/system/fallthrough.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/field_trial.h"
@ -166,7 +166,7 @@ int32_t VideoDecoderSoftwareFallbackWrapper::Decode(
}
// Fallback decoder initialized, fall-through.
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
}
case DecoderType::kFallback:
return fallback_decoder_->Decode(input_image, missing_frames,

View File

@ -16,12 +16,8 @@ visibility = [ ":*" ]
rtc_source_set("audio_coding_module_typedefs") {
visibility += [ "*" ]
sources = [
"include/audio_coding_module_typedefs.h",
]
deps = [
"../../rtc_base:deprecation",
]
sources = [ "include/audio_coding_module_typedefs.h" ]
deps = [ "../../rtc_base:deprecation" ]
}
rtc_library("audio_coding") {
@ -144,9 +140,7 @@ rtc_library("g711") {
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
public_deps = [
":g711_c",
]
public_deps = [ ":g711_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("g711_c") {
@ -155,9 +149,7 @@ rtc_library("g711_c") {
"codecs/g711/g711_interface.c",
"codecs/g711/g711_interface.h",
]
deps = [
"../third_party/g711:g711_3p",
]
deps = [ "../third_party/g711:g711_3p" ]
}
rtc_library("g722") {
@ -178,9 +170,7 @@ rtc_library("g722") {
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
public_deps = [
":g722_c",
]
public_deps = [ ":g722_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("g722_c") {
@ -189,9 +179,7 @@ rtc_library("g722_c") {
"codecs/g722/g722_interface.c",
"codecs/g722/g722_interface.h",
]
deps = [
"../third_party/g722:g722_3p",
]
deps = [ "../third_party/g722:g722_3p" ]
}
rtc_library("ilbc") {
@ -213,9 +201,7 @@ rtc_library("ilbc") {
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
public_deps = [
":ilbc_c",
]
public_deps = [ ":ilbc_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("ilbc_c") {
@ -406,15 +392,11 @@ rtc_library("isac") {
":isac_common",
"../../api/audio_codecs:audio_codecs_api",
]
public_deps = [
":isac_c",
]
public_deps = [ ":isac_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_source_set("isac_bwinfo") {
sources = [
"codecs/isac/bandwidth_info.h",
]
sources = [ "codecs/isac/bandwidth_info.h" ]
deps = []
}
@ -517,9 +499,7 @@ rtc_library("isac_fix") {
"../../common_audio",
"../../system_wrappers",
]
public_deps = [
":isac_fix_c",
]
public_deps = [ ":isac_fix_c" ] # no-presubmit-check TODO(webrtc:8603)
if (rtc_build_with_neon) {
deps += [ ":isac_neon" ]
@ -618,9 +598,7 @@ rtc_library("isac_fix_c") {
"../third_party/fft",
]
public_deps = [
":isac_fix_common",
]
public_deps = [ ":isac_fix_common" ] # no-presubmit-check TODO(webrtc:8603)
if (rtc_build_with_neon) {
deps += [ ":isac_neon" ]
@ -713,9 +691,7 @@ rtc_library("pcm16b") {
"../../rtc_base:checks",
"../../rtc_base:rtc_base_approved",
]
public_deps = [
":pcm16b_c",
]
public_deps = [ ":pcm16b_c" ] # no-presubmit-check TODO(webrtc:8603)
}
rtc_library("pcm16b_c") {
@ -768,9 +744,7 @@ rtc_library("webrtc_opus") {
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
public_deps = [ # no-presubmit-check TODO(webrtc:8603)
":webrtc_opus_wrapper",
]
public_deps = [ ":webrtc_opus_wrapper" ] # no-presubmit-check TODO(webrtc:8603)
defines = audio_codec_defines
@ -806,9 +780,7 @@ rtc_library("webrtc_multiopus") {
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
public_deps = [ # no-presubmit-check TODO(webrtc:8603)
":webrtc_opus_wrapper",
]
public_deps = [ ":webrtc_opus_wrapper" ] # no-presubmit-check TODO(webrtc:8603)
defines = audio_codec_defines
@ -830,9 +802,7 @@ rtc_library("webrtc_opus_wrapper") {
defines = audio_coding_defines
if (rtc_build_opus) {
public_deps = [
rtc_opus_dir,
]
public_deps = [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603)
} else if (build_with_mozilla) {
include_dirs = [ getenv("DIST") + "/include/opus" ]
}
@ -848,17 +818,13 @@ rtc_library("webrtc_opus_wrapper") {
if (rtc_enable_protobuf) {
proto_library("ana_debug_dump_proto") {
visibility += webrtc_default_visibility
sources = [
"audio_network_adaptor/debug_dump.proto",
]
sources = [ "audio_network_adaptor/debug_dump.proto" ]
link_deps = [ ":ana_config_proto" ]
proto_out_dir = "modules/audio_coding/audio_network_adaptor"
}
proto_library("ana_config_proto") {
visibility += [ "*" ]
sources = [
"audio_network_adaptor/config.proto",
]
sources = [ "audio_network_adaptor/config.proto" ]
proto_out_dir = "modules/audio_coding/audio_network_adaptor"
}
}
@ -869,9 +835,7 @@ rtc_library("audio_network_adaptor_config") {
"audio_network_adaptor/audio_network_adaptor_config.cc",
"audio_network_adaptor/include/audio_network_adaptor_config.h",
]
deps = [
"//third_party/abseil-cpp/absl/types:optional",
]
deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("audio_network_adaptor") {
@ -901,9 +865,7 @@ rtc_library("audio_network_adaptor") {
"audio_network_adaptor/util/threshold_curve.h",
]
public_deps = [
":audio_network_adaptor_config",
]
public_deps = [ ":audio_network_adaptor_config" ] # no-presubmit-check TODO(webrtc:8603)
deps = [
"../../api/audio_codecs:audio_codecs_api",
@ -1016,7 +978,6 @@ rtc_library("neteq") {
"../../rtc_base:safe_minmax",
"../../rtc_base:sanitizer",
"../../rtc_base/experiments:field_trial_parser",
"../../rtc_base/system:fallthrough",
"../../system_wrappers",
"../../system_wrappers:field_trial",
"../../system_wrappers:metrics",
@ -1199,9 +1160,7 @@ if (rtc_enable_protobuf) {
"../rtp_rtcp:rtp_rtcp_format",
"//third_party/abseil-cpp/absl/types:optional",
]
public_deps = [
"../../logging:rtc_event_log_proto",
]
public_deps = [ "../../logging:rtc_event_log_proto" ] # no-presubmit-check TODO(webrtc:8603)
}
# Only used for test purpose. Since we want to use it from chromium
@ -1209,9 +1168,7 @@ if (rtc_enable_protobuf) {
# under rtc_include_tests.
proto_library("neteq_unittest_proto") {
testonly = true
sources = [
"neteq/neteq_unittest.proto",
]
sources = [ "neteq/neteq_unittest.proto" ]
proto_out_dir = "modules/audio_coding/neteq"
}
}
@ -1480,17 +1437,13 @@ if (rtc_include_tests) {
bundle_data("audio_decoder_unittests_bundle_data") {
testonly = true
sources = audio_decoder_unittests_resources
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
rtc_test("audio_decoder_unittests") {
testonly = true
sources = [
"neteq/audio_decoder_unittest.cc",
]
sources = [ "neteq/audio_decoder_unittest.cc" ]
defines = neteq_defines
@ -1564,9 +1517,7 @@ if (rtc_include_tests) {
"//third_party/abseil-cpp/absl/strings",
"//third_party/abseil-cpp/absl/types:optional",
]
sources = [
"neteq/tools/neteq_rtpplay.cc",
]
sources = [ "neteq/tools/neteq_rtpplay.cc" ]
}
}
@ -1580,18 +1531,14 @@ if (rtc_include_tests) {
bundle_data("audio_codec_speed_tests_data") {
testonly = true
sources = audio_codec_speed_tests_resources
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
rtc_test("audio_codec_speed_tests") {
testonly = true
defines = []
deps = [
"../../test:fileutils",
]
deps = [ "../../test:fileutils" ]
sources = [
"codecs/isac/fix/test/isac_speed_test.cc",
"codecs/opus/opus_speed_test.cc",
@ -1688,9 +1635,7 @@ if (rtc_include_tests) {
"../../rtc_base:safe_conversions",
]
sources = [
"neteq/tools/rtp_encode.cc",
]
sources = [ "neteq/tools/rtp_encode.cc" ]
defines = audio_coding_defines
}
@ -1704,9 +1649,7 @@ if (rtc_include_tests) {
"../../rtc_base:rtc_base_approved",
]
sources = [
"neteq/tools/rtp_jitter.cc",
]
sources = [ "neteq/tools/rtp_jitter.cc" ]
defines = audio_coding_defines
}
@ -1714,9 +1657,7 @@ if (rtc_include_tests) {
rtc_executable("rtpcat") {
testonly = true
sources = [
"neteq/tools/rtpcat.cc",
]
sources = [ "neteq/tools/rtpcat.cc" ]
deps = [
"../../rtc_base:checks",
@ -1729,9 +1670,7 @@ if (rtc_include_tests) {
rtc_executable("rtp_analyze") {
testonly = true
sources = [
"neteq/tools/rtp_analyze.cc",
]
sources = [ "neteq/tools/rtp_analyze.cc" ]
deps = [
":neteq",
@ -1746,9 +1685,7 @@ if (rtc_include_tests) {
rtc_executable("neteq_opus_quality_test") {
testonly = true
sources = [
"neteq/test/neteq_opus_quality_test.cc",
]
sources = [ "neteq/test/neteq_opus_quality_test.cc" ]
deps = [
":neteq",
@ -1765,9 +1702,7 @@ if (rtc_include_tests) {
rtc_executable("neteq_speed_test") {
testonly = true
sources = [
"neteq/test/neteq_speed_test.cc",
]
sources = [ "neteq/test/neteq_speed_test.cc" ]
deps = [
":neteq",
@ -1782,9 +1717,7 @@ if (rtc_include_tests) {
rtc_executable("neteq_ilbc_quality_test") {
testonly = true
sources = [
"neteq/test/neteq_ilbc_quality_test.cc",
]
sources = [ "neteq/test/neteq_ilbc_quality_test.cc" ]
deps = [
":ilbc",
@ -1803,9 +1736,7 @@ if (rtc_include_tests) {
rtc_executable("neteq_isac_quality_test") {
testonly = true
sources = [
"neteq/test/neteq_isac_quality_test.cc",
]
sources = [ "neteq/test/neteq_isac_quality_test.cc" ]
deps = [
":isac_fix",
@ -1821,9 +1752,7 @@ if (rtc_include_tests) {
rtc_executable("neteq_pcmu_quality_test") {
testonly = true
sources = [
"neteq/test/neteq_pcmu_quality_test.cc",
]
sources = [ "neteq/test/neteq_pcmu_quality_test.cc" ]
deps = [
":g711",
@ -1841,9 +1770,7 @@ if (rtc_include_tests) {
rtc_executable("neteq_pcm16b_quality_test") {
testonly = true
sources = [
"neteq/test/neteq_pcm16b_quality_test.cc",
]
sources = [ "neteq/test/neteq_pcm16b_quality_test.cc" ]
deps = [
":neteq",
@ -1861,9 +1788,7 @@ if (rtc_include_tests) {
rtc_executable("isac_fix_test") {
testonly = true
sources = [
"codecs/isac/fix/test/kenny.cc",
]
sources = [ "codecs/isac/fix/test/kenny.cc" ]
deps = [
":isac_fix",
@ -1871,9 +1796,7 @@ if (rtc_include_tests) {
"../../test:test_support",
]
data = [
"../../resources/speech_and_misc_wb.pcm",
]
data = [ "../../resources/speech_and_misc_wb.pcm" ]
}
rtc_library("isac_test_util") {
@ -1887,9 +1810,7 @@ if (rtc_include_tests) {
rtc_executable("isac_test") {
testonly = true
sources = [
"codecs/isac/main/test/simpleKenny.c",
]
sources = [ "codecs/isac/main/test/simpleKenny.c" ]
deps = [
":isac",
@ -1901,33 +1822,23 @@ if (rtc_include_tests) {
rtc_executable("g711_test") {
testonly = true
sources = [
"codecs/g711/test/testG711.cc",
]
sources = [ "codecs/g711/test/testG711.cc" ]
deps = [
":g711",
]
deps = [ ":g711" ]
}
rtc_executable("g722_test") {
testonly = true
sources = [
"codecs/g722/test/testG722.cc",
]
sources = [ "codecs/g722/test/testG722.cc" ]
deps = [
":g722",
]
deps = [ ":g722" ]
}
rtc_executable("isac_api_test") {
testonly = true
sources = [
"codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc",
]
sources = [ "codecs/isac/main/test/ReleaseTest-API/ReleaseTest-API.cc" ]
deps = [
":isac",
@ -1939,9 +1850,7 @@ if (rtc_include_tests) {
rtc_executable("isac_switch_samprate_test") {
testonly = true
sources = [
"codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc",
]
sources = [ "codecs/isac/main/test/SwitchingSampRate/SwitchingSampRate.cc" ]
deps = [
":isac",
@ -1954,21 +1863,15 @@ if (rtc_include_tests) {
rtc_executable("ilbc_test") {
testonly = true
sources = [
"codecs/ilbc/test/iLBC_test.c",
]
sources = [ "codecs/ilbc/test/iLBC_test.c" ]
deps = [
":ilbc",
]
deps = [ ":ilbc" ]
}
rtc_executable("webrtc_opus_fec_test") {
testonly = true
sources = [
"codecs/opus/opus_fec_test.cc",
]
sources = [ "codecs/opus/opus_fec_test.cc" ]
deps = [
":webrtc_opus",
@ -2147,12 +2050,8 @@ if (rtc_include_tests) {
# TODO(kwiberg): Remove this.
rtc_source_set("audio_decoder_interface") {
visibility += [ "*" ]
sources = [
"codecs/audio_decoder.h",
]
deps = [
"../../api/audio_codecs:audio_codecs_api",
]
sources = [ "codecs/audio_decoder.h" ]
deps = [ "../../api/audio_codecs:audio_codecs_api" ]
}
# For backwards compatibility only! Use
@ -2160,10 +2059,6 @@ rtc_source_set("audio_decoder_interface") {
# TODO(ossu): Remove this.
rtc_source_set("audio_encoder_interface") {
visibility += [ "*" ]
sources = [
"codecs/audio_encoder.h",
]
deps = [
"../../api/audio_codecs:audio_codecs_api",
]
sources = [ "codecs/audio_encoder.h" ]
deps = [ "../../api/audio_codecs:audio_codecs_api" ]
}

View File

@ -36,8 +36,8 @@ rtc_library("bbr_controller") {
"../../../rtc_base:checks",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base/experiments:field_trial_parser",
"../../../rtc_base/system:fallthrough",
"../../../system_wrappers:field_trial",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@ -77,12 +77,8 @@ rtc_library("data_transfer_tracker") {
rtc_source_set("packet_number_indexed_queue") {
visibility = [ ":*" ]
sources = [
"packet_number_indexed_queue.h",
]
deps = [
"../../../rtc_base:checks",
]
sources = [ "packet_number_indexed_queue.h" ]
deps = [ "../../../rtc_base:checks" ]
}
rtc_library("loss_rate_filter") {
@ -91,9 +87,7 @@ rtc_library("loss_rate_filter") {
"loss_rate_filter.cc",
"loss_rate_filter.h",
]
deps = [
"//third_party/abseil-cpp/absl/types:optional",
]
deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("rtt_stats") {
visibility = [ ":*" ]
@ -110,9 +104,7 @@ rtc_library("rtt_stats") {
}
rtc_source_set("windowed_filter") {
visibility = [ ":*" ]
sources = [
"windowed_filter.h",
]
sources = [ "windowed_filter.h" ]
}
if (rtc_include_tests) {
rtc_library("bbr_unittests") {

View File

@ -15,9 +15,9 @@
#include <string>
#include <vector>
#include "absl/base/macros.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {
@ -784,7 +784,7 @@ void BbrNetworkController::UpdateRecoveryState(int64_t last_acked_packet,
if (is_round_start) {
recovery_state_ = GROWTH;
}
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
case GROWTH:
// Exit recovery if appropriate.
if (!has_losses &&

View File

@ -277,13 +277,13 @@ rtc_library("rtp_rtcp") {
"../../rtc_base:rtc_numerics",
"../../rtc_base:safe_minmax",
"../../rtc_base/synchronization:sequence_checker",
"../../rtc_base/system:fallthrough",
"../../rtc_base/time:timestamp_extrapolator",
"../../system_wrappers",
"../../system_wrappers:metrics",
"../remote_bitrate_estimator",
"../video_coding:codec_globals_headers",
"//third_party/abseil-cpp/absl/algorithm:container",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/container:inlined_vector",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/strings",
@ -404,9 +404,7 @@ if (rtc_include_tests) {
rtc_library("rtp_rtcp_modules_tests") {
testonly = true
sources = [
"test/testFec/test_fec.cc",
]
sources = [ "test/testFec/test_fec.cc" ]
deps = [
":rtp_rtcp",
":rtp_rtcp_format",

View File

@ -30,7 +30,6 @@
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/system/fallthrough.h"
namespace webrtc {
namespace {

View File

@ -15,6 +15,7 @@
#include <utility>
#include <vector>
#include "absl/base/macros.h"
#include "absl/types/optional.h"
#include "absl/types/variant.h"
#include "common_video/h264/h264_common.h"
@ -26,7 +27,6 @@
#include "rtc_base/checks.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "rtc_base/logging.h"
#include "rtc_base/system/fallthrough.h"
namespace webrtc {
namespace {
@ -197,7 +197,7 @@ absl::optional<VideoRtpDepacketizer::ParsedRtpPayload> ProcessStapAOrSingleNalu(
case H264::NaluType::kIdr:
parsed_payload->video_header.frame_type =
VideoFrameType::kVideoFrameKey;
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
case H264::NaluType::kSlice: {
absl::optional<uint32_t> pps_id = PpsParser::ParsePpsIdFromSlice(
&payload_data[start_offset], end_offset - start_offset);

View File

@ -152,7 +152,6 @@ rtc_library("video_coding") {
"../../rtc_base/experiments:rate_control_settings",
"../../rtc_base/experiments:rtt_mult_experiment",
"../../rtc_base/synchronization:sequence_checker",
"../../rtc_base/system:fallthrough",
"../../rtc_base/task_utils:repeating_task",
"../../rtc_base/third_party/base64",
"../../rtc_base/time:timestamp_extrapolator",
@ -249,9 +248,7 @@ rtc_source_set("codec_globals_headers") {
"codecs/vp9/include/vp9_globals.h",
]
deps = [
"../../rtc_base:checks",
]
deps = [ "../../rtc_base:checks" ]
}
rtc_library("video_coding_utility") {
@ -672,9 +669,7 @@ if (rtc_include_tests) {
bundle_data("video_coding_modules_tests_resources_bundle_data") {
testonly = true
sources = video_coding_modules_tests_resources
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
}
}

View File

@ -13,12 +13,12 @@
#include <algorithm>
#include <limits>
#include "absl/base/macros.h"
#include "absl/types/variant.h"
#include "modules/video_coding/frame_object.h"
#include "modules/video_coding/packet_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/logging.h"
#include "rtc_base/system/fallthrough.h"
namespace webrtc {
namespace video_coding {
@ -78,7 +78,7 @@ void RtpFrameReferenceFinder::RetryStashedFrames() {
case kHandOff:
complete_frame = true;
HandOffFrame(std::move(*frame_it));
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
case kDrop:
frame_it = stashed_frames_.erase(frame_it);
}

View File

@ -13,9 +13,7 @@ if (is_android) {
}
group("pc") {
deps = [
":rtc_pc",
]
deps = [ ":rtc_pc" ]
}
config("rtc_pc_config") {
@ -267,7 +265,6 @@ rtc_library("peerconnection") {
"../rtc_base:safe_minmax",
"../rtc_base:weak_ptr",
"../rtc_base/experiments:field_trial_parser",
"../rtc_base/system:fallthrough",
"../rtc_base/system:file_wrapper",
"../rtc_base/system:rtc_export",
"../rtc_base/third_party/base64",
@ -375,9 +372,7 @@ if (rtc_include_tests) {
rtc_library("peerconnection_perf_tests") {
testonly = true
sources = [
"peer_connection_rampup_tests.cc",
]
sources = [ "peer_connection_rampup_tests.cc" ]
deps = [
":pc_test_utils",
":peerconnection_wrapper",

View File

@ -56,7 +56,6 @@
#include "rtc_base/logging.h"
#include "rtc_base/string_encode.h"
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/system/fallthrough.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/clock.h"
#include "system_wrappers/include/field_trial.h"

View File

@ -13,21 +13,11 @@ if (is_android) {
}
rtc_source_set("arch") {
sources = [
"arch.h",
]
sources = [ "arch.h" ]
}
rtc_source_set("asm_defines") {
sources = [
"asm_defines.h",
]
}
rtc_source_set("fallthrough") {
sources = [
"fallthrough.h",
]
sources = [ "asm_defines.h" ]
}
rtc_library("file_wrapper") {
@ -43,21 +33,15 @@ rtc_library("file_wrapper") {
}
rtc_source_set("ignore_warnings") {
sources = [
"ignore_warnings.h",
]
sources = [ "ignore_warnings.h" ]
}
rtc_source_set("inline") {
sources = [
"inline.h",
]
sources = [ "inline.h" ]
}
rtc_source_set("unused") {
sources = [
"unused.h",
]
sources = [ "unused.h" ]
}
rtc_source_set("rtc_export") {
@ -73,20 +57,14 @@ if (is_mac || is_ios) {
"cocoa_threading.h",
"cocoa_threading.mm",
]
deps = [
"..:checks",
]
deps = [ "..:checks" ]
libs = [ "Foundation.framework" ]
}
}
rtc_source_set("thread_registry") {
sources = [
"thread_registry.h",
]
deps = [
"..:rtc_base_approved",
]
sources = [ "thread_registry.h" ]
deps = [ "..:rtc_base_approved" ]
if (is_android && !build_with_chromium) {
sources += [ "thread_registry.cc" ]
deps += [
@ -97,9 +75,7 @@ rtc_source_set("thread_registry") {
}
rtc_source_set("warn_current_thread_is_deadlocked") {
sources = [
"warn_current_thread_is_deadlocked.h",
]
sources = [ "warn_current_thread_is_deadlocked.h" ]
deps = []
if (is_android && !build_with_chromium) {
sources += [ "warn_current_thread_is_deadlocked.cc" ]

View File

@ -1,31 +0,0 @@
/*
* Copyright (c) 2018 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 RTC_BASE_SYSTEM_FALLTHROUGH_H_
#define RTC_BASE_SYSTEM_FALLTHROUGH_H_
// Macro to be used for switch-case fallthrough (required for enabling
// -Wimplicit-fallthrough warning on Clang).
// This macro definition must not be included from public headers! Because
// clang's diagnostic checks if there's a macro expanding to
// [[clang::fallthrough]] defined, and if so it suggests the first macro
// expanding to it. So if this macro is included in a public header, clang may
// suggest it instead of the client's own macro, which can cause confusion.
#ifdef __clang__
#define RTC_FALLTHROUGH() [[clang::fallthrough]]
#else
#define RTC_FALLTHROUGH() \
do { \
} while (0)
#endif
#endif // RTC_BASE_SYSTEM_FALLTHROUGH_H_

View File

@ -41,9 +41,7 @@ rtc_library("media_constraints") {
rtc_library("sdk_tests") {
testonly = true
sources = [
"media_constraints_unittest.cc",
]
sources = [ "media_constraints_unittest.cc" ]
deps = [
":media_constraints",
"../test:test_support",
@ -84,9 +82,7 @@ if (is_ios || is_mac) {
rtc_library("common_objc") {
visibility = [ "*" ]
sources = [
"objc/helpers/noop.mm",
]
sources = [ "objc/helpers/noop.mm" ]
public_configs = [ ":common_config_objc" ]
@ -243,13 +239,9 @@ if (is_ios || is_mac) {
rtc_source_set("audio_session_observer") {
visibility = [ ":*" ]
sources = [
"objc/native/src/audio/audio_session_observer.h",
]
sources = [ "objc/native/src/audio/audio_session_observer.h" ]
deps = [
"../rtc_base",
]
deps = [ "../rtc_base" ]
}
rtc_library("audio_device") {
@ -278,9 +270,9 @@ if (is_ios || is_mac) {
"../modules/audio_device:audio_device_generic",
"../rtc_base",
"../rtc_base:checks",
"../rtc_base/system:fallthrough",
"../system_wrappers:field_trial",
"../system_wrappers:metrics",
"//third_party/abseil-cpp/absl/base:core_headers",
]
libs = [ "AudioToolbox.framework" ]
@ -542,9 +534,7 @@ if (is_ios || is_mac) {
# TODO(bugs.webrtc.org/9627): Remove this target.
rtc_library("videocapturebase_objc") {
visibility = [ "*" ]
sources = [
"objc/helpers/noop.mm",
]
sources = [ "objc/helpers/noop.mm" ]
configs += [ "..:common_objc" ]
@ -700,9 +690,7 @@ if (is_ios || is_mac) {
]
defines = [ "HAVE_NO_MEDIA" ]
sources = [
"objc/helpers/noop.mm",
]
sources = [ "objc/helpers/noop.mm" ]
public_configs = [ ":common_config_objc" ]
@ -734,16 +722,12 @@ if (is_ios || is_mac) {
# TODO(bugs.webrtc.org/9627): Remove, targets should depend on base_objc.
rtc_library("videorenderer_objc") {
visibility = [ "*" ]
sources = [
"objc/helpers/noop.mm",
]
sources = [ "objc/helpers/noop.mm" ]
configs += [ "..:common_objc" ]
public_configs = [ ":common_config_objc" ]
deps = [
":base_objc",
]
deps = [ ":base_objc" ]
}
rtc_library("videorendereradapter_objc") {
@ -1152,17 +1136,13 @@ if (is_ios || is_mac) {
# Sample video taken from https://media.xiph.org/video/derf/
"objc/unittests/foreman.mp4",
]
outputs = [
"{{bundle_resources_dir}}/{{source_file_part}}",
]
outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ]
}
# These tests use static linking.
rtc_ios_xctest_test("sdk_unittests") {
info_plist = "//test/ios/Info.plist"
sources = [
"objc/unittests/main.mm",
]
sources = [ "objc/unittests/main.mm" ]
extra_substitutions = [ "GTEST_BUNDLE_ID_SUFFIX=generic-unit-test" ]
deps = [
@ -1405,15 +1385,9 @@ if (is_ios || is_mac) {
}
bundle_data("ios_framework_bundle") {
deps = [
"../sdk:framework_objc",
]
sources = [
"$root_build_dir/WebRTC.framework",
]
outputs = [
"{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
]
deps = [ "../sdk:framework_objc" ]
sources = [ "$root_build_dir/WebRTC.framework" ]
outputs = [ "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}" ]
}
}
@ -1542,15 +1516,9 @@ if (is_ios || is_mac) {
}
bundle_data("mac_framework_bundle") {
deps = [
"../sdk:mac_framework_objc",
]
sources = [
"$root_build_dir/WebRTC.framework",
]
outputs = [
"{{bundle_contents_dir}}/Frameworks/{{source_file_part}}",
]
deps = [ "../sdk:mac_framework_objc" ]
sources = [ "$root_build_dir/WebRTC.framework" ]
outputs = [ "{{bundle_contents_dir}}/Frameworks/{{source_file_part}}" ]
}
}

View File

@ -10,8 +10,8 @@
#import "voice_processing_audio_unit.h"
#include "absl/base/macros.h"
#include "rtc_base/checks.h"
#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/metrics.h"
#import "base/RTCLogging.h"
@ -446,12 +446,12 @@ void VoiceProcessingAudioUnit::DisposeAudioUnit() {
case kStarted:
Stop();
// Fall through.
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
case kInitialized:
Uninitialize();
break;
case kUninitialized:
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
case kInitRequired:
break;
}

View File

@ -110,7 +110,6 @@ rtc_library("video") {
"../rtc_base/experiments:quality_scaling_experiment",
"../rtc_base/experiments:rate_control_settings",
"../rtc_base/synchronization:sequence_checker",
"../rtc_base/system:fallthrough",
"../rtc_base/system:thread_registry",
"../rtc_base/task_utils:repeating_task",
"../rtc_base/task_utils:to_queued_task",
@ -119,6 +118,7 @@ rtc_library("video") {
"../system_wrappers:field_trial",
"../system_wrappers:metrics",
"//third_party/abseil-cpp/absl/algorithm:container",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/memory",
"//third_party/abseil-cpp/absl/types:optional",
]
@ -230,11 +230,11 @@ rtc_library("video_stream_encoder_impl") {
"../rtc_base/experiments:quality_scaling_experiment",
"../rtc_base/experiments:rate_control_settings",
"../rtc_base/synchronization:sequence_checker",
"../rtc_base/system:fallthrough",
"../rtc_base/task_utils:repeating_task",
"../system_wrappers",
"../system_wrappers:field_trial",
"//third_party/abseil-cpp/absl/algorithm:container",
"//third_party/abseil-cpp/absl/base:core_headers",
"//third_party/abseil-cpp/absl/types:optional",
]
}
@ -242,9 +242,7 @@ rtc_library("video_stream_encoder_impl") {
if (rtc_include_tests) {
rtc_library("video_mocks") {
testonly = true
sources = [
"test/mock_video_stream_encoder.h",
]
sources = [ "test/mock_video_stream_encoder.h" ]
deps = [
"../api/video:video_stream_encoder",
"../test:test_support",
@ -330,9 +328,7 @@ if (rtc_include_tests) {
rtc_library("video_full_stack_tests") {
testonly = true
sources = [
"full_stack_tests.cc",
]
sources = [ "full_stack_tests.cc" ]
deps = [
":video_quality_test",
"../api:simulated_network_api",
@ -357,9 +353,7 @@ if (rtc_include_tests) {
rtc_library("video_pc_full_stack_tests") {
testonly = true
sources = [
"pc_full_stack_tests.cc",
]
sources = [ "pc_full_stack_tests.cc" ]
deps = [
"../api:create_network_emulation_manager",
"../api:create_peerconnection_quality_test_fixture",
@ -408,31 +402,21 @@ if (rtc_include_tests) {
if (is_mac) {
mac_app_bundle("video_loopback") {
testonly = true
sources = [
"video_loopback_main.mm",
]
sources = [ "video_loopback_main.mm" ]
info_plist = "../test/mac/Info.plist"
deps = [
":video_loopback_lib",
]
deps = [ ":video_loopback_lib" ]
}
} else {
rtc_executable("video_loopback") {
testonly = true
sources = [
"video_loopback_main.cc",
]
deps = [
":video_loopback_lib",
]
sources = [ "video_loopback_main.cc" ]
deps = [ ":video_loopback_lib" ]
}
}
rtc_executable("screenshare_loopback") {
testonly = true
sources = [
"screenshare_loopback.cc",
]
sources = [ "screenshare_loopback.cc" ]
deps = [
":video_quality_test",
@ -459,9 +443,7 @@ if (rtc_include_tests) {
rtc_executable("sv_loopback") {
testonly = true
sources = [
"sv_loopback.cc",
]
sources = [ "sv_loopback.cc" ]
deps = [
":video_quality_test",
"../api:libjingle_peerconnection_api",
@ -487,9 +469,7 @@ if (rtc_include_tests) {
rtc_executable("video_replay") {
testonly = true
sources = [
"video_replay.cc",
]
sources = [ "video_replay.cc" ]
deps = [
"../api/rtc_event_log",
"../api/task_queue:default_task_queue_factory",

View File

@ -13,7 +13,6 @@
#include <utility>
#include "rtc_base/logging.h"
#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/field_trial.h"
namespace webrtc {

View File

@ -17,13 +17,13 @@
#include <utility>
#include "absl/algorithm/container.h"
#include "absl/base/macros.h"
#include "api/task_queue/task_queue_base.h"
#include "api/video/video_source_interface.h"
#include "call/adaptation/video_source_restrictions.h"
#include "rtc_base/logging.h"
#include "rtc_base/numerics/safe_conversions.h"
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/system/fallthrough.h"
#include "video/video_stream_encoder.h"
namespace webrtc {
@ -562,7 +562,7 @@ void OveruseFrameDetectorResourceAdaptationModule::AdaptUp(AdaptReason reason) {
return;
}
// Scale up resolution.
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
}
case DegradationPreference::MAINTAIN_FRAMERATE: {
// Check if resolution should be increased based on bitrate and
@ -678,7 +678,7 @@ bool OveruseFrameDetectorResourceAdaptationModule::AdaptDown(
break;
}
// Scale down resolution.
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
}
case DegradationPreference::MAINTAIN_FRAMERATE: {
// Scale down resolution.

View File

@ -16,6 +16,7 @@
#include <vector>
#include "absl/algorithm/container.h"
#include "absl/base/macros.h"
#include "absl/memory/memory.h"
#include "absl/types/optional.h"
#include "media/base/media_constants.h"
@ -43,7 +44,6 @@
#include "rtc_base/location.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/system/fallthrough.h"
#include "system_wrappers/include/field_trial.h"
#include "system_wrappers/include/metrics.h"
#include "video/receive_statistics_proxy.h"
@ -467,7 +467,7 @@ void RtpVideoStreamReceiver::OnReceivedPayloadData(
case video_coding::H264SpsPpsTracker::kRequestKeyframe:
rtcp_feedback_buffer_.RequestKeyFrame();
rtcp_feedback_buffer_.SendBufferedRtcpFeedback();
RTC_FALLTHROUGH();
ABSL_FALLTHROUGH_INTENDED;
case video_coding::H264SpsPpsTracker::kDrop:
return;
case video_coding::H264SpsPpsTracker::kInsert:

View File

@ -34,7 +34,6 @@
#include "rtc_base/location.h"
#include "rtc_base/logging.h"
#include "rtc_base/strings/string_builder.h"
#include "rtc_base/system/fallthrough.h"
#include "rtc_base/time_utils.h"
#include "rtc_base/trace_event.h"
#include "system_wrappers/include/field_trial.h"