Commit d2228340 authored by NzSN's avatar NzSN

Muxer update.

parent 6f9e2c8e
...@@ -4,7 +4,7 @@ let isInited = false; ...@@ -4,7 +4,7 @@ let isInited = false;
let isBridged = false; let isBridged = false;
let bridge = null; let bridge = null;
let muxer = null; let muxer = null;
let numOfEncs = 0; let numOfEncs = 1;
// Constants // Constants
const SLEEP_INTERVAL = 100; const SLEEP_INTERVAL = 100;
...@@ -35,7 +35,7 @@ async function main(msg) { ...@@ -35,7 +35,7 @@ async function main(msg) {
switch (typeOfMsg(msg)) { switch (typeOfMsg(msg)) {
case MESSAGE_TYPE.INIT: case MESSAGE_TYPE.INIT:
if (!isInited) await init(); if (!isInited) await init(msg);
break; break;
case MESSAGE_TYPE.BRIDGE: case MESSAGE_TYPE.BRIDGE:
if (!isBridged) await bridging(); if (!isBridged) await bridging();
...@@ -60,12 +60,12 @@ async function init(msg) { ...@@ -60,12 +60,12 @@ async function init(msg) {
if ('wasmBufSize' in info) if ('wasmBufSize' in info)
MUX_BUFFER_SIZE = info.wasmBufSize; MUX_BUFFER_SIZE = info.wasmBufSize;
if ('numofEncs' in info) if ('numofEncs' in info)
numOfEncs = info.numOfEncs; numOfEncs = info.numofEncs;
muxBuffer = muxer._malloc(MUX_BUFFER_SIZE); muxBuffer = muxer._malloc(MUX_BUFFER_SIZE);
/* Init Muxer */ /* Init Muxer */
muxer.muxInit(numofEncs); muxer._muxInit(numOfEncs);
} }
......
...@@ -195,5 +195,4 @@ describe("H264EncWWGroup Spec", () => { ...@@ -195,5 +195,4 @@ describe("H264EncWWGroup Spec", () => {
expect(wg.numOfWorker()).toBe(2); expect(wg.numOfWorker()).toBe(2);
}); });
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment