Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b9f292d2
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
接近 2 年 前同步成功
通知
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看板
提交
b9f292d2
编写于
2月 22, 2022
作者:
L
ling990
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
videoEncoder Signed-off-by: ling990 <liling96@huawei.com>
Signed-off-by:
N
ling990
<
liling96@huawei.com
>
上级
23e29949
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
99 addition
and
100 deletion
+99
-100
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js
...main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js
+32
-16
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js
.../test/VideoEncoderSoftwareReliabilityCallbackTest.test.js
+51
-51
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js
...s/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js
+16
-33
未找到文件。
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js
浏览文件 @
b9f292d2
...
...
@@ -303,8 +303,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
console
.
info
(
'
case create createVideoEncoderByName success
'
);
videoEncodeProcessor
=
processor
;
toCreateStream
();
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
}
else
{
console
.
info
(
'
case create createVideoEncoderByName fail
'
);
expect
().
assertFail
();
...
...
@@ -337,8 +339,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
console
.
info
(
'
case create createVideoEncoderByName success
'
);
videoEncodeProcessor
=
processor
;
toCreateStream
();
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
}
else
{
console
.
info
(
'
case create createVideoEncoderByName fail
'
);
expect
().
assertFail
();
...
...
@@ -371,8 +375,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
console
.
info
(
'
case create createVideoEncoderByName success
'
);
videoEncodeProcessor
=
processor
;
toCreateStream
();
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
}
else
{
console
.
info
(
'
case create createVideoEncoderByName fail
'
);
expect
().
assertFail
();
...
...
@@ -406,8 +412,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
console
.
info
(
'
case create createVideoEncoderByName success
'
);
videoEncodeProcessor
=
processor
;
toCreateStream
();
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
}
else
{
console
.
info
(
'
case create createVideoEncoderByName fail
'
);
expect
().
assertFail
();
...
...
@@ -440,8 +448,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
console
.
info
(
'
case create createVideoEncoderByName success
'
);
videoEncodeProcessor
=
processor
;
toCreateStream
();
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
flush
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
flush
'
,
done
);},
done
);
}
else
{
console
.
info
(
'
case create createVideoEncoderByName fail
'
);
expect
().
assertFail
();
...
...
@@ -473,8 +483,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
console
.
info
(
'
case create createVideoEncoderByName success
'
);
videoEncodeProcessor
=
processor
;
toCreateStream
();
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
flush
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
flush
'
,
done
);},
done
);
}
else
{
console
.
info
(
'
case create createVideoEncoderByName fail
'
);
expect
().
assertFail
();
...
...
@@ -516,8 +528,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
frameCountOut
=
0
;
outputQueue
=
[];
isStreamRunning
=
false
;
toSetStreamParam
(
mediaDescription2
.
width
,
mediaDescription2
.
height
,
mediaDescription2
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription2
,
decPath2
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription2
.
width
,
mediaDescription2
.
height
,
mediaDescription2
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription2
,
decPath2
,
function
(){
eventEmitter
.
emit
(
'
stop
'
,
done
);},
done
);
})
})
media
.
createVideoEncoderByName
(
name
,
(
err
,
processor
)
=>
{
...
...
@@ -526,8 +540,10 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
console
.
info
(
'
case create createVideoEncoderByName success
'
);
videoEncodeProcessor
=
processor
;
toCreateStream
();
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
reset_for_callback_01_0600
'
,
done
);},
done
);
toSetStreamParam
(
mediaDescription
.
width
,
mediaDescription
.
height
,
mediaDescription
.
frame_rate
,
frameTotal
);
eventEmitter
.
emit
(
'
configure
'
,
mediaDescription
,
decPath
,
function
(){
eventEmitter
.
emit
(
'
reset_for_callback_01_0600
'
,
done
);},
done
);
}
else
{
console
.
info
(
'
case create createVideoEncoderByName fail
'
);
expect
().
assertFail
();
...
...
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js
浏览文件 @
b9f292d2
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js
浏览文件 @
b9f292d2
...
...
@@ -44,14 +44,13 @@ describe('videoEncoderReliability', function () {
const
RESET
=
10
;
const
RELEASE
=
11
;
const
HOLDON
=
12
;
const
WAITFORALLOUTS
=
13
;
const
CONFIGURE_ERROR
=
14
;
const
PREPARE_ERROR
=
15
;
const
START_ERROR
=
16
;
const
FLUSH_ERROR
=
17
;
const
STOP_ERROR
=
18
;
const
RELEASE_ERROR
=
19
;
const
JUDGE_EOS
=
20
;
const
CONFIGURE_ERROR
=
13
;
const
PREPARE_ERROR
=
14
;
const
START_ERROR
=
15
;
const
FLUSH_ERROR
=
16
;
const
STOP_ERROR
=
17
;
const
RELEASE_ERROR
=
18
;
const
JUDGE_EOS
=
19
;
const
WAITTIME
=
3000
;
let
width
=
720
;
let
height
=
480
;
...
...
@@ -188,10 +187,6 @@ describe('videoEncoderReliability', function () {
case
START
:
mySteps
.
shift
();
console
.
info
(
`case to start`
);
if
(
sawOutputEOS
)
{
resetParam
();
workdoneAtEOS
=
true
;
}
await
toStart
();
nextStep
(
mySteps
,
done
);
break
;
...
...
@@ -199,11 +194,6 @@ describe('videoEncoderReliability', function () {
mySteps
.
shift
();
console
.
info
(
`case to flush`
);
await
toFlush
();
if
(
flushAtEOS
)
{
mediaTest
.
closeStream
(
surfaceID
);
resetParam
();
workdoneAtEOS
=
true
;
}
nextStep
(
mySteps
,
done
);
break
;
case
STOP
:
...
...
@@ -233,10 +223,6 @@ describe('videoEncoderReliability', function () {
nextStep
(
mySteps
,
done
);
},
WAITTIME
);
break
;
case
WAITFORALLOUTS
:
mySteps
.
shift
();
console
.
info
(
`case wait for all outputs`
);
break
;
case
CONFIGURE_ERROR
:
mySteps
.
shift
();
console
.
info
(
`case to configure 2`
);
...
...
@@ -646,8 +632,8 @@ describe('videoEncoderReliability', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_API_PREPARE_PROMISE_0600
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
prepare_0600.txt
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
STARTSTREAM
,
START
,
STOP
,
PREPARE_ERROR
,
STOPSTREAM
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
STARTSTREAM
,
START
,
STOP
,
PREPARE_ERROR
,
STOPSTREAM
,
END
);
createVideoEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -720,8 +706,7 @@ describe('videoEncoderReliability', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_API_START_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
start_0300.txt
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
STARTSTREAM
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
STARTSTREAM
,
START
,
STOPSTREAM
,
END
);
createVideoEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -766,8 +751,7 @@ describe('videoEncoderReliability', function () {
it
(
'
SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_API_START_PROMISE_0600
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
start_0600.txt
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
STARTSTREAM
,
START
,
STOP
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
START
,
END
);
createVideoEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -870,8 +854,7 @@ describe('videoEncoderReliability', function () {
it
(
'
SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_API_FLUSH_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0500.txt
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
STARTSTREAM
,
START
,
FLUSH
,
FLUSH
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
END
);
createVideoEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -1302,9 +1285,8 @@ describe('videoEncoderReliability', function () {
it
(
'
SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_API_EOS_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
eos_0200.txt
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
START
,
STARTSTREAM
,
HOLDON
,
JUDGE_EOS
,
FLUSH
,
STARTSTREAM
,
WAITFORALLOUTS
);
JUDGE_EOS
,
FLUSH
,
STARTSTREAM
,
STOPSTREAM
,
END
);
frameTotal
=
2
;
flushAtEOS
=
true
;
createVideoEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -1335,7 +1317,7 @@ describe('videoEncoderReliability', function () {
it
(
'
SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_API_EOS_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
eos_0400.txt
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
GETSURFACE
,
SETSTREAMPARAM
,
PREPARE
,
START
,
STARTSTREAM
,
HOLDON
,
JUDGE_EOS
,
STOPSTREAM
,
STOP
,
START
,
SETSTREAMPARAM
,
STARTSTREAM
,
WAITFORALLOUTS
);
JUDGE_EOS
,
STOPSTREAM
,
STOP
,
START
,
END
);
frameTotal
=
2
;
createVideoEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -1418,7 +1400,8 @@ describe('videoEncoderReliability', function () {
videoEncodeProcessor
=
null
;
done
();
})
/* *
/* *
* @tc.number : SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_API_CREATE-RELEASE_PROMISE_0100
* @tc.name : 001. create -> release for 50 times
* @tc.desc : Reliability Test
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录