提交 877531a3 编写于 作者: L ling990

modify Signed-off-by: ling990 <liling96@huawei.com>

Signed-off-by: Nling990 <liling96@huawei.com>
上级 5d55ba17
......@@ -147,6 +147,8 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor.stop((err) => {
expect(err).assertUndefined();
console.log("stop success");
inputQueue = [];
outputQueue = [];
audioDecodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.log("reset success");
......
......@@ -157,6 +157,8 @@ describe('AudioDecoderFormatPromise', function () {
await audioDecodeProcessor.stop().then(() => {
console.log("stop success");
}, failCallback).catch(failCatch);
inputQueue = [];
outputQueue = [];
await audioDecodeProcessor.reset().then(() => {
console.log("reset success");
}, failCallback).catch(failCatch);
......
......@@ -271,6 +271,8 @@ describe('AudioDecoderFunc', function () {
timestamp = 0;
sawInputEOS = false;
sawOutputEOS = false;
inputQueue = [];
outputQueue = [];
}
function writeFile(path, buf, len){
......@@ -309,6 +311,7 @@ describe('AudioDecoderFunc', function () {
}
async function resetWork() {
resetParam();
audioDecodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.info("case reset success");
......@@ -338,6 +341,7 @@ describe('AudioDecoderFunc', function () {
audioDecodeProcessor.stop((err) => {
expect(err).assertUndefined();
console.info("case stop success");
resetParam();
audioDecodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.log("case reset success");
......@@ -776,6 +780,7 @@ describe('AudioDecoderFunc', function () {
})
});
eventEmitter.on('reset', () => {
resetParam();
audioDecodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.info(`case reset 1`);
......
......@@ -281,6 +281,8 @@ describe('AudioDecoderFunc', function () {
timestamp = 0;
sawInputEOS = false;
sawOutputEOS = false;
inputQueue = [];
outputQueue = [];
}
function writeFile(path, buf, len) {
......@@ -317,6 +319,7 @@ describe('AudioDecoderFunc', function () {
}
async function resetWork() {
resetParam();
await audioDecodeProcessor.reset().then(() => {
console.info("case reset success");
if (needrelease) {
......@@ -340,6 +343,7 @@ describe('AudioDecoderFunc', function () {
await audioDecodeProcessor.stop().then(() => {
console.info("case stop success");
}, failCallback).catch(failCatch);
resetParam();
await audioDecodeProcessor.reset().then(() => {
console.info("case reset success");
}, failCallback).catch(failCatch);
......@@ -658,6 +662,7 @@ describe('AudioDecoderFunc', function () {
audioDecodeProcessor.stop().then(() => {
console.info("case stop after 5s success");
}, failCallback).catch(failCatch);});
resetParam();
await audioDecodeProcessor.reset().then(() => {
console.info("case reset success");
}, failCallback).catch(failCatch);
......
......@@ -78,6 +78,8 @@ describe('AudioDecoderMultiInstances', function () {
timestamp = 0;
sawInputEOS = false;
sawOutputEOS = false;
inputQueue = [];
outputQueue = [];
}
function writeFile(path, buf, len) {
......@@ -114,6 +116,7 @@ describe('AudioDecoderMultiInstances', function () {
}
async function resetWork(audioDecodeProcessor) {
resetParam();
await audioDecodeProcessor.reset().then(() => {
console.info("case reset success");
if (needrelease) {
......@@ -137,6 +140,7 @@ describe('AudioDecoderMultiInstances', function () {
await audioDecodeProcessor.stop().then(() => {
console.info("case stop success");
}, failCallback).catch(failCatch);
resetParam();
await audioDecodeProcessor.reset().then(() => {
console.info("case reset success");
}, failCallback).catch(failCatch);
......@@ -255,6 +259,7 @@ describe('AudioDecoderMultiInstances', function () {
console.info('case has created 16 decoders');
console.info('case array: ' + array);
for (let j = 0; j < 16; j++) {
resetParam();
await array[j].reset().then(() => {
console.info("reset decoder " + j);
}, failCallback).catch(failCatch);
......
......@@ -329,6 +329,7 @@ describe('AudioDecoderReliabilityCallback', function () {
audioDecodeProcessor.stop((err) => {
expect(err).assertUndefined();
console.info("case stop success");
resetParam();
audioDecodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.log("case reset success");
......@@ -425,6 +426,7 @@ describe('AudioDecoderReliabilityCallback', function () {
case RESET:
mySteps.shift();
console.info(`case to reset`);
resetParam();
audioDecodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.info(`case reset 1`);
......
......@@ -350,6 +350,7 @@ describe('AudioDecoderReliabilityPromise', function () {
await audioDecodeProcessor.stop().then(() => {
console.info("case stop success");
}, failCallback).catch(failCatch);
resetParam();
await audioDecodeProcessor.reset().then(() => {
console.info("case reset success");
}, failCallback).catch(failCatch);
......@@ -435,6 +436,7 @@ describe('AudioDecoderReliabilityPromise', function () {
case RESET:
mySteps.shift();
console.info(`case to reset`);
resetParam();
audioDecodeProcessor.reset().then(() => {
console.info(`case reset 1`);
nextStep(mySteps, done);
......
......@@ -90,6 +90,8 @@ describe('AudioEncoderFuncCallback', function () {
timestamp = 0;
sawInputEOS = false;
sawOutputEOS = false;
inputQueue = [];
outputQueue = [];
}
function writeHead(path, len) {
......@@ -155,6 +157,7 @@ describe('AudioEncoderFuncCallback', function () {
}
async function resetWork() {
resetParam();
audioEncodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.info("case reset success");
......@@ -180,6 +183,7 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor.stop((err) => {
expect(err).assertUndefined();
console.info("case stop success");
resetParam();
audioEncodeProcessor.reset((err) => {
expect(err).assertUndefined();
audioEncodeProcessor.release((err) => {
......@@ -605,6 +609,7 @@ describe('AudioEncoderFuncCallback', function () {
})
});
eventEmitter.on('reset', () => {
resetParam();
audioEncodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.info(`case reset 1`);
......
......@@ -100,6 +100,8 @@ describe('AudioEncoderFuncPromise', function () {
timestamp = 0;
sawInputEOS = false;
sawOutputEOS = false;
inputQueue = [];
outputQueue = [];
}
function writeHead(path, len) {
......@@ -165,6 +167,7 @@ describe('AudioEncoderFuncPromise', function () {
}
async function resetWork() {
resetParam();
await audioEncodeProcessor.reset().then(() => {
console.info("case reset success");
if (needrelease) {
......@@ -188,6 +191,7 @@ describe('AudioEncoderFuncPromise', function () {
await audioEncodeProcessor.stop().then(() => {
console.info("case stop success");
}, failCallback).catch(failCatch);
resetParam();
await audioEncodeProcessor.reset().then(() => {
console.info("case reset success");
}, failCallback).catch(failCatch);
......@@ -515,6 +519,7 @@ describe('AudioEncoderFuncPromise', function () {
audioEncodeProcessor.stop().then(() => {
console.info("stop after 5s success");
}, failCallback).catch(failCatch);});
resetParam();
await audioEncodeProcessor.reset().then(() => {
console.info("reset success");
}, failCallback).catch(failCatch);
......
......@@ -92,6 +92,8 @@ describe('AudioEncoderFuncPromise', function () {
timestamp = 0;
sawInputEOS = false;
sawOutputEOS = false;
inputQueue = [];
outputQueue = [];
}
function writeHead(path, len) {
......@@ -157,6 +159,7 @@ describe('AudioEncoderFuncPromise', function () {
}
async function resetWork(audioEncodeProcessor) {
resetParam();
await audioEncodeProcessor.reset().then(() => {
console.info("case reset success");
if (needrelease) {
......@@ -180,6 +183,7 @@ describe('AudioEncoderFuncPromise', function () {
await audioEncodeProcessor.stop().then(() => {
console.info("case stop success");
}, failCallback).catch(failCatch);
resetParam();
await audioEncodeProcessor.reset().then(() => {
console.info("case reset success");
}, failCallback).catch(failCatch);
......@@ -301,6 +305,7 @@ describe('AudioEncoderFuncPromise', function () {
console.info('case has created 16 encoders');
console.info('case array: ' + array);
for (let j = 0; j < 16; j++) {
resetParam();
await array[j].reset().then(() => {
console.info("reset encoder " + j);
}, failCallback).catch(failCatch);
......
......@@ -179,6 +179,7 @@ describe('AudioEncoderSTTCallback', function () {
audioEncodeProcessor.stop((err) => {
expect(err).assertUndefined();
console.info("case stop success");
resetParam();
audioEncodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.log("case reset success");
......@@ -274,6 +275,7 @@ describe('AudioEncoderSTTCallback', function () {
case RESET:
mySteps.shift();
console.info(`case to reset`);
resetParam();
audioEncodeProcessor.reset((err) => {
expect(err).assertUndefined();
console.info(`case reset 1`);
......
......@@ -197,6 +197,7 @@ describe('AudioEncoderSTTPromise', function () {
await audioEncodeProcessor.stop().then(() => {
console.info("case stop success");
}, failCallback).catch(failCatch);
resetParam();
await audioEncodeProcessor.reset().then(() => {
console.info("case reset success");
}, failCallback).catch(failCatch);
......@@ -283,6 +284,7 @@ describe('AudioEncoderSTTPromise', function () {
case RESET:
mySteps.shift();
console.info(`case to reset`);
resetParam();
audioEncodeProcessor.reset().then(() => {
console.info(`case reset 1`);
nextStep(mySteps, done);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册