Commit 7683665d authored by Linshizhi's avatar Linshizhi

update

parent 6ff90b93
......@@ -41,33 +41,36 @@ describe("H264EncWWGroup Spec", () => {
fit("Encode By H264EncWWGroup with direct write", async () => {
const RGBAFrameSize = 1920*1080*4;
let grp = new H264EncWWGroup("h264enc", 2, {
let grp = new H264EncWWGroup("h264enc", 8, {
encchnlsize: RGBAFrameSize * 10,
bridgechnlsize: Math.pow(2, 25),
blockbased: true,
blocksize: RGBAFrameSize,
});
await grp.start();
const data = new Uint8Array([...Array(RGBAFrameSize).keys()]);
for (let i = 0; i < 30; ++i) {
for (let i = 0; i < 300; ++i) {
let buffers = [];
while (true) {
buffers = grp.directWPrepare(RGBAFrameSize);
if (buffers > 0)
if (buffers.length > 0)
break;
else {
console.log("Sleep");
await sleep(30);
}
}
expect(buffers.length).toBe(1);
buffers[0].set(data, 0);
grp.directWConfirm();
await grp.directWConfirm();
}
await grp.dispatch(null);
await waitCond(() => grp.isDone());
let result = await grp.getResult();
grp.terminate();
}, 30000);
}, 3000000);
})
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