Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
b74987b5
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看板
未验证
提交
b74987b5
编写于
8月 04, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 04, 2022
浏览文件
操作
浏览文件
下载
差异文件
!4770 修改编解码用例匹配codec状态机修改
Merge pull request !4770 from ling990/ling990
上级
e2bbb397
06f52d87
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
287 addition
and
173 deletion
+287
-173
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
+27
-8
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
+28
-9
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
.../main/js/test/AudioDecoderReliabilityCallbackTest.test.js
+19
-10
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
+19
-10
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
+26
-7
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
+27
-10
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
.../main/js/test/AudioEncoderReliabilityCallbackTest.test.js
+8
-3
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
+21
-16
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/List.test.js
...ia_js_standard/videoDecoder/src/main/js/test/List.test.js
+0
-2
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js
...der/src/main/js/test/VideoDecoderReliCallbackTest.test.js
+7
-3
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js
...oder/src/main/js/test/VideoDecoderReliPromiseTest.test.js
+100
-93
multimedia/media/media_js_standard/videoEncoder/Test.json
multimedia/media/media_js_standard/videoEncoder/Test.json
+0
-2
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderHardwareFuncPromiseTest.test.js
.../main/js/test/VideoEncoderHardwareFuncPromiseTest.test.js
+5
-0
未找到文件。
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
浏览文件 @
b74987b5
...
...
@@ -139,6 +139,7 @@ describe('AudioDecoderFuncCallback', function () {
let
outputCnt
=
0
;
let
inputCnt
=
0
;
let
frameThreshold
=
10
;
let
lockFlag
=
false
;
beforeAll
(
async
function
()
{
console
.
info
(
'
beforeAll case 1
'
);
...
...
@@ -254,6 +255,7 @@ describe('AudioDecoderFuncCallback', function () {
ES_LENGTH
=
1500
;
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -288,6 +290,7 @@ describe('AudioDecoderFuncCallback', function () {
outputQueue
=
[];
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
}
async
function
getFdRead
(
readPath
,
done
)
{
...
...
@@ -345,6 +348,7 @@ describe('AudioDecoderFuncCallback', function () {
}
async
function
flushWork
(
done
)
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
await
getFdRead
(
readpath
,
done
);
...
...
@@ -353,6 +357,11 @@ describe('AudioDecoderFuncCallback', function () {
console
.
info
(
"
case flush at inputeos success
"
);
resetParam
();
workdoneAtEOS
=
true
;
lockFlag
=
false
;
audioDecodeProcessor
.
start
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case start after flush success
"
);
});
})
}
...
...
@@ -403,10 +412,12 @@ describe('AudioDecoderFuncCallback', function () {
}
timestamp
+=
ES
[
frameCnt
]
/
samplerate
;
frameCnt
+=
1
;
audioDecodeProcessor
.
pushInputData
(
inputobject
,
()
=>
{
console
.
info
(
'
queueInput success
'
);
inputCnt
+=
1
;
})
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
pushInputData
(
inputobject
,
()
=>
{
console
.
info
(
'
queueInput success
'
);
inputCnt
+=
1
;
})
}
}
}
...
...
@@ -431,9 +442,11 @@ describe('AudioDecoderFuncCallback', function () {
else
{
console
.
info
(
"
write to file success
"
);
}
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
,
()
=>
{
console
.
info
(
'
release output success
'
);
})
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
,
()
=>
{
console
.
info
(
'
release output success
'
);
})
}
}
}
...
...
@@ -677,12 +690,18 @@ describe('AudioDecoderFuncCallback', function () {
})
});
eventEmitter
.
on
(
'
flush
'
,
()
=>
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioDecodeProcessor
.
flush
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case flush after 2s success`
);
})
lockFlag
=
false
;
audioDecodeProcessor
.
start
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case start after flush success`
);
});
});
});
media
.
createAudioDecoderByMime
(
'
audio/mp4a-latm
'
,
(
err
,
processor
)
=>
{
expect
(
err
).
assertUndefined
();
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
浏览文件 @
b74987b5
...
...
@@ -138,6 +138,7 @@ describe('AudioDecoderFuncPromise', function () {
let
outputCnt
=
0
;
let
inputCnt
=
0
;
let
frameThreshold
=
10
;
let
lockFlag
=
false
;
beforeAll
(
async
function
()
{
...
...
@@ -254,6 +255,7 @@ describe('AudioDecoderFuncPromise', function () {
ES_LENGTH
=
1500
;
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -298,6 +300,7 @@ describe('AudioDecoderFuncPromise', function () {
outputQueue
=
[];
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
}
async
function
getFdRead
(
readPath
,
done
)
{
...
...
@@ -349,6 +352,7 @@ describe('AudioDecoderFuncPromise', function () {
}
async
function
flushWork
(
done
)
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
await
getFdRead
(
readpath
,
done
);
...
...
@@ -357,6 +361,12 @@ describe('AudioDecoderFuncPromise', function () {
resetParam
();
workdoneAtEOS
=
true
;
},
failCallback
).
catch
(
failCatch
);
lockFlag
=
false
;
await
audioDecodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case start after flush success
"
);
resetParam
();
workdoneAtEOS
=
true
;
},
failCallback
).
catch
(
failCatch
);
}
async
function
doneWork
()
{
...
...
@@ -399,10 +409,12 @@ describe('AudioDecoderFuncPromise', function () {
}
timestamp
+=
ES
[
frameCnt
]
/
samplerate
;
frameCnt
+=
1
;
audioDecodeProcessor
.
pushInputData
(
inputobject
).
then
(()
=>
{
console
.
info
(
'
case queueInput success
'
);
inputCnt
+=
1
;
});
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
pushInputData
(
inputobject
).
then
(()
=>
{
console
.
info
(
'
case queueInput success
'
);
inputCnt
+=
1
;
});
}
}
}
...
...
@@ -430,9 +442,11 @@ describe('AudioDecoderFuncPromise', function () {
else
{
console
.
info
(
"
write to file success
"
);
}
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
).
then
(()
=>
{
console
.
info
(
'
release output success
'
);
});
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
).
then
(()
=>
{
console
.
info
(
'
release output success
'
);
});
}
}
}
...
...
@@ -605,12 +619,17 @@ describe('AudioDecoderFuncPromise', function () {
await
audioDecodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case start success
"
);
},
failCallback
).
catch
(
failCatch
);
await
sleep
(
500
).
then
(()
=>
{
await
sleep
(
500
).
then
(
async
()
=>
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioDecodeProcessor
.
flush
().
then
(()
=>
{
a
wait
a
udioDecodeProcessor
.
flush
().
then
(()
=>
{
console
.
info
(
"
case flush after 5s
"
);
},
failCallback
).
catch
(
failCatch
);
lockFlag
=
false
;
await
audioDecodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case start after flush success
"
);
},
failCallback
).
catch
(
failCatch
);
})
})
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
浏览文件 @
b74987b5
...
...
@@ -147,6 +147,7 @@ describe('AudioDecoderReliabilityCallback', function () {
"
audio_sample_format
"
:
1
,
};
let
fdRead
;
let
lockFlag
=
false
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -257,6 +258,7 @@ describe('AudioDecoderReliabilityCallback', function () {
381
,
410
,
394
,
386
,
345
,
345
,
354
,
397
,
386
,
375
,
390
,
347
,
411
,
381
,
383
,
374
,
379
,
380
,
378
,
391
,
380
,
339
,
390
,
383
,
375
];
ES_LENGTH
=
500
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -287,6 +289,7 @@ describe('AudioDecoderReliabilityCallback', function () {
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
lockFlag
=
false
;
}
async
function
createAudioDecoder
(
savepath
,
mySteps
,
done
)
{
...
...
@@ -399,6 +402,7 @@ describe('AudioDecoderReliabilityCallback', function () {
case
FLUSH
:
mySteps
.
shift
();
console
.
info
(
`case to flush`
);
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioDecodeProcessor
.
flush
(
async
(
err
)
=>
{
...
...
@@ -410,6 +414,7 @@ describe('AudioDecoderReliabilityCallback', function () {
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
lockFlag
=
false
;
nextStep
(
mySteps
,
mediaDescription
,
done
);
});
break
;
...
...
@@ -518,9 +523,11 @@ describe('AudioDecoderReliabilityCallback', function () {
}
timestamp
+=
ES
[
frameCnt
]
/
samplerate
;
frameCnt
+=
1
;
audioDecodeProcessor
.
pushInputData
(
inputobject
,
()
=>
{
console
.
info
(
'
queueInput success
'
);
})
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
pushInputData
(
inputobject
,
()
=>
{
console
.
info
(
'
queueInput success
'
);
})
}
}
}
...
...
@@ -538,9 +545,11 @@ describe('AudioDecoderReliabilityCallback', function () {
else
{
console
.
info
(
"
not last frame, continue
"
);
}
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
,
()
=>
{
console
.
info
(
'
release output success
'
);
})
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
,
()
=>
{
console
.
info
(
'
release output success
'
);
})
}
}
}
...
...
@@ -879,7 +888,7 @@ describe('AudioDecoderReliabilityCallback', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
start_0500.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
_ERROR
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
END
);
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -979,7 +988,7 @@ describe('AudioDecoderReliabilityCallback', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0400
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0400.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -994,7 +1003,7 @@ describe('AudioDecoderReliabilityCallback', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0500.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -1023,7 +1032,7 @@ describe('AudioDecoderReliabilityCallback', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0700
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0700.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
HOLDON
,
FLUSH
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
HOLDON
,
FLUSH
,
START
,
END
);
EOSFrameNum
=
2
;
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
浏览文件 @
b74987b5
...
...
@@ -149,6 +149,7 @@ describe('AudioDecoderReliabilityPromise', function () {
};
let
expectError
=
false
;
let
fdRead
;
let
lockFlag
=
false
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -261,6 +262,7 @@ describe('AudioDecoderReliabilityPromise', function () {
380
,
378
,
391
,
380
,
339
,
390
,
383
,
375
];
ES_LENGTH
=
500
;
expectError
=
false
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -308,6 +310,7 @@ describe('AudioDecoderReliabilityPromise', function () {
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
lockFlag
=
false
;
}
async
function
createAudioDecoder
(
savepath
,
mySteps
,
done
)
{
...
...
@@ -416,6 +419,7 @@ describe('AudioDecoderReliabilityPromise', function () {
case
FLUSH
:
mySteps
.
shift
();
console
.
info
(
`case to flush`
);
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioDecodeProcessor
.
flush
().
then
(
async
()
=>
{
...
...
@@ -426,6 +430,7 @@ describe('AudioDecoderReliabilityPromise', function () {
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
lockFlag
=
false
;
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
break
;
...
...
@@ -525,9 +530,11 @@ describe('AudioDecoderReliabilityPromise', function () {
}
timestamp
+=
ES
[
frameCnt
]
/
samplerate
;
frameCnt
+=
1
;
audioDecodeProcessor
.
pushInputData
(
inputobject
).
then
(()
=>
{
console
.
info
(
'
case queueInput success
'
);
});
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
pushInputData
(
inputobject
).
then
(()
=>
{
console
.
info
(
'
case queueInput success
'
);
});
}
}
}
...
...
@@ -546,9 +553,11 @@ describe('AudioDecoderReliabilityPromise', function () {
else
{
console
.
info
(
"
not last frame, continue
"
);
}
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
).
then
(()
=>
{
console
.
info
(
'
release output success
'
);
});
if
(
!
lockFlag
)
{
audioDecodeProcessor
.
freeOutputBuffer
(
outputobject
).
then
(()
=>
{
console
.
info
(
'
release output success
'
);
});
}
}
}
...
...
@@ -885,7 +894,7 @@ describe('AudioDecoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
start_0500.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
_ERROR
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
END
);
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -985,7 +994,7 @@ describe('AudioDecoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0400.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -1000,7 +1009,7 @@ describe('AudioDecoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0500.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -1029,7 +1038,7 @@ describe('AudioDecoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0700
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0700.pcm
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
HOLDON
,
FLUSH
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
HOLDON
,
FLUSH
,
START
,
END
);
EOSFrameNum
=
2
;
createAudioDecoder
(
savepath
,
mySteps
,
done
);
})
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
浏览文件 @
b74987b5
...
...
@@ -47,6 +47,7 @@ describe('AudioEncoderFuncCallback', function () {
let
outputCnt
=
0
;
let
inputCnt
=
0
;
let
frameThreshold
=
10
;
let
lockFlag
=
false
;
beforeAll
(
async
function
()
{
console
.
info
(
'
beforeAll case 1
'
);
...
...
@@ -72,6 +73,7 @@ describe('AudioEncoderFuncCallback', function () {
ES_LENGTH
=
1500
;
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -105,6 +107,7 @@ describe('AudioEncoderFuncCallback', function () {
outputQueue
=
[];
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
}
async
function
getFdRead
(
readPath
,
done
)
{
...
...
@@ -162,6 +165,7 @@ describe('AudioEncoderFuncCallback', function () {
}
async
function
flushWork
(
done
)
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
await
getFdRead
(
readpath
,
done
);
...
...
@@ -170,6 +174,11 @@ describe('AudioEncoderFuncCallback', function () {
console
.
info
(
"
case flush at inputeos success
"
);
resetParam
();
workdoneAtEOS
=
true
;
lockFlag
=
false
;
audioEncodeProcessor
.
start
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case start after flush success
"
);
})
})
}
...
...
@@ -218,10 +227,12 @@ describe('AudioEncoderFuncCallback', function () {
}
timestamp
+=
23
;
frameCnt
+=
1
;
audioEncodeProcessor
.
pushInputData
(
inputobject
,
()
=>
{
console
.
info
(
'
queueInput success
'
);
inputCnt
+=
1
;
})
if
(
!
lockFlag
)
{
audioEncodeProcessor
.
pushInputData
(
inputobject
,
()
=>
{
console
.
info
(
'
queueInput success
'
);
inputCnt
+=
1
;
})
}
}
}
...
...
@@ -246,9 +257,11 @@ describe('AudioEncoderFuncCallback', function () {
else
{
console
.
info
(
"
write to file success
"
);
}
audioEncodeProcessor
.
freeOutputBuffer
(
outputobject
,
()
=>
{
console
.
info
(
'
release output success
'
);
})
if
(
!
lockFlag
)
{
audioEncodeProcessor
.
freeOutputBuffer
(
outputobject
,
()
=>
{
console
.
info
(
'
release output success
'
);
})
}
}
}
...
...
@@ -481,11 +494,17 @@ describe('AudioEncoderFuncCallback', function () {
})
});
eventEmitter
.
on
(
'
flush
'
,
()
=>
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioEncodeProcessor
.
flush
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case flush after 2s success`
);
lockFlag
=
false
;
audioEncodeProcessor
.
start
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case start after flush success`
);
})
})
});
media
.
createAudioEncoderByMime
(
'
audio/mp4a-latm
'
,
(
err
,
processor
)
=>
{
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
浏览文件 @
b74987b5
...
...
@@ -47,6 +47,7 @@ describe('AudioEncoderFuncPromise', function () {
let
outputCnt
=
0
;
let
inputCnt
=
0
;
let
frameThreshold
=
10
;
let
lockFlag
=
false
;
beforeAll
(
async
function
()
{
...
...
@@ -73,6 +74,7 @@ describe('AudioEncoderFuncPromise', function () {
ES_LENGTH
=
1500
;
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -116,6 +118,7 @@ describe('AudioEncoderFuncPromise', function () {
outputQueue
=
[];
outputCnt
=
0
;
inputCnt
=
0
;
lockFlag
=
false
;
}
async
function
getFdRead
(
readPath
,
done
)
{
...
...
@@ -160,6 +163,7 @@ describe('AudioEncoderFuncPromise', function () {
}
async
function
flushWork
(
done
)
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
await
getFdRead
(
readpath
,
done
);
...
...
@@ -167,6 +171,10 @@ describe('AudioEncoderFuncPromise', function () {
console
.
info
(
"
case flush at inputeos success
"
);
resetParam
();
workdoneAtEOS
=
true
;
lockFlag
=
false
;
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case start after flush success
"
);
},
failCallback
).
catch
(
failCatch
);
}
...
...
@@ -212,10 +220,12 @@ describe('AudioEncoderFuncPromise', function () {
}
timestamp
+=
23
;
frameCnt
+=
1
;
audioEncodeProcessor
.
pushInputData
(
inputobject
).
then
(()
=>
{
console
.
info
(
'
case queueInput success
'
);
inputCnt
+=
1
;
});
if
(
!
lockFlag
)
{
await
audioEncodeProcessor
.
pushInputData
(
inputobject
).
then
(()
=>
{
console
.
info
(
'
case queueInput success
'
);
inputCnt
+=
1
;
});
}
}
}
...
...
@@ -242,9 +252,11 @@ describe('AudioEncoderFuncPromise', function () {
else
{
console
.
info
(
"
write to file success
"
);
}
audioEncodeProcessor
.
freeOutputBuffer
(
outputobject
).
then
(()
=>
{
console
.
info
(
'
release output success
'
);
});
if
(
!
lockFlag
)
{
await
audioEncodeProcessor
.
freeOutputBuffer
(
outputobject
).
then
(()
=>
{
console
.
info
(
'
release output success
'
);
});
}
}
}
...
...
@@ -423,11 +435,16 @@ describe('AudioEncoderFuncPromise', function () {
await
audioEncodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case start success
"
)
},
failCallback
).
catch
(
failCatch
);
await
sleep
(
500
).
then
(()
=>
{
await
sleep
(
500
).
then
(
async
()
=>
{
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioEncodeProcessor
.
flush
().
then
(()
=>
{
console
.
info
(
"
case flush after 5s
"
)
await
audioEncodeProcessor
.
flush
().
then
(()
=>
{
console
.
info
(
"
case flush after 5s
"
);
lockFlag
=
false
;
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case start after flush success
"
);
},
failCallback
).
catch
(
failCatch
);
});
})
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
浏览文件 @
b74987b5
...
...
@@ -59,6 +59,7 @@ describe('AudioEncoderReliabilityCallback', function () {
"
audio_sample_format
"
:
1
,
};
let
fdRead
;
let
lockFlag
=
false
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -80,6 +81,7 @@ describe('AudioEncoderReliabilityCallback', function () {
inputQueue
=
[];
outputQueue
=
[];
ES_LENGTH
=
200
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -110,6 +112,7 @@ describe('AudioEncoderReliabilityCallback', function () {
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
lockFlag
=
false
;
}
async
function
createAudioEncoder
(
savepath
,
mySteps
,
done
)
{
...
...
@@ -220,6 +223,7 @@ describe('AudioEncoderReliabilityCallback', function () {
case
FLUSH
:
mySteps
.
shift
();
console
.
info
(
`case to flush`
);
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioEncodeProcessor
.
flush
(
async
(
err
)
=>
{
...
...
@@ -231,6 +235,7 @@ describe('AudioEncoderReliabilityCallback', function () {
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
lockFlag
=
false
;
nextStep
(
mySteps
,
mediaDescription
,
done
);
});
break
;
...
...
@@ -699,7 +704,7 @@ describe('AudioEncoderReliabilityCallback', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
start_0500.es
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
_ERROR
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
END
);
createAudioEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -799,7 +804,7 @@ describe('AudioEncoderReliabilityCallback', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0400
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0400.es
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -814,7 +819,7 @@ describe('AudioEncoderReliabilityCallback', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0500.es
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
浏览文件 @
b74987b5
...
...
@@ -60,6 +60,7 @@ describe('AudioEncoderReliabilityPromise', function () {
};
let
expectError
=
false
;
let
fdRead
;
let
lockFlag
=
false
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -82,6 +83,7 @@ describe('AudioEncoderReliabilityPromise', function () {
outputQueue
=
[];
ES_LENGTH
=
200
;
expectError
=
false
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -128,6 +130,7 @@ describe('AudioEncoderReliabilityPromise', function () {
sawOutputEOS
=
false
;
inputQueue
=
[];
outputQueue
=
[];
lockFlag
=
false
;
}
async
function
createAudioEncoder
(
savepath
,
mySteps
,
done
)
{
...
...
@@ -189,7 +192,7 @@ describe('AudioEncoderReliabilityPromise', function () {
async
function
nextStep
(
mySteps
,
done
)
{
console
.
info
(
"
case myStep[0]:
"
+
mySteps
[
0
]);
if
(
mySteps
[
0
]
==
END
)
{
audioEncodeProcessor
.
release
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
release
().
then
(()
=>
{
console
.
info
(
"
case release success
"
);
audioEncodeProcessor
=
null
;
done
();
...
...
@@ -199,7 +202,7 @@ describe('AudioEncoderReliabilityPromise', function () {
case
CONFIGURE
:
mySteps
.
shift
();
console
.
info
(
`case to configure`
);
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
`case configure 1`
);
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
...
...
@@ -207,7 +210,7 @@ describe('AudioEncoderReliabilityPromise', function () {
case
PREPARE
:
mySteps
.
shift
();
console
.
info
(
`case to prepare`
);
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
prepare
().
then
(()
=>
{
console
.
info
(
`case prepare 1`
);
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
...
...
@@ -221,7 +224,7 @@ describe('AudioEncoderReliabilityPromise', function () {
workdoneAtEOS
=
true
;
enqueueInputs
(
inputQueue
);
}
audioEncodeProcessor
.
start
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
`case start 1`
);
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
...
...
@@ -229,9 +232,10 @@ describe('AudioEncoderReliabilityPromise', function () {
case
FLUSH
:
mySteps
.
shift
();
console
.
info
(
`case to flush`
);
lockFlag
=
true
;
inputQueue
=
[];
outputQueue
=
[];
audioEncodeProcessor
.
flush
().
then
(
async
()
=>
{
a
wait
a
udioEncodeProcessor
.
flush
().
then
(
async
()
=>
{
console
.
info
(
`case flush 1`
);
if
(
flushAtEOS
)
{
await
getFdRead
(
AUDIOPATH
,
done
);
...
...
@@ -239,13 +243,14 @@ describe('AudioEncoderReliabilityPromise', function () {
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
lockFlag
=
false
;
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
break
;
case
STOP
:
mySteps
.
shift
();
console
.
info
(
`case to stop`
);
audioEncodeProcessor
.
stop
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
`case stop 1`
);
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
...
...
@@ -254,7 +259,7 @@ describe('AudioEncoderReliabilityPromise', function () {
mySteps
.
shift
();
console
.
info
(
`case to reset`
);
resetParam
();
audioEncodeProcessor
.
reset
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
`case reset 1`
);
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
...
...
@@ -272,7 +277,7 @@ describe('AudioEncoderReliabilityPromise', function () {
case
CONFIGURE_ERROR
:
mySteps
.
shift
();
console
.
info
(
`case to configure 2`
);
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
`case configure error 1`
);
expect
(
expectError
).
assertTrue
();
},
(
err
)
=>
{
failCallbackTrue
(
err
,
mySteps
,
done
)}).
catch
(
failCatch
);
...
...
@@ -280,7 +285,7 @@ describe('AudioEncoderReliabilityPromise', function () {
case
PREPARE_ERROR
:
mySteps
.
shift
();
console
.
info
(
`case to prepare 2`
);
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
prepare
().
then
(()
=>
{
console
.
info
(
`case prepare error 1`
);
expect
(
expectError
).
assertTrue
();
},
(
err
)
=>
{
failCallbackTrue
(
err
,
mySteps
,
done
)}).
catch
(
failCatch
);
...
...
@@ -288,7 +293,7 @@ describe('AudioEncoderReliabilityPromise', function () {
case
START_ERROR
:
mySteps
.
shift
();
console
.
info
(
`case to start 2`
);
audioEncodeProcessor
.
start
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
`case start error 1`
);
expect
(
expectError
).
assertTrue
();
},
(
err
)
=>
{
failCallbackTrue
(
err
,
mySteps
,
done
)}).
catch
(
failCatch
);
...
...
@@ -296,7 +301,7 @@ describe('AudioEncoderReliabilityPromise', function () {
case
FLUSH_ERROR
:
mySteps
.
shift
();
console
.
info
(
`case to flush 2`
);
audioEncodeProcessor
.
flush
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
flush
().
then
(()
=>
{
console
.
info
(
`case flush error 1`
);
expect
(
expectError
).
assertTrue
();
},
(
err
)
=>
{
failCallbackTrue
(
err
,
mySteps
,
done
)}).
catch
(
failCatch
);
...
...
@@ -304,7 +309,7 @@ describe('AudioEncoderReliabilityPromise', function () {
case
STOP_ERROR
:
mySteps
.
shift
();
console
.
info
(
`case to stop 2`
);
audioEncodeProcessor
.
stop
().
then
(()
=>
{
a
wait
a
udioEncodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
`case stop error 1`
);
expect
(
expectError
).
assertTrue
();
},
(
err
)
=>
{
failCallbackTrue
(
err
,
mySteps
,
done
)}).
catch
(
failCatch
);
...
...
@@ -701,7 +706,7 @@ describe('AudioEncoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
start_0500.es
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
_ERROR
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
END
);
createAudioEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -801,7 +806,7 @@ describe('AudioEncoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0400.es
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -816,7 +821,7 @@ describe('AudioEncoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0500.es
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
FLUSH
,
WAITFORALLOUTS
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
FLUSH
,
START
,
FLUSH
,
START
,
WAITFORALLOUTS
);
workdoneAtEOS
=
true
;
createAudioEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
@@ -845,7 +850,7 @@ describe('AudioEncoderReliabilityPromise', function () {
*/
it
(
'
SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0700
'
,
0
,
async
function
(
done
)
{
let
savepath
=
BASIC_PATH
+
'
flush_0700.es
'
;
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
HOLDON
,
FLUSH
,
END
);
let
mySteps
=
new
Array
(
CONFIGURE
,
PREPARE
,
START
,
HOLDON
,
FLUSH
,
START
,
END
);
EOSFrameNum
=
2
;
createAudioEncoder
(
savepath
,
mySteps
,
done
);
})
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/List.test.js
浏览文件 @
b74987b5
...
...
@@ -19,6 +19,4 @@ require('./VideoDecoderReliCallbackTest.test.js')
require
(
'
./VideoDecoderReliPromiseTest.test.js
'
)
require
(
'
./VideoDecoderSoftwareFuncCallbackTest.test.js
'
)
require
(
'
./VideoDecoderSoftwareFuncPromiseTest.test.js
'
)
require
(
'
./VideoDecoderSoftwareReliCallbackTest.test.js
'
)
require
(
'
./VideoDecoderSoftwareReliPromiseTest.test.js
'
)
require
(
'
./VideoDecoderEnumTest.test.js
'
)
\ No newline at end of file
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js
浏览文件 @
b74987b5
...
...
@@ -75,6 +75,7 @@ describe('VideoDecoderReliCallbackTest', function () {
1798
,
170
,
124
,
121
,
1666
,
157
,
128
,
130
,
1678
,
135
,
118
,
1804
,
169
,
135
,
125
,
1837
,
168
,
124
,
124
];
let
ES_FRAME_SIZE
=
H264_FRAME_SIZE_60FPS_320
;
let
fdRead
;
let
lockFlag
=
false
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -97,6 +98,7 @@ describe('VideoDecoderReliCallbackTest', function () {
inputEosFlag
=
false
;
position
=
0
;
surfaceID
=
globalThis
.
value
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -245,6 +247,7 @@ describe('VideoDecoderReliCallbackTest', function () {
});
}
function
toFlush
(
mySteps
,
done
,
expectFail
)
{
lockFlag
=
true
;
videoDecodeProcessor
.
flush
((
err
)
=>
{
console
.
info
(
`case flush callback`
);
printError
(
err
,
expectFail
);
...
...
@@ -255,6 +258,7 @@ describe('VideoDecoderReliCallbackTest', function () {
timestamp
=
0
;
frameCountIn
=
1
;
}
lockFlag
=
false
;
toNextStep
(
mySteps
,
done
);
});
}
...
...
@@ -474,7 +478,7 @@ describe('VideoDecoderReliCallbackTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_FUNCTION_CALLBACK_01_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
WAIT_FOR_ALL_OUTS
);
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_ALL_OUTS
);
workdoneAtEOS
=
true
;
toCreateVideoDecoderByMime
(
'
video/avc
'
,
mySteps
,
done
);
})
...
...
@@ -825,7 +829,7 @@ describe('VideoDecoderReliCallbackTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_CALLBACK_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderByMime
(
'
video/avc
'
,
mySteps
,
done
);
})
...
...
@@ -937,7 +941,7 @@ describe('VideoDecoderReliCallbackTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_CALLBACK_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RELEASE
);
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderByMime
(
'
video/avc
'
,
mySteps
,
done
);
})
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js
浏览文件 @
b74987b5
...
...
@@ -75,6 +75,7 @@ describe('VideoDecoderReliPromiseTest', function () {
1798
,
170
,
124
,
121
,
1666
,
157
,
128
,
130
,
1678
,
135
,
118
,
1804
,
169
,
135
,
125
,
1837
,
168
,
124
,
124
];
let
ES_FRAME_SIZE
=
H264_FRAME_SIZE_60FPS_320
;
let
fdRead
;
let
lockFlag
=
false
;
beforeAll
(
function
()
{
console
.
info
(
'
beforeAll case
'
);
...
...
@@ -97,6 +98,7 @@ describe('VideoDecoderReliPromiseTest', function () {
inputEosFlag
=
false
;
position
=
0
;
surfaceID
=
globalThis
.
value
;
lockFlag
=
false
;
})
afterEach
(
async
function
()
{
...
...
@@ -224,21 +226,21 @@ describe('VideoDecoderReliPromiseTest', function () {
},
caseCallback
).
catch
(
failCatch
);
}
function
toConfigure
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
videoDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
async
function
toConfigure
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
await
videoDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
`case configure success`
);
toNextStep
(
mySteps
,
done
);
},
(
err
)
=>
{
failureCallback
(
err
,
mySteps
,
done
)}).
catch
(
catchCallback
);
}
function
toPrepare
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
videoDecodeProcessor
.
prepare
().
then
(()
=>
{
async
function
toPrepare
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
await
videoDecodeProcessor
.
prepare
().
then
(()
=>
{
console
.
info
(
`case prepare success`
);
toNextStep
(
mySteps
,
done
);
},
(
err
)
=>
{
failureCallback
(
err
,
mySteps
,
done
)}).
catch
(
catchCallback
);
}
function
toStart
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
async
function
toStart
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
let
timeDelay
=
0
;
videoDecodeProcessor
.
start
().
then
(()
=>
{
await
videoDecodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
`case start success`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
FLUSH
)
{
timeDelay
=
50
;
...
...
@@ -248,40 +250,42 @@ describe('VideoDecoderReliPromiseTest', function () {
},
timeDelay
);
},
(
err
)
=>
{
failureCallback
(
err
,
mySteps
,
done
)}).
catch
(
catchCallback
);
}
function
toFlush
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
videoDecodeProcessor
.
flush
().
then
(()
=>
{
async
function
toFlush
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
lockFlag
=
true
;
await
videoDecodeProcessor
.
flush
().
then
(()
=>
{
console
.
info
(
`case flush success`
);
position
=
ES_FRAME_SIZE
[
0
];
inputQueue
=
[];
timestamp
=
0
;
inputEosFlag
=
false
;
frameCountIn
=
1
;
lockFlag
=
false
;
toNextStep
(
mySteps
,
done
);
},
(
err
)
=>
{
failureCallback
(
err
,
mySteps
,
done
)}).
catch
(
catchCallback
);
}
function
toStop
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
videoDecodeProcessor
.
stop
().
then
(()
=>
{
async
function
toStop
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
await
videoDecodeProcessor
.
stop
().
then
(()
=>
{
console
.
info
(
`case stop success`
);
toNextStep
(
mySteps
,
done
);
},
(
err
)
=>
{
failureCallback
(
err
,
mySteps
,
done
)}).
catch
(
catchCallback
);
}
function
toReset
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
videoDecodeProcessor
.
reset
().
then
(()
=>
{
async
function
toReset
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
await
videoDecodeProcessor
.
reset
().
then
(()
=>
{
console
.
info
(
`case reset success`
);
toNextStep
(
mySteps
,
done
);
},
(
err
)
=>
{
failureCallback
(
err
,
mySteps
,
done
)}).
catch
(
catchCallback
);
}
function
toSetOutputSurface
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
videoDecodeProcessor
.
setOutputSurface
(
surfaceID
,
true
).
then
(()
=>
{
async
function
toSetOutputSurface
(
mySteps
,
done
,
failureCallback
,
catchCallback
)
{
await
videoDecodeProcessor
.
setOutputSurface
(
surfaceID
,
true
).
then
(()
=>
{
console
.
info
(
'
in case : setOutputSurface success, surfaceID
'
+
surfaceID
);
toNextStep
(
mySteps
,
done
);
},
(
err
)
=>
{
failureCallback
(
err
,
mySteps
,
done
)}).
catch
(
catchCallback
);
}
function
toNextStep
(
mySteps
,
done
)
{
async
function
toNextStep
(
mySteps
,
done
)
{
console
.
info
(
'
case myStep[0]:
'
+
mySteps
[
0
]);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
RELEASE
)
{
if
(
videoDecodeProcessor
!=
null
)
{
videoDecodeProcessor
.
release
().
then
(
async
()
=>
{
await
videoDecodeProcessor
.
release
().
then
(
async
()
=>
{
console
.
info
(
'
in case : videoDecodeProcessor release success
'
);
videoDecodeProcessor
=
null
;
console
.
info
(
'
case to done
'
);
...
...
@@ -296,9 +300,9 @@ describe('VideoDecoderReliPromiseTest', function () {
console
.
info
(
`case to configure`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
ERROR
)
{
mySteps
.
shift
();
toConfigure
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
await
toConfigure
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
toConfigure
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
await
toConfigure
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
}
break
;
case
DECODE_STEP
.
SETSURFACE
:
...
...
@@ -306,9 +310,9 @@ describe('VideoDecoderReliPromiseTest', function () {
console
.
info
(
`case to setOutputSurface`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
ERROR
)
{
mySteps
.
shift
();
toSetOutputSurface
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
await
toSetOutputSurface
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
toSetOutputSurface
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
await
toSetOutputSurface
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
}
break
;
case
DECODE_STEP
.
PREPARE
:
...
...
@@ -316,9 +320,9 @@ describe('VideoDecoderReliPromiseTest', function () {
console
.
info
(
`case to prepare`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
ERROR
)
{
mySteps
.
shift
();
toPrepare
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
await
toPrepare
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
toPrepare
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
await
toPrepare
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
}
break
;
case
DECODE_STEP
.
START
:
...
...
@@ -326,7 +330,7 @@ describe('VideoDecoderReliPromiseTest', function () {
console
.
info
(
`case to start`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
ERROR
)
{
mySteps
.
shift
();
toStart
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
await
toStart
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
readStreamSync
=
undefined
;
frameCountIn
=
0
;
...
...
@@ -336,7 +340,7 @@ describe('VideoDecoderReliPromiseTest', function () {
isCodecData
=
true
;
inputEosFlag
=
false
;
position
=
0
;
toStart
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
await
toStart
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
}
break
;
case
DECODE_STEP
.
FLUSH
:
...
...
@@ -344,9 +348,9 @@ describe('VideoDecoderReliPromiseTest', function () {
console
.
info
(
`case to flush`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
ERROR
)
{
mySteps
.
shift
();
toFlush
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
await
toFlush
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
toFlush
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
await
toFlush
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
}
break
;
case
DECODE_STEP
.
STOP
:
...
...
@@ -354,9 +358,9 @@ describe('VideoDecoderReliPromiseTest', function () {
console
.
info
(
`case to stop`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
ERROR
)
{
mySteps
.
shift
();
toStop
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
await
toStop
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
toStop
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
await
toStop
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
}
break
;
case
DECODE_STEP
.
RESET
:
...
...
@@ -364,9 +368,9 @@ describe('VideoDecoderReliPromiseTest', function () {
console
.
info
(
`case to reset`
);
if
(
mySteps
[
0
]
==
DECODE_STEP
.
ERROR
)
{
mySteps
.
shift
();
toReset
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
await
toReset
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
toReset
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
await
toReset
(
mySteps
,
done
,
callbackExpectOK
,
failCatch
);
}
break
;
case
DECODE_STEP
.
WAIT_FOR_EOS
:
...
...
@@ -422,7 +426,10 @@ describe('VideoDecoderReliPromiseTest', function () {
toNextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
}
function
toCreateVideoDecoderByName
(
name
,
mySteps
,
done
)
{
async
function
toCreateVideoDecoderByName
(
name
,
mySteps
,
done
)
{
await
mediaTestBase
.
getFdRead
(
SRCPATH
,
done
).
then
((
fdNumber
)
=>
{
fdRead
=
fdNumber
;
})
media
.
createVideoDecoderByName
(
name
).
then
((
processor
)
=>
{
console
.
info
(
`case createVideoDecoderByName success`
);
videoDecodeProcessor
=
processor
;
...
...
@@ -455,7 +462,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_ALL_OUTS
);
workdoneAtEOS
=
true
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -468,9 +475,9 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_FUNCTION_PROMISE_01_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
WAIT_FOR_ALL_OUTS
);
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_ALL_OUTS
);
workdoneAtEOS
=
true
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -486,7 +493,7 @@ describe('VideoDecoderReliPromiseTest', function () {
DECODE_STEP
.
WAIT_FOR_ALL_OUTS
);
eosFrameId
=
10
;
workdoneAtEOS
=
true
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -500,7 +507,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_FUNCTION_PROMISE_01_0400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -516,7 +523,7 @@ describe('VideoDecoderReliPromiseTest', function () {
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -529,7 +536,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -543,7 +550,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -557,7 +564,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -571,7 +578,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -585,7 +592,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -600,7 +607,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -613,7 +620,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0700
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
RESET
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -626,7 +633,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -639,7 +646,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_CONFIGURE_PROMISE_0900
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -652,7 +659,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_PREPARE_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -666,7 +673,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_PREPARE_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -680,7 +687,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_PREPARE_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -694,7 +701,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_PREPARE_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -708,7 +715,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_PREPARE_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -722,7 +729,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_PREPARE_PROMISE_0600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -738,7 +745,7 @@ describe('VideoDecoderReliPromiseTest', function () {
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -752,7 +759,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_PREPARE_PROMISE_0800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -765,7 +772,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
START
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -778,7 +785,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -792,7 +799,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -806,7 +813,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
START
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -819,8 +826,8 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -834,7 +841,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_PROMISE_0600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -850,7 +857,7 @@ describe('VideoDecoderReliPromiseTest', function () {
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
START
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -864,7 +871,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_START_PROMISE_0800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
START
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -877,7 +884,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -890,7 +897,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -904,7 +911,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -918,7 +925,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -931,8 +938,8 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -946,7 +953,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_PROMISE_0600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -961,7 +968,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -975,7 +982,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_FLUSH_PROMISE_0800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -988,7 +995,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_STOP_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
STOP
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1001,7 +1008,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_STOP_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1015,7 +1022,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_STOP_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1029,7 +1036,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_STOP_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1043,7 +1050,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_STOP_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1057,7 +1064,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_STOP_PROMISE_0600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1072,7 +1079,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1086,7 +1093,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_STOP_PROMISE_0800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
ERROR
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1099,7 +1106,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_RESET_PROMISE_0100
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1112,7 +1119,7 @@ describe('VideoDecoderReliPromiseTest', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_RESET_PROMISE_0200
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1126,7 +1133,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_RESET_PROMISE_0300
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1140,7 +1147,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_RESET_PROMISE_0400
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1154,7 +1161,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_RESET_PROMISE_0500
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1168,7 +1175,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_RESET_PROMISE_0600
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1183,7 +1190,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1197,7 +1204,7 @@ describe('VideoDecoderReliPromiseTest', function () {
it
(
'
SUB_MEDIA_VIDEO_DECODER_API_RESET_PROMISE_0800
'
,
0
,
async
function
(
done
)
{
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
RELEASE
);
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1212,7 +1219,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1227,7 +1234,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
FLUSH
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1242,7 +1249,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
RESET
,
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1257,7 +1264,7 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
START
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
/* *
...
...
@@ -1272,6 +1279,6 @@ describe('VideoDecoderReliPromiseTest', function () {
let
mySteps
=
new
Array
(
DECODE_STEP
.
CONFIGURE
,
DECODE_STEP
.
SETSURFACE
,
DECODE_STEP
.
PREPARE
,
DECODE_STEP
.
START
,
DECODE_STEP
.
WAIT_FOR_EOS
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
START
,
DECODE_STEP
.
STOP
,
DECODE_STEP
.
RELEASE
);
eosFrameId
=
10
;
toCreateVideoDecoderBy
Mime
(
'
video/avc
'
,
mySteps
,
done
);
toCreateVideoDecoderBy
Name
(
'
avdec_h264
'
,
mySteps
,
done
);
})
})
multimedia/media/media_js_standard/videoEncoder/Test.json
浏览文件 @
b74987b5
...
...
@@ -17,7 +17,6 @@
{
"type"
:
"ShellKit"
,
"run-command"
:
[
"setenforce 0"
,
"rm -rf /storage/media/100/local/files/*"
,
"mkdir -p /data/app/el2/100/base/ohos.acts.multimedia.video.videoencoder/haps/entry/files/"
,
"chmod 777 -R /data/app/el2/100/base/ohos.acts.multimedia.video.videoencoder/haps/entry/files/"
...
...
@@ -41,7 +40,6 @@
"chmod 777 /data/app/el2/100/base/ohos.acts.multimedia.video.videoencoder/haps/entry/files/*"
],
"teardown-command"
:[
"setenforce 1"
]
}
]
...
...
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderHardwareFuncPromiseTest.test.js
浏览文件 @
b74987b5
...
...
@@ -681,6 +681,7 @@ describe('videoHardwareEncoderFuncPromise', function () {
needRelease
=
true
;
await
toStartEnc
();
await
toFlushDec
();
await
toStartDec
();
});
})
...
...
@@ -705,10 +706,12 @@ describe('videoHardwareEncoderFuncPromise', function () {
await
sleep
(
5000
);
expect
(
outputEncEos
).
assertFalse
();
await
toFlushEnc
();
await
toStartEnc
();
resetReadParam
();
resetStateParam
();
needRelease
=
true
;
await
toFlushDec
();
await
toStartDec
();
})
/* *
...
...
@@ -731,10 +734,12 @@ describe('videoHardwareEncoderFuncPromise', function () {
await
startDecProcess
(
mime
,
srcPath
,
mediaDescription2
,
done
);
eventEmitter
.
on
(
'
flushAtEos
'
,
async
()
=>
{
await
toFlushEnc
();
await
toStartEnc
();
resetReadParam
();
resetStateParam
();
needRelease
=
true
;
await
toFlushDec
();
await
toStartDec
();
});
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录