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

Commit 37e6b80

Browse files
authored
Merge pull request #794 from jianjunz/install-quic
Enable QUIC agent by default.
2 parents bad5c12 + 6842833 commit 37e6b80

File tree

7 files changed

+36
-27
lines changed

7 files changed

+36
-27
lines changed

scripts/build.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"webrtc",
1313
"avstream",
1414
"gst-pipeline",
15-
"sip"
15+
"sip",
16+
"quic"
1617
]
1718
},
1819
"mcu-msdk" : {
@@ -26,7 +27,8 @@
2627
"audio-ranker",
2728
"webrtc",
2829
"avstream",
29-
"sip"
30+
"sip",
31+
"quic"
3032
]
3133
},
3234
"mcu-all" : {
@@ -49,12 +51,6 @@
4951
"webrtc-frame"
5052
]
5153
},
52-
"mcu-quic": {
53-
"include":[
54-
"mcu",
55-
"quic"
56-
]
57-
},
5854
"video-mixer-sw" : {
5955
"path" : "source/agent/video/videoMixer/videoMixer_sw",
6056
"gyp" : "binding.sw.gyp"
@@ -120,6 +116,6 @@
120116
},
121117
"quic" : {
122118
"path" : "source/agent/addons/quic",
123-
"description": "QUIC agent supports WebTransport - QuicTransport connections. Experimental feature."
119+
"description": "QUIC agent supports WebTransport over QUIC connections."
124120
}
125121
}

scripts/installCommonDeps.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,30 @@ install_licode(){
299299
}
300300

301301
install_quic(){
302+
# QUIC IO
302303
rm $ROOT/third_party/quic-lib -rf
303304
mkdir $ROOT/third_party/quic-lib
304305

305306
pushd ${ROOT}/third_party/quic-lib
306307
wget https://github.com/open-webrtc-toolkit/owt-deps-quic/releases/download/v0.1/dist.tgz
307308
tar xzf dist.tgz
308309
popd
310+
311+
# QUIC transport
312+
local QUIC_SDK_VERSION=`cat $ROOT/source/agent/addons/quic/quic_sdk_version`
313+
local QUIC_TRANSPORT_PATH=$ROOT/third_party/quic-transport
314+
rm -r $QUIC_TRANSPORT_PATH
315+
mkdir $QUIC_TRANSPORT_PATH
316+
pushd $QUIC_TRANSPORT_PATH
317+
wget $QUIC_TRANSPORT_PACKAGE_URL_PREFIX/linux/$QUIC_SDK_VERSION.zip
318+
if [ $? -eq 0 ]; then
319+
unzip $QUIC_SDK_VERSION.zip
320+
rm $QUIC_SDK_VERSION.zip
321+
cp bin/release/libowt_quic_transport.so $ROOT/build/libdeps/build/lib
322+
else
323+
read -p "Failed to download prebuild QUIC SDK. Please download and compile QUIC SDK version $QUIC_SDK_VERSION from https://github.com/open-webrtc-toolkit/owt-deps-quic."
324+
fi
325+
popd
309326
}
310327

311328
install_nicer(){

scripts/pack.js

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ const originCwd = cwd();
4040
const osScript = path.join(rootDir, 'scripts/detectOS.sh');
4141
const osType = execSync(`bash ${osScript}`).toString().toLowerCase();
4242

43-
const experimentalTargets = ['quic-agent'];
44-
4543
var allTargets = [];
4644

4745
if (options.full) {
@@ -130,8 +128,7 @@ function getPackList(targets) {
130128
}
131129

132130
var packList = targets.filter((element) => {
133-
// Don't include QUIC agent by default until CI is added for QUIC SDK.
134-
if (options.target.includes('all') && !experimentalTargets.includes(element.rules.name)) return true;
131+
if (options.target.includes('all')) return true;
135132
return options.target.includes(element.rules.name);
136133
});
137134
if (packList.length === 0) {
@@ -418,7 +415,7 @@ function isLibAllowed(libSrc) {
418415
if (!libSrc)
419416
return false;
420417

421-
const whiteList = [
418+
const allowList = [
422419
'rtcadapter',
423420
'libssl.so.1.1',
424421
'libcrypto',
@@ -428,18 +425,19 @@ function isLibAllowed(libSrc) {
428425
'libopenh264',
429426
'libre',
430427
'sipLib',
431-
'librawquic'
428+
'librawquic',
429+
'libowt_quic_transport',
432430
];
433431
if (!options['archive'] || options['with-ffmpeg']) {
434-
whiteList.push('libav');
435-
whiteList.push('libsw');
432+
allowList.push('libav');
433+
allowList.push('libsw');
436434
}
437435

438436
const libName = path.basename(libSrc);
439437

440438
var found = false;
441-
for (let i in whiteList) {
442-
if (libName.indexOf(whiteList[i]) === 0) {
439+
for (let i in allowList) {
440+
if (libName.indexOf(allowList[i]) === 0) {
443441
found = true;
444442
break;
445443
}
@@ -592,9 +590,6 @@ function packScripts() {
592590
}
593591
scriptItems.push('app');
594592
scriptItems.forEach((m) => {
595-
if (experimentalTargets.includes(m)) {
596-
return;
597-
}
598593
startCommands += '${bin}/daemon.sh start ' + m + ' $1\n';
599594
stopCommands += '${bin}/daemon.sh stop ' + m + '\n';
600595
});

source/agent/addons/quic/binding.gyp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,14 @@
3838
'../../../core/common',
3939
'../../../core/owt_base',
4040
'../../../../build/libdeps/build/include',
41-
# TODO: Fix it when CI for QUIC SDK is ready.
42-
'/home/jianjunz/code/quic/src/owt/quic_transport/api',
41+
'../../../../third_party/quic-transport/include',
4342
'<!@(pkg-config glib-2.0 --cflags-only-I | sed s/-I//g)',
4443
],
4544
'ldflags': [
4645
'-Wl,--no-as-needed',
47-
'-Wl,-rpath,/home/jianjunz/code/quic/src/out/debug',
4846
'-L$(CORE_HOME)/../../build/libdeps/build/lib',
4947
'-fPIC',
50-
'-L/home/jianjunz/code/quic/src/out/debug',
48+
'-L<(module_root_dir)/../../../../third_party/quic-transport/bin/release',
5149
],
5250
'cflags_cc!': [
5351
'-std=gnu++0x',
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5df7581e55816cfc8eedd3cbe082a482b2445f28

source/agent/quic/dist.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
"../../common/clusterWorker.js",
1919
"../../common/loadCollector.js",
2020
"../../common/logger.js",
21+
"../../common/makeRPC.js",
22+
"../../common/rpcChannel.js",
2123
"../../../scripts/release/initcert.js",
2224
"../../../scripts/release/initauth.js",
2325
"../../../scripts/detectOS.sh"

source/management_api/management_api.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ superserviceID = "_auto_generated_ID_" #default: ""
44
ssl = true #if use HTTPS
55
port = 3000 #default: 3000, port of server
66
numberOfProcess = 4 #default: 1
7-
enableWebTransport = false #default: false.
7+
enableWebTransport = true #default: true.
88

99
[cluster]
1010
name = "owt-cluster"

0 commit comments

Comments
 (0)