Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
0b171bbe
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看板
提交
0b171bbe
编写于
5月 11, 2022
作者:
Z
zwx1081461
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Signed-off-by:zhengshijie<zhengshijie1@huawei.com>
Signed-off-by:
N
zwx1081461
<
zhengshijie@h-partners.com
>
上级
71a7e3e9
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
23 deletion
+23
-23
multimedia/media/media_js_standard/videoCodecFormat/src/main/js/test/VideoDecoderFormatPromiseTest.test.js
...at/src/main/js/test/VideoDecoderFormatPromiseTest.test.js
+8
-8
multimedia/media/media_js_standard/videoCodecFormat/src/main/js/test/VideoEncoderFormatPromiseTest.test.js
...at/src/main/js/test/VideoEncoderFormatPromiseTest.test.js
+15
-15
未找到文件。
multimedia/media/media_js_standard/videoCodecFormat/src/main/js/test/VideoDecoderFormatPromiseTest.test.js
浏览文件 @
0b171bbe
...
...
@@ -31,8 +31,8 @@ describe('VideoDecoderFormatPromise', function () {
let
isCodecData
=
false
;
let
inputEosFlag
=
false
;
let
surfaceID
=
''
;
let
fd
_r
ead
;
let
read
p
ath
;
let
fd
R
ead
;
let
read
P
ath
;
const
events
=
require
(
'
events
'
);
const
eventEmitter
=
new
events
.
EventEmitter
();
let
ES_FRAME_SIZE
=
[];
...
...
@@ -261,7 +261,7 @@ describe('VideoDecoderFormatPromise', function () {
},
failCallback
).
catch
(
failCatch
);
videoDecodeProcessor
=
null
;
}
await
closeFileDescriptor
(
read
p
ath
);
await
closeFileDescriptor
(
read
P
ath
);
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
})
...
...
@@ -302,8 +302,8 @@ describe('VideoDecoderFormatPromise', function () {
console
.
info
(
'
case error fileDescriptor undefined, open file fail
'
);
done
();
}
else
{
fd
_r
ead
=
res
.
fd
;
console
.
info
(
"
case fd
_read is:
"
+
fd_r
ead
);
fd
R
ead
=
res
.
fd
;
console
.
info
(
"
case fd
Read is:
"
+
fdR
ead
);
}
})
}
...
...
@@ -312,7 +312,7 @@ describe('VideoDecoderFormatPromise', function () {
console
.
info
(
'
case read file start execution
'
);
try
{
console
.
info
(
'
case filepath:
'
+
path
);
readStreamSync
=
fileio
.
fdopenStreamSync
(
fd
_r
ead
,
'
rb
'
);
readStreamSync
=
fileio
.
fdopenStreamSync
(
fd
R
ead
,
'
rb
'
);
}
catch
(
e
)
{
console
.
info
(
e
);
}
...
...
@@ -448,8 +448,8 @@ describe('VideoDecoderFormatPromise', function () {
async
function
decoderSource
(
config
,
name
,
srcPath
,
done
){
let
mediaDescription
=
config
;
console
.
info
(
'
start test case
'
);
read
p
ath
=
srcPath
;
await
getFdRead
(
read
p
ath
,
done
);
read
P
ath
=
srcPath
;
await
getFdRead
(
read
P
ath
,
done
);
await
media
.
createVideoDecoderByName
(
name
).
then
((
processor
)
=>
{
if
(
typeof
(
processor
)
!=
'
undefined
'
)
{
videoDecodeProcessor
=
processor
;
...
...
multimedia/media/media_js_standard/videoCodecFormat/src/main/js/test/VideoEncoderFormatPromiseTest.test.js
浏览文件 @
0b171bbe
...
...
@@ -34,7 +34,7 @@ describe('VideoEncoderFormatPromise', function () {
let
flushAtEOS
=
false
;
let
sawOutputEOS
=
false
;
let
needGetMediaDes
=
false
;
let
fd
_w
rite
;
let
fd
W
rite
;
let
fileAsset
;
const
context
=
featureAbility
.
getContext
();
const
mediaLibraryTest
=
mediaLibrary
.
getMediaLibrary
(
context
);
...
...
@@ -144,17 +144,17 @@ describe('VideoEncoderFormatPromise', function () {
console
.
info
(
'
[mediaLibrary] case getFdWrite getFileAssets() success
'
);
fileAsset
=
await
fetchWriteFileResult
.
getAllObject
();
console
.
info
(
'
[mediaLibrary] case getFdWrite getAllObject() success
'
);
fd
_w
rite
=
await
fileAsset
[
0
].
open
(
'
Rw
'
);
console
.
info
(
'
[mediaLibrary] case getFdWrite fd
_write is
'
+
fd_w
rite
);
fd
W
rite
=
await
fileAsset
[
0
].
open
(
'
Rw
'
);
console
.
info
(
'
[mediaLibrary] case getFdWrite fd
Write is
'
+
fdW
rite
);
}
}
async
function
closeFdWrite
()
{
if
(
fileAsset
!=
null
)
{
await
fileAsset
[
0
].
close
(
fd
_w
rite
).
then
(()
=>
{
console
.
info
(
'
[mediaLibrary] case close fd
_write success, fd is
'
+
fd_w
rite
);
await
fileAsset
[
0
].
close
(
fd
W
rite
).
then
(()
=>
{
console
.
info
(
'
[mediaLibrary] case close fd
Write success, fd is
'
+
fdW
rite
);
}).
catch
((
err
)
=>
{
console
.
info
(
'
[mediaLibrary] case close fd
_w
rite failed
'
);
console
.
info
(
'
[mediaLibrary] case close fd
W
rite failed
'
);
});
}
else
{
console
.
info
(
'
[mediaLibrary] case fileAsset is null
'
);
...
...
@@ -163,7 +163,7 @@ describe('VideoEncoderFormatPromise', function () {
function
writeFile
(
buf
,
len
)
{
try
{
let
res
=
fileio
.
writeSync
(
fd
_w
rite
,
buf
,
{
length
:
len
});
let
res
=
fileio
.
writeSync
(
fd
W
rite
,
buf
,
{
length
:
len
});
console
.
info
(
'
case fileio.write buffer success
'
);
}
catch
(
e
)
{
console
.
info
(
'
case fileio.write buffer error is
'
+
e
);
...
...
@@ -386,7 +386,7 @@ describe('VideoEncoderFormatPromise', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_ENCODER_SOFTWARE_FORMAT_COMPATIBILITY_MPEG4_PROMISE_01_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
case test MPEG4 format-resolution 640*480-frame rate 30 FPS
"
);
let
save
p
ath
=
'
rk_mpeg4_video_software_640_480_30.es
'
;
let
save
P
ath
=
'
rk_mpeg4_video_software_640_480_30.es
'
;
let
name
=
'
avenc_mpeg4
'
;
let
mediaDescription
=
{
"
codec_mime
"
:
'
video/mp4v-es
'
,
...
...
@@ -396,7 +396,7 @@ describe('VideoEncoderFormatPromise', function () {
"
frame_rate
"
:
30
}
await
encodeSource
(
mediaDescription
,
save
p
ath
,
name
,
done
);
await
encodeSource
(
mediaDescription
,
save
P
ath
,
name
,
done
);
})
/* *
...
...
@@ -409,7 +409,7 @@ describe('VideoEncoderFormatPromise', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_ENCODER_SOFTWARE_FORMAT_COMPATIBILITY_MPEG4_PROMISE_01_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
case test MPEG4 format-resolution 352*288-frame rate 30 FPS
"
);
let
save
p
ath
=
'
rk_mpeg4_video_software_352_288_30.es
'
;
let
save
P
ath
=
'
rk_mpeg4_video_software_352_288_30.es
'
;
let
name
=
'
avenc_mpeg4
'
;
let
mediaDescription
=
{
"
codec_mime
"
:
'
video/mp4v-es
'
,
...
...
@@ -419,7 +419,7 @@ describe('VideoEncoderFormatPromise', function () {
"
frame_rate
"
:
30
,
}
await
encodeSource
(
mediaDescription
,
save
p
ath
,
name
,
done
);
await
encodeSource
(
mediaDescription
,
save
P
ath
,
name
,
done
);
})
/* *
...
...
@@ -432,7 +432,7 @@ describe('VideoEncoderFormatPromise', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_ENCODER_SOFTWARE_FORMAT_COMPATIBILITY_MPEG4_PROMISE_02_0100
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
case test MPEG4 format-resolution 640*480-frame rate 25 FPS
"
);
let
save
p
ath
=
'
rk_mpeg4_video_software_640_480_25.es
'
;
let
save
P
ath
=
'
rk_mpeg4_video_software_640_480_25.es
'
;
let
name
=
'
avenc_mpeg4
'
;
let
mediaDescription
=
{
"
codec_mime
"
:
'
video/mp4v-es
'
,
...
...
@@ -442,7 +442,7 @@ describe('VideoEncoderFormatPromise', function () {
"
frame_rate
"
:
25
,
}
await
encodeSource
(
mediaDescription
,
save
p
ath
,
name
,
done
);
await
encodeSource
(
mediaDescription
,
save
P
ath
,
name
,
done
);
})
/* *
...
...
@@ -455,7 +455,7 @@ describe('VideoEncoderFormatPromise', function () {
*/
it
(
'
SUB_MEDIA_VIDEO_ENCODER_SOFTWARE_FORMAT_COMPATIBILITY_MPEG4_PROMISE_02_0200
'
,
0
,
async
function
(
done
)
{
console
.
info
(
"
case test MPEG4 format-resolution 640*480-frame rate 10 FPS
"
);
let
save
p
ath
=
'
rk_mpeg4_video_software_640_480_10.es
'
;
let
save
P
ath
=
'
rk_mpeg4_video_software_640_480_10.es
'
;
let
name
=
'
avenc_mpeg4
'
;
let
mediaDescription
=
{
"
codec_mime
"
:
'
video/mp4v-es
'
,
...
...
@@ -465,7 +465,7 @@ describe('VideoEncoderFormatPromise', function () {
"
frame_rate
"
:
10
,
}
await
encodeSource
(
mediaDescription
,
save
p
ath
,
name
,
done
);
await
encodeSource
(
mediaDescription
,
save
P
ath
,
name
,
done
);
})
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录