mediasoup 3.12.0 → 3.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/lib/Worker.js +1 -1
- package/node/lib/index.d.ts +1 -1
- package/node/lib/index.js +1 -1
- package/npm-scripts.js +40 -9
- package/package.json +1 -1
- package/worker/src/lib.cpp +8 -4
- package/worker/src/main.cpp +3 -10
package/node/lib/Worker.js
CHANGED
|
@@ -90,7 +90,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter {
|
|
|
90
90
|
// options
|
|
91
91
|
{
|
|
92
92
|
env: {
|
|
93
|
-
MEDIASOUP_VERSION: '3.12.
|
|
93
|
+
MEDIASOUP_VERSION: '3.12.1',
|
|
94
94
|
// Let the worker process inherit all environment variables, useful
|
|
95
95
|
// if a custom and not in the path GCC is used so the user can set
|
|
96
96
|
// LD_LIBRARY_PATH environment variable for runtime.
|
package/node/lib/index.d.ts
CHANGED
package/node/lib/index.js
CHANGED
package/npm-scripts.js
CHANGED
|
@@ -216,7 +216,7 @@ async function run()
|
|
|
216
216
|
executeCmd(`git push origin v${MAYOR_VERSION}`);
|
|
217
217
|
executeCmd(`git push origin '${PKG.version}'`);
|
|
218
218
|
|
|
219
|
-
logInfo('creating release in GitHub
|
|
219
|
+
logInfo('creating release in GitHub');
|
|
220
220
|
|
|
221
221
|
await octokit.repos.createRelease(
|
|
222
222
|
{
|
|
@@ -529,16 +529,47 @@ async function downloadPrebuiltWorker()
|
|
|
529
529
|
{
|
|
530
530
|
// Give execution permission to the binary.
|
|
531
531
|
fs.chmodSync(WORKER_RELEASE_BIN_PATH, 0o775);
|
|
532
|
-
|
|
533
|
-
resolve(true);
|
|
534
532
|
}
|
|
535
533
|
catch (error)
|
|
536
534
|
{
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
535
|
+
logWarn(`downloadPrebuiltWorker() | failed to give execution permissions to the mediasoup-worker prebuilt binary: ${error}`);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Let's confirm that the fetched mediasoup-worker prebuit binary does
|
|
539
|
+
// run in current host. This is to prevent weird issues related to
|
|
540
|
+
// different versions of libc in the system and so on.
|
|
541
|
+
// So run mediasoup-worker without the required MEDIASOUP_VERSION env and
|
|
542
|
+
// expect exit code 41 (see main.cpp).
|
|
543
|
+
|
|
544
|
+
logInfo(
|
|
545
|
+
'downloadPrebuiltWorker() | checking fetched mediasoup-worker prebuilt binary in current host'
|
|
546
|
+
);
|
|
540
547
|
|
|
541
|
-
|
|
548
|
+
try
|
|
549
|
+
{
|
|
550
|
+
execSync(`${WORKER_RELEASE_BIN_PATH}`, { stdio: [ 'ignore', 'ignore', 'ignore' ] });
|
|
551
|
+
}
|
|
552
|
+
catch (error)
|
|
553
|
+
{
|
|
554
|
+
if (error.status === 41)
|
|
555
|
+
{
|
|
556
|
+
resolve(true);
|
|
557
|
+
}
|
|
558
|
+
else
|
|
559
|
+
{
|
|
560
|
+
logError(
|
|
561
|
+
`downloadPrebuiltWorker() | fetched mediasoup-worker prebuilt binary fails to run in this host [status:${error.status}]`
|
|
562
|
+
);
|
|
563
|
+
|
|
564
|
+
try
|
|
565
|
+
{
|
|
566
|
+
fs.unlinkSync(WORKER_RELEASE_BIN_PATH);
|
|
567
|
+
}
|
|
568
|
+
catch (error2)
|
|
569
|
+
{}
|
|
570
|
+
|
|
571
|
+
resolve(false);
|
|
572
|
+
}
|
|
542
573
|
}
|
|
543
574
|
})
|
|
544
575
|
.on('error', (error) =>
|
|
@@ -563,7 +594,7 @@ async function uploadMacArmPrebuiltWorker()
|
|
|
563
594
|
|
|
564
595
|
const octokit = getOctokit();
|
|
565
596
|
|
|
566
|
-
logInfo('uploadMacArmPrebuiltWorker() | getting release info
|
|
597
|
+
logInfo('uploadMacArmPrebuiltWorker() | getting release info');
|
|
567
598
|
|
|
568
599
|
const release = await octokit.rest.repos.getReleaseByTag(
|
|
569
600
|
{
|
|
@@ -572,7 +603,7 @@ async function uploadMacArmPrebuiltWorker()
|
|
|
572
603
|
tag : PKG.version
|
|
573
604
|
});
|
|
574
605
|
|
|
575
|
-
logInfo('uploadMacArmPrebuiltWorker() | uploading release asset
|
|
606
|
+
logInfo('uploadMacArmPrebuiltWorker() | uploading release asset');
|
|
576
607
|
|
|
577
608
|
await octokit.rest.repos.uploadReleaseAsset(
|
|
578
609
|
{
|
package/package.json
CHANGED
package/worker/src/lib.cpp
CHANGED
|
@@ -75,7 +75,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
75
75
|
DepLibUV::RunLoop();
|
|
76
76
|
DepLibUV::ClassDestroy();
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
79
|
+
return 40;
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
try
|
|
@@ -99,7 +100,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
99
100
|
DepLibUV::RunLoop();
|
|
100
101
|
DepLibUV::ClassDestroy();
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
104
|
+
return 40;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
// Initialize the Logger.
|
|
@@ -130,7 +132,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
130
132
|
DepLibUV::RunLoop();
|
|
131
133
|
DepLibUV::ClassDestroy();
|
|
132
134
|
|
|
133
|
-
|
|
135
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
136
|
+
return 40;
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
MS_DEBUG_TAG(info, "starting mediasoup-worker process [version:%s]", version);
|
|
@@ -193,7 +196,8 @@ extern "C" int mediasoup_worker_run(
|
|
|
193
196
|
{
|
|
194
197
|
MS_ERROR_STD("failure exit: %s", error.what());
|
|
195
198
|
|
|
196
|
-
|
|
199
|
+
// 40 is a custom exit code to notify "unknown error" to the Node library.
|
|
200
|
+
return 40;
|
|
197
201
|
}
|
|
198
202
|
}
|
|
199
203
|
|
package/worker/src/main.cpp
CHANGED
|
@@ -18,7 +18,8 @@ int main(int argc, char* argv[])
|
|
|
18
18
|
{
|
|
19
19
|
MS_ERROR_STD("you don't seem to be my real father!");
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
// 41 is a custom exit code to notify about "missing MEDIASOUP_VERSION" env.
|
|
22
|
+
std::_Exit(41);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
const std::string version = std::getenv("MEDIASOUP_VERSION");
|
|
@@ -40,13 +41,5 @@ int main(int argc, char* argv[])
|
|
|
40
41
|
nullptr,
|
|
41
42
|
nullptr);
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
case 0:
|
|
46
|
-
std::_Exit(EXIT_SUCCESS);
|
|
47
|
-
case 1:
|
|
48
|
-
std::_Exit(EXIT_FAILURE);
|
|
49
|
-
case 42:
|
|
50
|
-
std::_Exit(42);
|
|
51
|
-
}
|
|
44
|
+
std::_Exit(statusCode);
|
|
52
45
|
}
|