Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 3d15b28

Browse files
authored
Merge pull request #492 from open-webrtc-toolkit/m88
Merge M88 branch to master.
2 parents 64d06f1 + 4f7fad7 commit 3d15b28

File tree

76 files changed

+929
-754
lines changed

Some content is hidden

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

76 files changed

+929
-754
lines changed

DEPS

Lines changed: 690 additions & 202 deletions
Large diffs are not rendered by default.

build_overrides/build.gni

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,14 @@ declare_args() {
7777

7878
# Some non-Chromium builds don't support building java targets.
7979
enable_java_templates = true
80+
81+
# If true, it assumes that //third_party/abseil-cpp is an available
82+
# dependency for googletest.
83+
gtest_enable_absl_printers = true
84+
85+
# WebRTC doesn't depend on //base from production code but only for testing
86+
# purposes. In any case, it doesn't depend on //third_party/perfetto which
87+
# is used for base tracing, so this feature is disabled.
88+
enable_base_tracing = false
89+
use_perfetto_client_library = false
8090
}

scripts/build.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020
import re
2121
import distutils.dir_util
2222

23+
HOME_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
24+
2325
sys.path.append(os.path.join(os.path.dirname(os.path.dirname(__file__)),'build','config','mac'))
26+
sys.path.append(os.path.join(HOME_PATH, 'third_party', 'webrtc','tools_webrtc','apple'))
2427
import sdk_info
28+
import copy_framework_header
29+
2530

26-
HOME_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
2731
OUT_PATH = os.path.join(HOME_PATH, 'out')
2832
# The lib contains all target architectures and external libs(OpenSSL).
2933
OUT_LIB_NAME = 'libowt.a'
@@ -79,7 +83,11 @@ def ninjabuild(arch, scheme, targets):
7983
def copyheaders(headers_target_folder):
8084
if os.path.exists(headers_target_folder):
8185
shutil.rmtree(headers_target_folder)
82-
shutil.copytree(HEADER_PATH, headers_target_folder)
86+
os.mkdir(headers_target_folder)
87+
for _, _, file_names in os.walk(HEADER_PATH):
88+
for file_name in file_names:
89+
copy_framework_header.process(os.path.join(
90+
HEADER_PATH, file_name), os.path.join(headers_target_folder, file_name))
8391

8492
def getexternalliblist(ssl_root):
8593
libs = []
@@ -147,7 +155,7 @@ def getsdkversion():
147155

148156
# Run unit tests on simulator. Return True if all tests are passed.
149157
def runtest(ssl_root):
150-
print 'Start running unit tests.'
158+
print('Start running unit tests.')
151159
# Build app targets checks link issue.
152160
if not ninjabuild(TEST_ARCH, TEST_SCHEME, SDK_TARGETS + APP_TARGETS + TEST_TARGETS):
153161
return False
@@ -197,7 +205,7 @@ def main():
197205
return 1
198206
if not runtest(opts.ssl_root):
199207
return 1
200-
print 'Done.'
208+
print('Done.')
201209
return 0
202210

203211
if __name__ == '__main__':

scripts/prepare_dev.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
TESTING_PATH = os.path.join(HOME_PATH, 'testing')
1818
THIRD_PARTY_PATH = os.path.join(HOME_PATH, 'third_party')
1919
LIBSRTP_PATH = os.path.join(THIRD_PARTY_PATH, 'libsrtp')
20-
LIBJPEG_TURBO_PATH = os.path.join(THIRD_PARTY_PATH, 'libjpeg_turbo')
2120
FFMPEG_PATH = os.path.join(THIRD_PARTY_PATH, 'ffmpeg')
2221
WEBRTC_OVERRIDES_PATH = os.path.join(THIRD_PARTY_PATH, 'webrtc_overrides')
2322
BUILD_PATH = os.path.join(HOME_PATH, 'build')
23+
CONFIG_PATH = os.path.join(BUILD_PATH, 'config')
2424
TOOL_PATH = os.path.join(HOME_PATH, 'tools')
2525
BASE_PATH = os.path.join(HOME_PATH, 'base')
2626
platform = os.name
@@ -38,8 +38,7 @@
3838
('0007-Fix-examples-path-error.patch', BUILD_PATH),
3939
('0008-Disable-loop-range-analysis-when-build-with-Xcode-cl.patch', BUILD_PATH),
4040
('0009-Export-WebRTC-symbols-on-iOS.patch', BUILD_PATH),
41-
('0010-mac-make-find_sdk.py-work-when-the-sdk-goes-to-11.patch', BUILD_PATH),
42-
('0011-libjpeg_turbo-fix-for-CVE-2018-20330-and-19664.patch', LIBJPEG_TURBO_PATH),
41+
('0010-Restore-is_ash-for-backward-compatible.patch', BUILD_PATH),
4342
('0013-Remove-unused-gni-for-av1-build.patch', THIRD_PARTY_PATH),
4443
('0014-Fix-missing-ffmpeg-configure-item-for-msvc-build.patch', FFMPEG_PATH)
4544
]
@@ -53,6 +52,10 @@ def _patch(ignoreFailures=False):
5352
cwd=applyPath)
5453
else:
5554
sys.exit(1)
55+
# create empty gclient_args.gni under bulid/config if not already
56+
gclientArgPath = os.path.join(CONFIG_PATH, 'gclient_args.gni')
57+
if not os.path.isfile(gclientArgPath):
58+
open(gclientArgPath, "w").close()
5659

5760
def main(argv):
5861
_patch()

talk/owt/BUILD.gn

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -178,20 +178,13 @@ static_library("owt_sdk_base") {
178178
include_dirs += [ owt_quic_header_root ]
179179
}
180180
}
181-
181+
182182
if (is_win || is_linux) {
183183
# Custom audio/video input and output.
184184
# When rebasing libwebrtc to a new version, custom audio/video input/output
185185
# usually need some changes to fit the latest API.
186186
defines += [ "OWT_CUSTOM_AVIO" ]
187187
}
188-
if (is_ios) {
189-
sources += [
190-
"sdk/base/ios/networkmonitorios.cc",
191-
"sdk/base/ios/networkmonitorios.h",
192-
]
193-
public_deps += [ "//third_party/webrtc/sdk:framework_objc+link" ]
194-
}
195188
if (is_win) {
196189
sources += [
197190
"sdk/base/desktopcapturer.cc",
@@ -341,9 +334,14 @@ if (is_ios) {
341334
":owt_sdk_p2p",
342335
"//third_party/jsoncpp",
343336
]
337+
if (is_ios) {
338+
deps += [ "//third_party/webrtc/sdk:framework_objc+link" ]
339+
}
344340
include_dirs = [
345341
"//third_party",
346-
"//third_party/webrtc/sdk/objc/Framework/Headers",
342+
"//third_party/webrtc/sdk/objc/api/peerconnection",
343+
"//third_party/webrtc/sdk/objc/api/logging",
344+
"//third_party/webrtc/sdk/objc/api/video_codec",
347345
"sdk/include/cpp",
348346
"sdk/include/objc",
349347
]
@@ -362,8 +360,6 @@ if (is_ios) {
362360
"sdk/base/objc/OWTDefaultVideoEncoderFactory.h",
363361
"sdk/base/objc/OWTDefaultVideoEncoderFactory.m",
364362
"sdk/base/objc/OWTErrors.m",
365-
366-
#"sdk/base/objc/OWTGlobalConfiguration.mm",
367363
"sdk/base/objc/OWTLocalStream+Private.h",
368364
"sdk/base/objc/OWTLocalStream.mm",
369365
"sdk/base/objc/OWTMediaFormat+Internal.h",
@@ -382,8 +378,6 @@ if (is_ios) {
382378
"sdk/base/objc/RemoteStreamObserverObjcImpl.mm",
383379
"sdk/base/objc/public/OWTErrors.h",
384380
"sdk/base/objc/public/OWTFrameGeneratorProtocol.h",
385-
386-
#"sdk/base/objc/public/OWTGlobalConfiguration.h",
387381
"sdk/base/objc/public/OWTLocalCameraStream.h",
388382
"sdk/base/objc/public/OWTLocalCameraStreamParameters.h",
389383
"sdk/base/objc/public/OWTLocalCustomizedStream.h",
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
From 4928b9815f8063c4dd832d3a3a61355d60c5a0cc Mon Sep 17 00:00:00 2001
1+
From b17939a2d0c21ae5cfd6956ed98b47789d4dee8f Mon Sep 17 00:00:00 2001
22
From: Qiu Jainlin <[email protected]>
3-
Date: Thu, 7 May 2020 09:30:40 +0800
3+
Date: Mon, 4 Jan 2021 15:49:43 +0800
44
Subject: [PATCH] Use OpenSSL for usrsctp
55

66
---
77
usrsctp/BUILD.gn | 10 +++++++++-
88
1 file changed, 9 insertions(+), 1 deletion(-)
99

1010
diff --git a/usrsctp/BUILD.gn b/usrsctp/BUILD.gn
11-
index e8a5b1f9d41..684603c4ce3 100644
11+
index 0c5947f1785..7aff0d50687 100644
1212
--- a/usrsctp/BUILD.gn
1313
+++ b/usrsctp/BUILD.gn
1414
@@ -3,6 +3,7 @@
1515
# found in the LICENSE file.
1616

1717
import("//build/toolchain/toolchain.gni")
1818
+import("//build_overrides/ssl/ssl.gni")
19+
import("//testing/libfuzzer/fuzzer_test.gni")
1920

20-
config("usrsctp_config") {
21-
include_dirs = [
22-
@@ -145,5 +146,12 @@ static_library("usrsctp") {
23-
if (is_fuchsia) {
24-
defines += [ "__Userspace_os_Fuchsia" ]
21+
config("usrsctp_public_config") {
22+
@@ -161,7 +162,14 @@ static_library("usrsctp") {
23+
if (use_fuzzing_engine) {
24+
defines += [ "INVARIANTS" ]
2525
}
2626
- deps = [ "//third_party/boringssl" ]
2727
+
@@ -33,6 +33,8 @@ index e8a5b1f9d41..684603c4ce3 100644
3333
+ ]
3434
+ }
3535
}
36+
37+
fuzzer_test("usrsctp_fuzzer_listen") {
3638
--
37-
2.24.1.windows.2
39+
2.28.0.windows.1
3840

talk/owt/patches/0004-Remove-webrtc_overrides.patch

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
From a97d58537750064c1d4929a2c141e52fe0206ff9 Mon Sep 17 00:00:00 2001
1+
From 690f2315a218e771f3de98297bca456ca48b5f89 Mon Sep 17 00:00:00 2001
22
From: Qiu Jainlin <[email protected]>
3-
Date: Thu, 7 May 2020 09:57:47 +0800
3+
Date: Mon, 4 Jan 2021 12:44:41 +0800
44
Subject: [PATCH] Remove webrtc_overrides
55

66
---
7-
webrtc_overrides/BUILD.gn | 168 -------------
7+
webrtc_overrides/BUILD.gn | 179 --------------
88
webrtc_overrides/DEPS | 7 -
99
webrtc_overrides/OWNERS | 6 -
1010
webrtc_overrides/README.chromium | 20 --
1111
webrtc_overrides/field_trial.cc | 15 --
12-
webrtc_overrides/init_webrtc.cc | 45 ----
12+
webrtc_overrides/init_webrtc.cc | 44 ----
1313
webrtc_overrides/init_webrtc.h | 15 --
1414
webrtc_overrides/metrics.cc | 57 -----
1515
.../rtc_base/diagnostic_logging.h | 126 ----------
1616
webrtc_overrides/rtc_base/event.cc | 40 ---
1717
webrtc_overrides/rtc_base/event.h | 48 ----
1818
webrtc_overrides/rtc_base/gtest_prod_util.h | 10 -
19-
webrtc_overrides/rtc_base/logging.cc | 230 ------------------
19+
webrtc_overrides/rtc_base/logging.cc | 231 ------------------
2020
webrtc_overrides/rtc_base/logging.h | 123 ----------
21-
webrtc_overrides/task_queue_factory.cc | 144 -----------
21+
webrtc_overrides/task_queue_factory.cc | 143 -----------
2222
webrtc_overrides/task_queue_factory.h | 24 --
23-
16 files changed, 1078 deletions(-)
23+
16 files changed, 1088 deletions(-)
2424
delete mode 100644 webrtc_overrides/BUILD.gn
2525
delete mode 100644 webrtc_overrides/DEPS
2626
delete mode 100644 webrtc_overrides/OWNERS
@@ -40,10 +40,10 @@ Subject: [PATCH] Remove webrtc_overrides
4040

4141
diff --git a/webrtc_overrides/BUILD.gn b/webrtc_overrides/BUILD.gn
4242
deleted file mode 100644
43-
index 4f44c48d26b..00000000000
43+
index f62ec73be77..00000000000
4444
--- a/webrtc_overrides/BUILD.gn
4545
+++ /dev/null
46-
@@ -1,168 +0,0 @@
46+
@@ -1,179 +0,0 @@
4747
-# Copyright 2017 The Chromium Authors. All rights reserved.
4848
-# Use of this source code is governed by a BSD-style license that can be
4949
-# found in the LICENSE file.
@@ -58,15 +58,18 @@ index 4f44c48d26b..00000000000
5858
- ":metrics",
5959
- ":task_queue_factory",
6060
- "//third_party/webrtc/api:callfactory_api",
61+
- "//third_party/webrtc/api:frame_transformer_interface",
6162
- "//third_party/webrtc/api:ice_transport_factory",
6263
- "//third_party/webrtc/api:libjingle_logging_api",
6364
- "//third_party/webrtc/api:libjingle_peerconnection_api",
6465
- "//third_party/webrtc/api:media_stream_interface",
6566
- "//third_party/webrtc/api:packet_socket_factory",
6667
- "//third_party/webrtc/api:rtc_error",
6768
- "//third_party/webrtc/api:rtc_stats_api",
69+
- "//third_party/webrtc/api:rtp_packet_info",
6870
- "//third_party/webrtc/api:rtp_parameters",
6971
- "//third_party/webrtc/api:scoped_refptr",
72+
- "//third_party/webrtc/api/adaptation:resource_adaptation_api",
7073
- "//third_party/webrtc/api/audio:aec3_config",
7174
- "//third_party/webrtc/api/audio:aec3_config_json",
7275
- "//third_party/webrtc/api/audio:aec3_factory",
@@ -84,16 +87,19 @@ index 4f44c48d26b..00000000000
8487
- "//third_party/webrtc/api/audio_codecs/opus:audio_encoder_multiopus",
8588
- "//third_party/webrtc/api/audio_codecs/opus:audio_encoder_opus",
8689
- "//third_party/webrtc/api/rtc_event_log:rtc_event_log_factory",
90+
- "//third_party/webrtc/api/transport:enums",
91+
- "//third_party/webrtc/api/video:recordable_encoded_frame",
8792
- "//third_party/webrtc/api/video:video_bitrate_allocation",
8893
- "//third_party/webrtc/api/video:video_frame",
89-
- "//third_party/webrtc/api/video:video_frame_i420",
94+
- "//third_party/webrtc/api/video:video_frame_metadata",
9095
- "//third_party/webrtc/api/video:video_rtp_headers",
9196
- "//third_party/webrtc/api/video_codecs:builtin_video_decoder_factory",
9297
- "//third_party/webrtc/api/video_codecs:rtc_software_fallback_wrappers",
9398
- "//third_party/webrtc/api/video_codecs:video_codecs_api",
9499
- "//third_party/webrtc/common_video",
95100
- "//third_party/webrtc/common_video:common_video",
96101
- "//third_party/webrtc/media:rtc_audio_video",
102+
- "//third_party/webrtc/media:rtc_h264_profile_id",
97103
- "//third_party/webrtc/media:rtc_internal_video_codecs",
98104
- "//third_party/webrtc/media:rtc_media",
99105
- "//third_party/webrtc/media:rtc_media_base",
@@ -135,9 +141,14 @@ index 4f44c48d26b..00000000000
135141
- ]
136142
- if (is_chromecast) {
137143
- public_deps += [
144+
- "//third_party/webrtc/api:network_state_predictor_api",
138145
- "//third_party/webrtc/api/audio:audio_frame_api",
139146
- "//third_party/webrtc/api/task_queue",
147+
- "//third_party/webrtc/api/transport:goog_cc",
148+
- "//third_party/webrtc/api/transport:network_control",
149+
- "//third_party/webrtc/api/units:time_delta",
140150
- "//third_party/webrtc/api/video:encoded_image",
151+
- "//third_party/webrtc/call:call_interfaces",
141152
- "//third_party/webrtc/media:rtc_h264_profile_id",
142153
- "//third_party/webrtc/media:rtc_media_engine_defaults",
143154
- "//third_party/webrtc/modules/audio_device:audio_device_default",
@@ -286,10 +297,10 @@ index 878e6cc576b..00000000000
286297
-} // namespace webrtc
287298
diff --git a/webrtc_overrides/init_webrtc.cc b/webrtc_overrides/init_webrtc.cc
288299
deleted file mode 100644
289-
index db086b6f758..00000000000
300+
index effc5796caa..00000000000
290301
--- a/webrtc_overrides/init_webrtc.cc
291302
+++ /dev/null
292-
@@ -1,45 +0,0 @@
303+
@@ -1,44 +0,0 @@
293304
-// Copyright 2013 The Chromium Authors. All rights reserved.
294305
-// Use of this source code is governed by a BSD-style license that can be
295306
-// found in the LICENSE file.
@@ -299,7 +310,6 @@ index db086b6f758..00000000000
299310
-#include "base/command_line.h"
300311
-#include "base/files/file_path.h"
301312
-#include "base/files/file_util.h"
302-
-#include "base/logging.h"
303313
-#include "base/native_library.h"
304314
-#include "base/path_service.h"
305315
-#include "base/trace_event/trace_event.h"
@@ -669,10 +679,10 @@ index d57937aa63b..00000000000
669679
-#endif // THIRD_PARTY_WEBRTC_OVERRIDES_RTC_BASE_GTEST_PROD_UTIL_H_
670680
diff --git a/webrtc_overrides/rtc_base/logging.cc b/webrtc_overrides/rtc_base/logging.cc
671681
deleted file mode 100644
672-
index d10fd254db1..00000000000
682+
index 87ae618c496..00000000000
673683
--- a/webrtc_overrides/rtc_base/logging.cc
674684
+++ /dev/null
675-
@@ -1,230 +0,0 @@
685+
@@ -1,231 +0,0 @@
676686
-// Copyright 2015 The Chromium Authors. All rights reserved.
677687
-// Use of this source code is governed by a BSD-style license that can be
678688
-// found in the LICENSE file.
@@ -691,6 +701,7 @@ index d10fd254db1..00000000000
691701
-
692702
-#include "base/atomicops.h"
693703
-#include "base/logging.h"
704+
-#include "base/notreached.h"
694705
-#include "base/strings/string_util.h"
695706
-#include "base/threading/platform_thread.h"
696707
-#include "third_party/webrtc/rtc_base/string_utils.h"
@@ -1034,10 +1045,10 @@ index 5513bc6ef58..00000000000
10341045
-#endif // THIRD_PARTY_WEBRTC_OVERRIDES_WEBRTC_RTC_BASE_LOGGING_H_
10351046
diff --git a/webrtc_overrides/task_queue_factory.cc b/webrtc_overrides/task_queue_factory.cc
10361047
deleted file mode 100644
1037-
index e81ef238494..00000000000
1048+
index 2898c95ef09..00000000000
10381049
--- a/webrtc_overrides/task_queue_factory.cc
10391050
+++ /dev/null
1040-
@@ -1,144 +0,0 @@
1051+
@@ -1,143 +0,0 @@
10411052
-// Copyright 2019 The Chromium Authors. All rights reserved.
10421053
-// Use of this source code is governed by a BSD-style license that can be
10431054
-// found in the LICENSE file.
@@ -1146,7 +1157,6 @@ index e81ef238494..00000000000
11461157
-#else
11471158
- return {base::TaskPriority::HIGHEST};
11481159
-#endif
1149-
- break;
11501160
- case webrtc::TaskQueueFactory::Priority::LOW:
11511161
- return {base::MayBlock(), base::TaskPriority::BEST_EFFORT};
11521162
- case webrtc::TaskQueueFactory::Priority::NORMAL:
@@ -1213,5 +1223,5 @@ index 957cf75e4e9..00000000000
12131223
-
12141224
-#endif // THIRD_PARTY_WEBRTC_OVERRIDES_TASK_QUEUE_FACTORY_H_
12151225
--
1216-
2.24.1.windows.2
1226+
2.28.0.windows.1
12171227

0 commit comments

Comments
 (0)