Commit d2228340 authored by NzSN's avatar NzSN

Muxer update.

parent 6f9e2c8e
......@@ -4,7 +4,7 @@ let isInited = false;
let isBridged = false;
let bridge = null;
let muxer = null;
let numOfEncs = 0;
let numOfEncs = 1;
// Constants
const SLEEP_INTERVAL = 100;
......@@ -35,7 +35,7 @@ async function main(msg) {
switch (typeOfMsg(msg)) {
case MESSAGE_TYPE.INIT:
if (!isInited) await init();
if (!isInited) await init(msg);
break;
case MESSAGE_TYPE.BRIDGE:
if (!isBridged) await bridging();
......@@ -60,12 +60,12 @@ async function init(msg) {
if ('wasmBufSize' in info)
MUX_BUFFER_SIZE = info.wasmBufSize;
if ('numofEncs' in info)
numOfEncs = info.numOfEncs;
numOfEncs = info.numofEncs;
muxBuffer = muxer._malloc(MUX_BUFFER_SIZE);
/* Init Muxer */
muxer.muxInit(numofEncs);
muxer._muxInit(numOfEncs);
}
......
......@@ -195,5 +195,4 @@ describe("H264EncWWGroup Spec", () => {
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