Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
877531a3
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
877531a3
编写于
2月 15, 2022
作者:
L
ling990
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify Signed-off-by: ling990 <liling96@huawei.com>
Signed-off-by:
N
ling990
<
liling96@huawei.com
>
上级
5d55ba17
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
42 addition
and
0 deletion
+42
-0
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
...r/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
+2
-0
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
...er/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
+2
-0
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
+5
-0
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
+5
-0
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js
...r/src/main/js/test/AudioDecoderMultiInstancesTest.test.js
+5
-0
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
.../main/js/test/AudioDecoderReliabilityCallbackTest.test.js
+2
-0
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
+2
-0
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
+5
-0
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
+5
-0
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js
...r/src/main/js/test/AudioEncoderMultiInstancesTest.test.js
+5
-0
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
.../main/js/test/AudioEncoderReliabilityCallbackTest.test.js
+2
-0
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
+2
-0
未找到文件。
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
浏览文件 @
877531a3
...
@@ -147,6 +147,8 @@ describe('AudioDecoderFormatCallback', function () {
...
@@ -147,6 +147,8 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
stop
((
err
)
=>
{
audioDecodeProcessor
.
stop
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
log
(
"
stop success
"
);
console
.
log
(
"
stop success
"
);
inputQueue
=
[];
outputQueue
=
[];
audioDecodeProcessor
.
reset
((
err
)
=>
{
audioDecodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
log
(
"
reset success
"
);
console
.
log
(
"
reset success
"
);
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
浏览文件 @
877531a3
...
@@ -157,6 +157,8 @@ describe('AudioDecoderFormatPromise', function () {
...
@@ -157,6 +157,8 @@ describe('AudioDecoderFormatPromise', function () {
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
console
.
log
(
"
stop success
"
);
console
.
log
(
"
stop success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
inputQueue
=
[];
outputQueue
=
[];
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
log
(
"
reset success
"
);
console
.
log
(
"
reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
浏览文件 @
877531a3
...
@@ -271,6 +271,8 @@ describe('AudioDecoderFunc', function () {
...
@@ -271,6 +271,8 @@ describe('AudioDecoderFunc', function () {
timestamp
=
0
;
timestamp
=
0
;
sawInputEOS
=
false
;
sawInputEOS
=
false
;
sawOutputEOS
=
false
;
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
}
}
function
writeFile
(
path
,
buf
,
len
){
function
writeFile
(
path
,
buf
,
len
){
...
@@ -309,6 +311,7 @@ describe('AudioDecoderFunc', function () {
...
@@ -309,6 +311,7 @@ describe('AudioDecoderFunc', function () {
}
}
async
function
resetWork
()
{
async
function
resetWork
()
{
resetParam
();
audioDecodeProcessor
.
reset
((
err
)
=>
{
audioDecodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
...
@@ -338,6 +341,7 @@ describe('AudioDecoderFunc', function () {
...
@@ -338,6 +341,7 @@ describe('AudioDecoderFunc', function () {
audioDecodeProcessor
.
stop
((
err
)
=>
{
audioDecodeProcessor
.
stop
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
resetParam
();
audioDecodeProcessor
.
reset
((
err
)
=>
{
audioDecodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
log
(
"
case reset success
"
);
console
.
log
(
"
case reset success
"
);
...
@@ -776,6 +780,7 @@ describe('AudioDecoderFunc', function () {
...
@@ -776,6 +780,7 @@ describe('AudioDecoderFunc', function () {
})
})
});
});
eventEmitter
.
on
(
'
reset
'
,
()
=>
{
eventEmitter
.
on
(
'
reset
'
,
()
=>
{
resetParam
();
audioDecodeProcessor
.
reset
((
err
)
=>
{
audioDecodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
`case reset 1`
);
console
.
info
(
`case reset 1`
);
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
浏览文件 @
877531a3
...
@@ -281,6 +281,8 @@ describe('AudioDecoderFunc', function () {
...
@@ -281,6 +281,8 @@ describe('AudioDecoderFunc', function () {
timestamp
=
0
;
timestamp
=
0
;
sawInputEOS
=
false
;
sawInputEOS
=
false
;
sawOutputEOS
=
false
;
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
}
}
function
writeFile
(
path
,
buf
,
len
)
{
function
writeFile
(
path
,
buf
,
len
)
{
...
@@ -317,6 +319,7 @@ describe('AudioDecoderFunc', function () {
...
@@ -317,6 +319,7 @@ describe('AudioDecoderFunc', function () {
}
}
async
function
resetWork
()
{
async
function
resetWork
()
{
resetParam
();
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
if
(
needrelease
)
{
if
(
needrelease
)
{
...
@@ -340,6 +343,7 @@ describe('AudioDecoderFunc', function () {
...
@@ -340,6 +343,7 @@ describe('AudioDecoderFunc', function () {
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
resetParam
();
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
@@ -658,6 +662,7 @@ describe('AudioDecoderFunc', function () {
...
@@ -658,6 +662,7 @@ describe('AudioDecoderFunc', function () {
audioDecodeProcessor
.
stop
().
then
(()
=>
{
audioDecodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
case stop after 5s success
"
);
console
.
info
(
"
case stop after 5s success
"
);
},
failCallback
).
catch
(
failCatch
);});
},
failCallback
).
catch
(
failCatch
);});
resetParam
();
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js
浏览文件 @
877531a3
...
@@ -78,6 +78,8 @@ describe('AudioDecoderMultiInstances', function () {
...
@@ -78,6 +78,8 @@ describe('AudioDecoderMultiInstances', function () {
timestamp
=
0
;
timestamp
=
0
;
sawInputEOS
=
false
;
sawInputEOS
=
false
;
sawOutputEOS
=
false
;
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
}
}
function
writeFile
(
path
,
buf
,
len
)
{
function
writeFile
(
path
,
buf
,
len
)
{
...
@@ -114,6 +116,7 @@ describe('AudioDecoderMultiInstances', function () {
...
@@ -114,6 +116,7 @@ describe('AudioDecoderMultiInstances', function () {
}
}
async
function
resetWork
(
audioDecodeProcessor
)
{
async
function
resetWork
(
audioDecodeProcessor
)
{
resetParam
();
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
if
(
needrelease
)
{
if
(
needrelease
)
{
...
@@ -137,6 +140,7 @@ describe('AudioDecoderMultiInstances', function () {
...
@@ -137,6 +140,7 @@ describe('AudioDecoderMultiInstances', function () {
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
resetParam
();
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
@@ -255,6 +259,7 @@ describe('AudioDecoderMultiInstances', function () {
...
@@ -255,6 +259,7 @@ describe('AudioDecoderMultiInstances', function () {
console
.
info
(
'
case has created 16 decoders
'
);
console
.
info
(
'
case has created 16 decoders
'
);
console
.
info
(
'
case array:
'
+
array
);
console
.
info
(
'
case array:
'
+
array
);
for
(
let
j
=
0
;
j
<
16
;
j
++
)
{
for
(
let
j
=
0
;
j
<
16
;
j
++
)
{
resetParam
();
await
array
[
j
].
reset
().
then
(()
=>
{
await
array
[
j
].
reset
().
then
(()
=>
{
console
.
info
(
"
reset decoder
"
+
j
);
console
.
info
(
"
reset decoder
"
+
j
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
浏览文件 @
877531a3
...
@@ -329,6 +329,7 @@ describe('AudioDecoderReliabilityCallback', function () {
...
@@ -329,6 +329,7 @@ describe('AudioDecoderReliabilityCallback', function () {
audioDecodeProcessor
.
stop
((
err
)
=>
{
audioDecodeProcessor
.
stop
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
resetParam
();
audioDecodeProcessor
.
reset
((
err
)
=>
{
audioDecodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
log
(
"
case reset success
"
);
console
.
log
(
"
case reset success
"
);
...
@@ -425,6 +426,7 @@ describe('AudioDecoderReliabilityCallback', function () {
...
@@ -425,6 +426,7 @@ describe('AudioDecoderReliabilityCallback', function () {
case
RESET
:
case
RESET
:
mySteps
.
shift
();
mySteps
.
shift
();
console
.
info
(
`case to reset`
);
console
.
info
(
`case to reset`
);
resetParam
();
audioDecodeProcessor
.
reset
((
err
)
=>
{
audioDecodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
`case reset 1`
);
console
.
info
(
`case reset 1`
);
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
浏览文件 @
877531a3
...
@@ -350,6 +350,7 @@ describe('AudioDecoderReliabilityPromise', function () {
...
@@ -350,6 +350,7 @@ describe('AudioDecoderReliabilityPromise', function () {
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
await
audioDecodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
resetParam
();
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
await
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
@@ -435,6 +436,7 @@ describe('AudioDecoderReliabilityPromise', function () {
...
@@ -435,6 +436,7 @@ describe('AudioDecoderReliabilityPromise', function () {
case
RESET
:
case
RESET
:
mySteps
.
shift
();
mySteps
.
shift
();
console
.
info
(
`case to reset`
);
console
.
info
(
`case to reset`
);
resetParam
();
audioDecodeProcessor
.
reset
().
then
(()
=>
{
audioDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
`case reset 1`
);
console
.
info
(
`case reset 1`
);
nextStep
(
mySteps
,
done
);
nextStep
(
mySteps
,
done
);
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
浏览文件 @
877531a3
...
@@ -90,6 +90,8 @@ describe('AudioEncoderFuncCallback', function () {
...
@@ -90,6 +90,8 @@ describe('AudioEncoderFuncCallback', function () {
timestamp
=
0
;
timestamp
=
0
;
sawInputEOS
=
false
;
sawInputEOS
=
false
;
sawOutputEOS
=
false
;
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
}
}
function
writeHead
(
path
,
len
)
{
function
writeHead
(
path
,
len
)
{
...
@@ -155,6 +157,7 @@ describe('AudioEncoderFuncCallback', function () {
...
@@ -155,6 +157,7 @@ describe('AudioEncoderFuncCallback', function () {
}
}
async
function
resetWork
()
{
async
function
resetWork
()
{
resetParam
();
audioEncodeProcessor
.
reset
((
err
)
=>
{
audioEncodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
...
@@ -180,6 +183,7 @@ describe('AudioEncoderFuncCallback', function () {
...
@@ -180,6 +183,7 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
stop
((
err
)
=>
{
audioEncodeProcessor
.
stop
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
resetParam
();
audioEncodeProcessor
.
reset
((
err
)
=>
{
audioEncodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
audioEncodeProcessor
.
release
((
err
)
=>
{
audioEncodeProcessor
.
release
((
err
)
=>
{
...
@@ -605,6 +609,7 @@ describe('AudioEncoderFuncCallback', function () {
...
@@ -605,6 +609,7 @@ describe('AudioEncoderFuncCallback', function () {
})
})
});
});
eventEmitter
.
on
(
'
reset
'
,
()
=>
{
eventEmitter
.
on
(
'
reset
'
,
()
=>
{
resetParam
();
audioEncodeProcessor
.
reset
((
err
)
=>
{
audioEncodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
`case reset 1`
);
console
.
info
(
`case reset 1`
);
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
浏览文件 @
877531a3
...
@@ -100,6 +100,8 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -100,6 +100,8 @@ describe('AudioEncoderFuncPromise', function () {
timestamp
=
0
;
timestamp
=
0
;
sawInputEOS
=
false
;
sawInputEOS
=
false
;
sawOutputEOS
=
false
;
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
}
}
function
writeHead
(
path
,
len
)
{
function
writeHead
(
path
,
len
)
{
...
@@ -165,6 +167,7 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -165,6 +167,7 @@ describe('AudioEncoderFuncPromise', function () {
}
}
async
function
resetWork
()
{
async
function
resetWork
()
{
resetParam
();
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
if
(
needrelease
)
{
if
(
needrelease
)
{
...
@@ -188,6 +191,7 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -188,6 +191,7 @@ describe('AudioEncoderFuncPromise', function () {
await
audioEncodeProcessor
.
stop
().
then
(()
=>
{
await
audioEncodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
resetParam
();
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
@@ -515,6 +519,7 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -515,6 +519,7 @@ describe('AudioEncoderFuncPromise', function () {
audioEncodeProcessor
.
stop
().
then
(()
=>
{
audioEncodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
stop after 5s success
"
);
console
.
info
(
"
stop after 5s success
"
);
},
failCallback
).
catch
(
failCatch
);});
},
failCallback
).
catch
(
failCatch
);});
resetParam
();
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
reset success
"
);
console
.
info
(
"
reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js
浏览文件 @
877531a3
...
@@ -92,6 +92,8 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -92,6 +92,8 @@ describe('AudioEncoderFuncPromise', function () {
timestamp
=
0
;
timestamp
=
0
;
sawInputEOS
=
false
;
sawInputEOS
=
false
;
sawOutputEOS
=
false
;
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
}
}
function
writeHead
(
path
,
len
)
{
function
writeHead
(
path
,
len
)
{
...
@@ -157,6 +159,7 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -157,6 +159,7 @@ describe('AudioEncoderFuncPromise', function () {
}
}
async
function
resetWork
(
audioEncodeProcessor
)
{
async
function
resetWork
(
audioEncodeProcessor
)
{
resetParam
();
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
if
(
needrelease
)
{
if
(
needrelease
)
{
...
@@ -180,6 +183,7 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -180,6 +183,7 @@ describe('AudioEncoderFuncPromise', function () {
await
audioEncodeProcessor
.
stop
().
then
(()
=>
{
await
audioEncodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
resetParam
();
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
@@ -301,6 +305,7 @@ describe('AudioEncoderFuncPromise', function () {
...
@@ -301,6 +305,7 @@ describe('AudioEncoderFuncPromise', function () {
console
.
info
(
'
case has created 16 encoders
'
);
console
.
info
(
'
case has created 16 encoders
'
);
console
.
info
(
'
case array:
'
+
array
);
console
.
info
(
'
case array:
'
+
array
);
for
(
let
j
=
0
;
j
<
16
;
j
++
)
{
for
(
let
j
=
0
;
j
<
16
;
j
++
)
{
resetParam
();
await
array
[
j
].
reset
().
then
(()
=>
{
await
array
[
j
].
reset
().
then
(()
=>
{
console
.
info
(
"
reset encoder
"
+
j
);
console
.
info
(
"
reset encoder
"
+
j
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
浏览文件 @
877531a3
...
@@ -179,6 +179,7 @@ describe('AudioEncoderSTTCallback', function () {
...
@@ -179,6 +179,7 @@ describe('AudioEncoderSTTCallback', function () {
audioEncodeProcessor
.
stop
((
err
)
=>
{
audioEncodeProcessor
.
stop
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
resetParam
();
audioEncodeProcessor
.
reset
((
err
)
=>
{
audioEncodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
log
(
"
case reset success
"
);
console
.
log
(
"
case reset success
"
);
...
@@ -274,6 +275,7 @@ describe('AudioEncoderSTTCallback', function () {
...
@@ -274,6 +275,7 @@ describe('AudioEncoderSTTCallback', function () {
case
RESET
:
case
RESET
:
mySteps
.
shift
();
mySteps
.
shift
();
console
.
info
(
`case to reset`
);
console
.
info
(
`case to reset`
);
resetParam
();
audioEncodeProcessor
.
reset
((
err
)
=>
{
audioEncodeProcessor
.
reset
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
expect
(
err
).
assertUndefined
();
console
.
info
(
`case reset 1`
);
console
.
info
(
`case reset 1`
);
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
浏览文件 @
877531a3
...
@@ -197,6 +197,7 @@ describe('AudioEncoderSTTPromise', function () {
...
@@ -197,6 +197,7 @@ describe('AudioEncoderSTTPromise', function () {
await
audioEncodeProcessor
.
stop
().
then
(()
=>
{
await
audioEncodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
"
case stop success
"
);
console
.
info
(
"
case stop success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
resetParam
();
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
await
audioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
"
case reset success
"
);
console
.
info
(
"
case reset success
"
);
},
failCallback
).
catch
(
failCatch
);
},
failCallback
).
catch
(
failCatch
);
...
@@ -283,6 +284,7 @@ describe('AudioEncoderSTTPromise', function () {
...
@@ -283,6 +284,7 @@ describe('AudioEncoderSTTPromise', function () {
case
RESET
:
case
RESET
:
mySteps
.
shift
();
mySteps
.
shift
();
console
.
info
(
`case to reset`
);
console
.
info
(
`case to reset`
);
resetParam
();
audioEncodeProcessor
.
reset
().
then
(()
=>
{
audioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
`case reset 1`
);
console
.
info
(
`case reset 1`
);
nextStep
(
mySteps
,
done
);
nextStep
(
mySteps
,
done
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录