Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
d2aafafb
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看板
提交
d2aafafb
编写于
10月 08, 2022
作者:
Y
yygxr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Modify video file name and fix SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO error
Signed-off-by:
N
yygxr
<
wuhao30@huawei.com
>
上级
a616cf23
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
8729 addition
and
8729 deletion
+8729
-8729
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
.../main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
+1892
-1892
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets
...n/ets/MainAbility/test/CameraSessionExposureTest.test.ets
+7
-7
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
...main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
+1500
-1500
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
...main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
+2450
-2450
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets
...Ability/test/CameraSessionVideoStabilizationTest.test.ets
+1684
-1684
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
.../ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
+1196
-1196
未找到文件。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
浏览文件 @
d2aafafb
...
...
@@ -68,7 +68,7 @@ let mVideoConfig = {
audioSourceType
:
1
,
videoSourceType
:
0
,
profile
:
mVideoProfileCfg
,
url
:
'file:///data/media/
02.mp4'
,
url
:
'file:///data/media/
CameraSessionBase.mp4'
,
orientationHint
:
0
,
location
:
{
latitude
:
30
,
longitude
:
130
},
maxSize
:
100
,
...
...
@@ -178,7 +178,7 @@ export default function cameraSessionTest(surfaceId: any) {
async
function
getVideoReceiveSurface
()
{
console
.
log
(
TAG
+
'Entering getVideoReceiveSurface'
)
await
getFd
(
'
02.mp4'
);
await
getFd
(
'
CameraSessionBase.mp4'
);
mVideoConfig
.
url
=
mFdPath
;
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
console
.
info
(
TAG
+
'Entering create video receiver'
)
...
...
@@ -187,13 +187,13 @@ export default function cameraSessionTest(surfaceId: any) {
console
.
info
(
TAG
+
'videoRecorder.prepare called.'
)
mVideoRecorder
.
prepare
(
mVideoConfig
,
(
err
)
=>
{
console
.
info
(
TAG
+
'videoRecorder.prepare success.'
)
})
mVideoRecorder
.
getInputSurface
((
err
,
id
)
=>
{
console
.
info
(
TAG
+
'getInputSurface called'
)
mVideoSurface
=
id
console
.
info
(
TAG
+
'getInputSurface surfaceId: '
+
JSON
.
stringify
(
mVideoSurface
))
})
})
})
console
.
log
(
TAG
+
'Exit getVideoReceiveSurface'
)
}
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets
浏览文件 @
d2aafafb
...
...
@@ -70,7 +70,7 @@ let mVideoConfig = {
audioSourceType
:
1
,
videoSourceType
:
0
,
profile
:
mVideoProfileCfg
,
url
:
'file:///data/media/
02
.mp4'
,
url
:
'file:///data/media/
CameraSessionExposure
.mp4'
,
orientationHint
:
0
,
location
:
{
latitude
:
30
,
longitude
:
130
},
maxSize
:
100
,
...
...
@@ -230,7 +230,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
async
function
getVideoReceiveSurface
()
{
console
.
log
(
TAG
+
'Entering getVideoReceiveSurface'
)
await
getFd
(
'
02
.mp4'
);
await
getFd
(
'
CameraSessionExposure
.mp4'
);
mVideoConfig
.
url
=
mFdPath
;
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
console
.
info
(
TAG
+
'Entering create video receiver'
)
...
...
@@ -239,13 +239,13 @@ export default function cameraSessionExposureTest(surfaceId: any) {
console
.
info
(
TAG
+
'videoRecorder.prepare called.'
)
mVideoRecorder
.
prepare
(
mVideoConfig
,
(
err
)
=>
{
console
.
info
(
TAG
+
'videoRecorder.prepare success.'
)
})
mVideoRecorder
.
getInputSurface
((
err
,
id
)
=>
{
console
.
info
(
TAG
+
'getInputSurface called'
)
mVideoSurface
=
id
console
.
info
(
TAG
+
'getInputSurface surfaceId: '
+
JSON
.
stringify
(
mVideoSurface
))
})
})
})
console
.
log
(
TAG
+
'Exit getVideoReceiveSurface'
)
}
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
浏览文件 @
d2aafafb
...
...
@@ -68,7 +68,7 @@ let mVideoConfig = {
audioSourceType
:
1
,
videoSourceType
:
0
,
profile
:
mVideoProfileCfg
,
url
:
'file:///data/media/
02.mp4'
,
url
:
'file:///data/media/
CameraSessionFlush.mp4'
,
orientationHint
:
0
,
location
:
{
latitude
:
30
,
longitude
:
130
},
maxSize
:
100
,
...
...
@@ -181,7 +181,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
async
function
getVideoReceiveSurface
()
{
console
.
log
(
TAG
+
'Entering getVideoReceiveSurface'
)
await
getFd
(
'
02.mp4'
);
await
getFd
(
'
CameraSessionFlush.mp4'
);
mVideoConfig
.
url
=
mFdPath
;
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
console
.
info
(
TAG
+
'Entering create video receiver'
)
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
浏览文件 @
d2aafafb
...
...
@@ -67,7 +67,7 @@ let mVideoConfig = {
audioSourceType
:
1
,
videoSourceType
:
0
,
profile
:
mVideoProfileCfg
,
url
:
'file:///data/media/
02.mp4'
,
url
:
'file:///data/media/
CameraSessionFocus.mp4'
,
orientationHint
:
0
,
location
:
{
latitude
:
30
,
longitude
:
130
},
maxSize
:
100
,
...
...
@@ -227,7 +227,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
async
function
getVideoReceiveSurface
()
{
console
.
log
(
TAG
+
'Entering getVideoReceiveSurface'
)
await
getFd
(
'
02.mp4'
);
await
getFd
(
'
CameraSessionFocus.mp4'
);
mVideoConfig
.
url
=
mFdPath
;
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
console
.
info
(
TAG
+
'Entering create video receiver'
)
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets
浏览文件 @
d2aafafb
...
...
@@ -67,7 +67,7 @@ let mVideoConfig = {
audioSourceType
:
1
,
videoSourceType
:
0
,
profile
:
mVideoProfileCfg
,
url
:
'file:///data/media/
02.mp4'
,
url
:
'file:///data/media/
CameraSessionVideoStabilization.mp4'
,
orientationHint
:
0
,
location
:
{
latitude
:
30
,
longitude
:
130
},
maxSize
:
100
,
...
...
@@ -180,7 +180,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
async
function
getVideoReceiveSurface
()
{
console
.
log
(
TAG
+
'Entering getVideoReceiveSurface'
)
await
getFd
(
'
02.mp4'
);
await
getFd
(
'
CameraSessionVideoStabilization.mp4'
);
mVideoConfig
.
url
=
mFdPath
;
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
console
.
info
(
TAG
+
'Entering create video receiver'
)
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
浏览文件 @
d2aafafb
...
...
@@ -69,7 +69,7 @@ let mVideoConfig = {
audioSourceType
:
1
,
videoSourceType
:
0
,
profile
:
mVideoProfileCfg
,
url
:
'file:///data/media/
02.mp4'
,
url
:
'file:///data/media/
CameraSessionZoomRatio.mp4'
,
orientationHint
:
0
,
location
:
{
latitude
:
30
,
longitude
:
130
},
maxSize
:
100
,
...
...
@@ -182,7 +182,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
async
function
getVideoReceiveSurface
()
{
console
.
log
(
TAG
+
'Entering getVideoReceiveSurface'
)
await
getFd
(
'
02.mp4'
);
await
getFd
(
'
CameraSessionZoomRatio.mp4'
);
mVideoConfig
.
url
=
mFdPath
;
media
.
createVideoRecorder
((
err
,
recorder
)
=>
{
console
.
info
(
TAG
+
'Entering create video receiver'
)
...
...
@@ -987,8 +987,8 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_CALLBACK_0103
* @tc.name : Check capture session zoom ratio with callback(invalid value, m
ax - 1)
* @tc.desc : Check capture session zoom ratio with callback(invalid value, m
ax - 1)
* @tc.name : Check capture session zoom ratio with callback(invalid value, m
in - 1)
* @tc.desc : Check capture session zoom ratio with callback(invalid value, m
in - 1)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -1006,7 +1006,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await
startCameraSession
(
mCameraInputArray
[
i
]);
mCameraSession
.
setZoomRatio
((
mZoomRatioM
axArray
[
i
]
-
1
),
async
(
err
)
=>
{
mCameraSession
.
setZoomRatio
((
mZoomRatioM
inArray
[
i
]
-
1
),
async
(
err
)
=>
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_CALLBACK_0103 callback"
);
if
(
!
err
)
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_CALLBACK_0103 PASSED with ZoomRatio is: "
+
(
mZoomRatioMaxArray
[
i
]
-
1
));
...
...
@@ -1020,7 +1020,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
mCameraSession
.
getZoomRatio
(
async
(
err
,
data
)
=>
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_CALLBACK_0103 callback"
);
if
(
!
err
)
{
if
(
data
!=
(
mZoomRatioM
axArray
[
i
]
-
1
))
{
if
(
data
!=
(
mZoomRatioM
inArray
[
i
]
-
1
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_CALLBACK_0103 PASSED with ZoomRatio is: "
+
data
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_CALLBACK_0103 FAILED with ZoomRatio is: "
+
data
);
...
...
@@ -1045,8 +1045,8 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103
* @tc.name : Check capture session set zoom ratio with promise(invalid value, m
ax - 1)
* @tc.desc : Check capture session set zoom ratio with promise(invalid value, m
ax - 1)
* @tc.name : Check capture session set zoom ratio with promise(invalid value, m
in - 1)
* @tc.desc : Check capture session set zoom ratio with promise(invalid value, m
in - 1)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -1064,14 +1064,14 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await
startCameraSession
(
mCameraInputArray
[
i
]);
await
mCameraSession
.
setZoomRatio
((
mZoomRatioM
axArray
[
i
]
-
1
));
await
mCameraSession
.
setZoomRatio
((
mZoomRatioM
inArray
[
i
]
-
1
));
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 finish"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 PASSED with ZoomRatio is: "
+
(
mZoomRatioMaxArray
[
i
]
-
1
));
await
sleep
(
500
);
let
zoomRatio
=
await
mCameraSession
.
getZoomRatio
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 finish"
);
if
(
zoomRatio
!=
(
mZoomRatioM
axArray
[
i
]
-
1
))
{
if
(
zoomRatio
!=
(
mZoomRatioM
inArray
[
i
]
-
1
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 PASSED with ZoomRatio is: "
+
zoomRatio
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 FAILED with ZoomRatio is: "
+
zoomRatio
);
...
...
@@ -1091,8 +1091,8 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_CALLBACK_0104
* @tc.name : Check capture session zoom ratio with callback(invalid value, m
ax - 0.1)
* @tc.desc : Check capture session zoom ratio with callback(invalid value, m
ax - 0.1)
* @tc.name : Check capture session zoom ratio with callback(invalid value, m
in - 0.1)
* @tc.desc : Check capture session zoom ratio with callback(invalid value, m
in - 0.1)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -1149,8 +1149,8 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104
* @tc.name : Check capture session set zoom ratio with promise(invalid value, m
ax - 0.1)
* @tc.desc : Check capture session set zoom ratio with promise(invalid value, m
ax - 0.1)
* @tc.name : Check capture session set zoom ratio with promise(invalid value, m
in - 0.1)
* @tc.desc : Check capture session set zoom ratio with promise(invalid value, m
in - 0.1)
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
...
...
@@ -1168,14 +1168,14 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await
startCameraSession
(
mCameraInputArray
[
i
]);
await
mCameraSession
.
setZoomRatio
((
mZoomRatioM
axArray
[
i
]
-
0.1
));
await
mCameraSession
.
setZoomRatio
((
mZoomRatioM
inArray
[
i
]
-
0.1
));
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 finish"
);
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 PASSED with ZoomRatio is: "
+
(
mZoomRatioMaxArray
[
i
]
-
0.1
));
await
sleep
(
500
);
let
zoomRatio
=
await
mCameraSession
.
getZoomRatio
();
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 finish"
);
if
(
zoomRatio
!=
(
mZoomRatioM
axArray
[
i
]
-
0.1
))
{
if
(
zoomRatio
!=
(
mZoomRatioM
inArray
[
i
]
-
0.1
))
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 PASSED with ZoomRatio is: "
+
zoomRatio
);
}
else
{
console
.
info
(
TAG
+
"Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 FAILED with ZoomRatio is: "
+
zoomRatio
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录