Skip to content

Commit 09362d9

Browse files
authored
m93 branch-heads/4577. (#14)
* merged from branch-heads/4577. * update. * fix compile error. * fix compile error for iOS. * fix
1 parent 9a49711 commit 09362d9

File tree

716 files changed

+24104
-10710
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

716 files changed

+24104
-10710
lines changed

.gn

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,33 +20,11 @@ script_executable = "python3"
2020
# in the source tree, e.g. for third party source trees.
2121
secondary_source = "//build/secondary/"
2222

23-
# These are the targets to check headers for by default. The files in targets
24-
# matching these patterns (see "gn help label_pattern" for format) will have
23+
# These are the targets to skip header checking by default. The files in targets
24+
# matching these patterns (see "gn help label_pattern" for format) will not have
2525
# their includes checked for proper dependencies when you run either
2626
# "gn check" or "gn gen --check".
27-
check_targets = [
28-
"//api/*",
29-
"//audio/*",
30-
"//backup/*",
31-
"//call/*",
32-
"//common_audio/*",
33-
"//common_video/*",
34-
"//examples/*",
35-
"//logging/*",
36-
"//media/*",
37-
"//modules/*",
38-
"//net/*",
39-
"//p2p/*",
40-
"//pc/*",
41-
"//rtc_base/*",
42-
"//rtc_tools/*",
43-
"//sdk/*",
44-
"//stats/*",
45-
"//system_wrappers/*",
46-
"//test/*",
47-
"//video/*",
48-
"//third_party/libyuv/*",
49-
]
27+
no_check_targets = [ "//third_party/icu/*" ]
5028

5129
# These are the list of GN files that run exec_script. This whitelist exists
5230
# to force additional review for new uses of exec_script, which is strongly
@@ -66,7 +44,7 @@ default_args = {
6644

6745
mac_sdk_min = "10.12"
6846

69-
ios_deployment_target = "10.0"
47+
ios_deployment_target = "12.0"
7048

7149
# The SDK API level, in contrast, is set by build/android/AndroidManifest.xml.
7250
android32_ndk_api_level = 16

BUILD.gn

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,10 +435,6 @@ config("common_config") {
435435

436436
config("common_objc") {
437437
frameworks = [ "Foundation.framework" ]
438-
439-
if (rtc_use_metal_rendering) {
440-
defines = [ "RTC_SUPPORTS_METAL" ]
441-
}
442438
}
443439

444440
if (!build_with_chromium) {
@@ -520,6 +516,10 @@ if (!build_with_chromium) {
520516
rtc_executable("webrtc_lib_link_test") {
521517
testonly = true
522518

519+
# This target is used for checking to link, so do not check dependencies
520+
# on gn check.
521+
check_includes = false # no-presubmit-check TODO(bugs.webrtc.org/12785)
522+
523523
sources = [ "webrtc_lib_link_test.cc" ]
524524
deps = [
525525
# NOTE: Don't add deps here. If this test fails to link, it means you

DEPS

Lines changed: 113 additions & 68 deletions
Large diffs are not rendered by default.

PRESUBMIT.py

Lines changed: 65 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def VerifyNativeApiHeadersListIsValid(input_api, output_api):
146146
if non_existing_paths:
147147
return [
148148
output_api.PresubmitError(
149-
'Directories to native API headers have changed which has made the '
150-
'list in PRESUBMIT.py outdated.\nPlease update it to the current '
151-
'location of our native APIs.', non_existing_paths)
149+
'Directories to native API headers have changed which has made '
150+
'the list in PRESUBMIT.py outdated.\nPlease update it to the '
151+
'current location of our native APIs.', non_existing_paths)
152152
]
153153
return []
154154

@@ -212,10 +212,10 @@ def CheckNoIOStreamInHeaders(input_api, output_api, source_file_filter):
212212
if len(files):
213213
return [
214214
output_api.PresubmitError(
215-
'Do not #include <iostream> in header files, since it inserts static '
216-
+
217-
'initialization into every file including the header. Instead, '
218-
+ '#include <ostream>. See http://crbug.com/94794', files)
215+
'Do not #include <iostream> in header files, since it inserts '
216+
'static initialization into every file including the header. '
217+
'Instead, #include <ostream>. See http://crbug.com/94794',
218+
files)
219219
]
220220
return []
221221

@@ -237,15 +237,15 @@ def CheckNoPragmaOnce(input_api, output_api, source_file_filter):
237237
return [
238238
output_api.PresubmitError(
239239
'Do not use #pragma once in header files.\n'
240-
'See http://www.chromium.org/developers/coding-style#TOC-File-headers',
240+
'See http://www.chromium.org/developers/coding-style'
241+
'#TOC-File-headers',
241242
files)
242243
]
243244
return []
244245

245-
246-
def CheckNoFRIEND_TEST(
246+
def CheckNoFRIEND_TEST(# pylint: disable=invalid-name
247247
input_api,
248-
output_api, # pylint: disable=invalid-name
248+
output_api,
249249
source_file_filter):
250250
"""Make sure that gtest's FRIEND_TEST() macro is not used, the
251251
FRIEND_TEST_ALL_PREFIXES() macro from testsupport/gtest_prod_util.h should be
@@ -263,9 +263,9 @@ def CheckNoFRIEND_TEST(
263263
return []
264264
return [
265265
output_api.PresubmitPromptWarning(
266-
'WebRTC\'s code should not use '
267-
'gtest\'s FRIEND_TEST() macro. Include testsupport/gtest_prod_util.h and '
268-
'use FRIEND_TEST_ALL_PREFIXES() instead.\n' + '\n'.join(problems))
266+
'WebRTC\'s code should not use gtest\'s FRIEND_TEST() macro. '
267+
'Include testsupport/gtest_prod_util.h and use '
268+
'FRIEND_TEST_ALL_PREFIXES() instead.\n' + '\n'.join(problems))
269269
]
270270

271271

@@ -346,9 +346,9 @@ def CheckNoSourcesAbove(input_api, gn_files, output_api):
346346
if violating_gn_files:
347347
return [
348348
output_api.PresubmitError(
349-
'Referencing source files above the directory of the GN file is not '
350-
'allowed. Please introduce new GN targets in the proper location '
351-
'instead.\n'
349+
'Referencing source files above the directory of the GN file '
350+
'is not allowed. Please introduce new GN targets in the proper '
351+
'location instead.\n'
352352
'Invalid source entries:\n'
353353
'%s\n'
354354
'Violating GN files:' % '\n'.join(violating_source_entries),
@@ -407,9 +407,9 @@ def _MoreThanOneSourceUsed(*sources_lists):
407407
gn_file_content = input_api.ReadFile(gn_file)
408408
for target_match in TARGET_RE.finditer(gn_file_content):
409409
# list_of_sources is a list of tuples of the form
410-
# (c_files, cc_files, objc_files) that keeps track of all the sources
411-
# defined in a target. A GN target can have more that on definition of
412-
# sources (since it supports if/else statements).
410+
# (c_files, cc_files, objc_files) that keeps track of all the
411+
# sources defined in a target. A GN target can have more that
412+
# on definition of sources (since it supports if/else statements).
413413
# E.g.:
414414
# rtc_static_library("foo") {
415415
# if (is_win) {
@@ -454,7 +454,8 @@ def _MoreThanOneSourceUsed(*sources_lists):
454454
return [
455455
output_api.PresubmitError(
456456
'GN targets cannot mix .c, .cc and .m (or .mm) source files.\n'
457-
'Please create a separate target for each collection of sources.\n'
457+
'Please create a separate target for each collection of '
458+
'sources.\n'
458459
'Mixed sources: \n'
459460
'%s\n'
460461
'Violating GN files:\n%s\n' %
@@ -476,8 +477,8 @@ def CheckNoPackageBoundaryViolations(input_api, gn_files, output_api):
476477
if errors:
477478
return [
478479
output_api.PresubmitError(
479-
'There are package boundary violations in the following GN files:',
480-
long_text='\n\n'.join(str(err) for err in errors))
480+
'There are package boundary violations in the following GN '
481+
'files:', long_text='\n\n'.join(str(err) for err in errors))
481482
]
482483
return []
483484

@@ -491,7 +492,7 @@ def CheckNoWarningSuppressionFlagsAreAdded(gn_files,
491492
input_api,
492493
output_api,
493494
error_formatter=_ReportFileAndLine):
494-
"""Make sure that warning suppression flags are not added wihtout a reason."""
495+
"""Ensure warning suppression flags are not added wihtout a reason."""
495496
msg = ('Usage of //build/config/clang:extra_warnings is discouraged '
496497
'in WebRTC.\n'
497498
'If you are not adding this code (e.g. you are just moving '
@@ -674,7 +675,8 @@ def CheckGnGen(input_api, output_api):
674675
if errors:
675676
return [
676677
output_api.PresubmitPromptWarning(
677-
'Some #includes do not match the build dependency graph. Please run:\n'
678+
'Some #includes do not match the build dependency graph. '
679+
'Please run:\n'
678680
' gn gen --check <out_dir>',
679681
long_text='\n\n'.join(errors))
680682
]
@@ -729,18 +731,20 @@ def CheckUnwantedDependencies(input_api, output_api, source_file_filter):
729731
if error_descriptions:
730732
results.append(
731733
output_api.PresubmitError(
732-
'You added one or more #includes that violate checkdeps rules.\n'
733-
'Check that the DEPS files in these locations contain valid rules.\n'
734-
'See https://cs.chromium.org/chromium/src/buildtools/checkdeps/ for '
735-
'more details about checkdeps.', error_descriptions))
734+
'You added one or more #includes that violate checkdeps rules.'
735+
'\nCheck that the DEPS files in these locations contain valid '
736+
'rules.\nSee '
737+
'https://cs.chromium.org/chromium/src/buildtools/checkdeps/ '
738+
'for more details about checkdeps.', error_descriptions))
736739
if warning_descriptions:
737740
results.append(
738741
output_api.PresubmitPromptOrNotify(
739-
'You added one or more #includes of files that are temporarily\n'
740-
'allowed but being removed. Can you avoid introducing the\n'
741-
'#include? See relevant DEPS file(s) for details and contacts.\n'
742-
'See https://cs.chromium.org/chromium/src/buildtools/checkdeps/ for '
743-
'more details about checkdeps.', warning_descriptions))
742+
'You added one or more #includes of files that are temporarily'
743+
'\nallowed but being removed. Can you avoid introducing the\n'
744+
'#include? See relevant DEPS file(s) for details and contacts.'
745+
'\nSee '
746+
'https://cs.chromium.org/chromium/src/buildtools/checkdeps/ '
747+
'for more details about checkdeps.', warning_descriptions))
744748
return results
745749

746750

@@ -787,9 +791,10 @@ def CheckChangeHasBugField(input_api, output_api):
787791
else:
788792
return [
789793
output_api.PresubmitError(
790-
'The "Bug: [bug number]" footer is mandatory. Please create a bug and '
791-
'reference it using either of:\n'
792-
' * https://bugs.webrtc.org - reference it using Bug: webrtc:XXXX\n'
794+
'The "Bug: [bug number]" footer is mandatory. Please create a '
795+
'bug and reference it using either of:\n'
796+
' * https://bugs.webrtc.org - reference it using Bug: '
797+
'webrtc:XXXX\n'
793798
' * https://crbug.com - reference it using Bug: chromium:XXXXXX'
794799
)
795800
]
@@ -911,10 +916,19 @@ def CommonChecks(input_api, output_api):
911916
results.extend(
912917
input_api.canned_checks.CheckLicense(input_api, output_api,
913918
_LicenseHeader(input_api)))
919+
920+
# TODO(bugs.webrtc.org/12114): Delete this filter and run pylint on
921+
# all python files. This is a temporary solution.
922+
python_file_filter = lambda f: (f.LocalPath().endswith('.py') and
923+
source_file_filter(f))
924+
python_changed_files = [f.LocalPath() for f in input_api.AffectedFiles(
925+
file_filter=python_file_filter)]
926+
914927
results.extend(
915928
input_api.canned_checks.RunPylint(
916929
input_api,
917930
output_api,
931+
files_to_check=python_changed_files,
918932
files_to_skip=(
919933
r'^base[\\\/].*\.py$',
920934
r'^build[\\\/].*\.py$',
@@ -932,12 +946,13 @@ def CommonChecks(input_api, output_api):
932946
pylintrc='pylintrc'))
933947

934948
# TODO(nisse): talk/ is no more, so make below checks simpler?
935-
# WebRTC can't use the presubmit_canned_checks.PanProjectChecks function since
936-
# we need to have different license checks in talk/ and webrtc/ directories.
949+
# WebRTC can't use the presubmit_canned_checks.PanProjectChecks function
950+
# since we need to have different license checks
951+
# in talk/ and webrtc/directories.
937952
# Instead, hand-picked checks are included below.
938953

939-
# .m and .mm files are ObjC files. For simplicity we will consider .h files in
940-
# ObjC subdirectories ObjC headers.
954+
# .m and .mm files are ObjC files. For simplicity we will consider
955+
# .h files in ObjC subdirectories ObjC headers.
941956
objc_filter_list = (r'.+\.m$', r'.+\.mm$', r'.+objc\/.+\.h$')
942957
# Skip long-lines check for DEPS and GN files.
943958
build_file_filter_list = (r'.+\.gn$', r'.+\.gni$', 'DEPS')
@@ -1163,9 +1178,9 @@ def CheckAbslMemoryInclude(input_api, output_api, source_file_filter):
11631178
if len(files):
11641179
return [
11651180
output_api.PresubmitError(
1166-
'Please include "absl/memory/memory.h" header for absl::WrapUnique.\n'
1167-
'This header may or may not be included transitively depending on the '
1168-
'C++ standard version.', files)
1181+
'Please include "absl/memory/memory.h" header for '
1182+
'absl::WrapUnique.\nThis header may or may not be included '
1183+
'transitively depending on the C++ standard version.', files)
11691184
]
11701185
return []
11711186

@@ -1343,13 +1358,15 @@ def CheckAddedDepsHaveTargetApprovals(input_api, output_api):
13431358
if input_api.tbr:
13441359
return [
13451360
output_api.PresubmitNotifyResult(
1346-
'--tbr was specified, skipping OWNERS check for DEPS additions'
1361+
'--tbr was specified, skipping OWNERS check for DEPS '
1362+
'additions'
13471363
)
13481364
]
13491365
if input_api.dry_run:
13501366
return [
13511367
output_api.PresubmitNotifyResult(
1352-
'This is a dry run, skipping OWNERS check for DEPS additions'
1368+
'This is a dry run, skipping OWNERS check for DEPS '
1369+
'additions'
13531370
)
13541371
]
13551372
if not input_api.change.issue:
@@ -1393,8 +1410,8 @@ def StripDeps(path):
13931410
if unapproved_dependencies:
13941411
output_list = [
13951412
output(
1396-
'You need LGTM from owners of depends-on paths in DEPS that were '
1397-
'modified in this CL:\n %s' %
1413+
'You need LGTM from owners of depends-on paths in DEPS that '
1414+
' were modified in this CL:\n %s' %
13981415
'\n '.join(sorted(unapproved_dependencies)))
13991416
]
14001417
suggested_owners = input_api.owners_client.SuggestOwners(

api/BUILD.gn

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ rtc_source_set("call_api") {
2929
rtc_source_set("callfactory_api") {
3030
visibility = [ "*" ]
3131
sources = [ "call/call_factory_interface.h" ]
32-
deps = [ "../rtc_base/system:rtc_export" ]
32+
deps = [
33+
"../call:rtp_interfaces",
34+
"../rtc_base/system:rtc_export",
35+
]
3336
}
3437

3538
if (!build_with_chromium) {
@@ -135,14 +138,8 @@ rtc_library("libjingle_peerconnection_api") {
135138
"jsep_ice_candidate.cc",
136139
"jsep_ice_candidate.h",
137140
"jsep_session_description.h",
138-
"media_stream_proxy.h",
139-
"media_stream_track_proxy.h",
140-
"peer_connection_factory_proxy.h",
141141
"peer_connection_interface.cc",
142142
"peer_connection_interface.h",
143-
"peer_connection_proxy.h",
144-
"proxy.cc",
145-
"proxy.h",
146143
"rtp_receiver_interface.cc",
147144
"rtp_receiver_interface.h",
148145
"rtp_sender_interface.cc",
@@ -157,7 +154,7 @@ rtc_library("libjingle_peerconnection_api") {
157154
"stats_types.h",
158155
"turn_customizer.h",
159156
"uma_metrics.h",
160-
"video_track_source_proxy.h",
157+
"video_track_source_proxy_factory.h",
161158
]
162159
deps = [
163160
":array_view",
@@ -178,6 +175,7 @@ rtc_library("libjingle_peerconnection_api") {
178175
":rtp_transceiver_direction",
179176
":scoped_refptr",
180177
":sequence_checker",
178+
"../call:rtp_interfaces",
181179
"../rtc_base:network_constants",
182180
"adaptation:resource_adaptation_api",
183181
"audio:audio_mixer_api",
@@ -1059,6 +1057,7 @@ if (rtc_include_tests) {
10591057
":time_controller",
10601058
"../call",
10611059
"../call:call_interfaces",
1060+
"../call:rtp_interfaces",
10621061
"../test/time_controller",
10631062
]
10641063
}
@@ -1103,6 +1102,7 @@ if (rtc_include_tests) {
11031102
"units:time_delta",
11041103
"units:timestamp",
11051104
"units:units_unittests",
1105+
"video:rtp_video_frame_assembler_unittests",
11061106
"video:video_unittests",
11071107
]
11081108
}

0 commit comments

Comments
 (0)