Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c9e5f824
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看板
提交
c9e5f824
编写于
10月 13, 2022
作者:
Y
yygxr
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix session xts case error
Signed-off-by:
N
yygxr
<
wuhao30@huawei.com
>
上级
e98081a6
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
75 addition
and
34 deletion
+75
-34
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
.../main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
+35
-34
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets
...n/ets/MainAbility/test/CameraSessionExposureTest.test.ets
+8
-0
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
...main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
+8
-0
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
...main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
+8
-0
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets
...Ability/test/CameraSessionVideoStabilizationTest.test.ets
+8
-0
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
.../ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
+8
-0
未找到文件。
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionBaseTest.test.ets
浏览文件 @
c9e5f824
...
...
@@ -397,39 +397,40 @@ export default function cameraSessionTest(surfaceId: any) {
console
.
info
(
TAG
+
"createPreviewOutput FAILED"
);
}
}
}
if
(
!
isEmpty
(
cameraOutputCap
.
photoProfiles
))
{
console
.
info
(
TAG
+
"cameraOutputCap.photoProfiles.length: "
+
cameraOutputCap
.
photoProfiles
.
length
);
for
(
let
j
=
0
;
j
<
cameraOutputCap
.
photoProfiles
.
length
;
j
++
)
{
mPhotoOutputArray
[
i
]
=
await
mCameraManager
.
createPhotoOutput
(
cameraOutputCap
.
photoProfiles
[
j
],
mPhoteSurface
);
if
(
!
isEmpty
(
mPhotoOutputArray
[
i
]))
{
break
;
}
}
if
(
isEmpty
(
mPhotoOutputArray
[
i
]))
{
console
.
info
(
TAG
+
"createPhotoOutput FAILED"
);
let
cameraOutputCap
=
await
mCameraManager
.
getSupportedOutputCapability
(
mCameraDevicesArray
[
0
]);
if
(
!
isEmpty
(
cameraOutputCap
.
photoProfiles
))
{
console
.
info
(
TAG
+
"cameraOutputCap.photoProfiles.length: "
+
cameraOutputCap
.
photoProfiles
.
length
);
for
(
let
j
=
0
;
j
<
cameraOutputCap
.
photoProfiles
.
length
;
j
++
)
{
mPhotoOutputArray
[
0
]
=
await
mCameraManager
.
createPhotoOutput
(
cameraOutputCap
.
photoProfiles
[
j
],
mPhoteSurface
);
if
(
!
isEmpty
(
mPhotoOutputArray
[
0
]))
{
break
;
}
}
console
.
info
(
TAG
+
"createPhotoOutput: "
+
mPhotoOutputArray
[
i
]);
if
(
isEmpty
(
mPhotoOutputArray
[
0
]))
{
console
.
info
(
TAG
+
"createPhotoOutput FAILED"
);
}
if
(
!
isEmpty
(
cameraOutputCap
.
videoProfiles
))
{
console
.
info
(
TAG
+
"cameraOutputCap.videoProfiles.length: "
+
cameraOutputCap
.
videoProfiles
.
length
);
for
(
let
j
=
0
;
j
<
cameraOutputCap
.
videoProfiles
.
length
;
j
++
)
{
mVideoOutputArray
[
i
]
=
await
mCameraManager
.
createVideoOutput
(
cameraOutputCap
.
videoProfiles
[
j
],
mVideoSurface
);
if
(
!
isEmpty
(
mVideoOutputArray
[
i
]))
{
break
;
}
}
console
.
info
(
TAG
+
"createPhotoOutput: "
+
mPhotoOutputArray
[
0
]);
}
if
(
isEmpty
(
mVideoOutputArray
[
i
]))
{
console
.
info
(
TAG
+
"createVideoOutput FAILED"
);
if
(
!
isEmpty
(
cameraOutputCap
.
videoProfiles
))
{
console
.
info
(
TAG
+
"cameraOutputCap.videoProfiles.length: "
+
cameraOutputCap
.
videoProfiles
.
length
);
for
(
let
j
=
0
;
j
<
cameraOutputCap
.
videoProfiles
.
length
;
j
++
)
{
mVideoOutputArray
[
0
]
=
await
mCameraManager
.
createVideoOutput
(
cameraOutputCap
.
videoProfiles
[
j
],
mVideoSurface
);
if
(
!
isEmpty
(
mVideoOutputArray
[
0
]))
{
break
;
}
}
console
.
info
(
TAG
+
"createVideoOutput: "
+
mPhotoOutputArray
[
i
]);
if
(
isEmpty
(
mVideoOutputArray
[
0
]))
{
console
.
info
(
TAG
+
"createVideoOutput FAILED"
);
}
console
.
info
(
TAG
+
"createVideoOutput: "
+
mPhotoOutputArray
[
0
]);
}
console
.
info
(
'Exit createOutputs'
);
...
...
@@ -443,16 +444,16 @@ export default function cameraSessionTest(surfaceId: any) {
await
mPreviewOutputArray
[
i
]
.
close
();
await
mPreviewOutputArray
[
i
]
.
release
();
}
if
(
!
isEmpty
(
mPhotoOutputArray
[
i
]))
{
await
mPhotoOutputArray
[
i
]
.
close
();
await
mPhotoOutputArray
[
i
]
.
relea
se
();
}
if
(
!
isEmpty
(
mVideoOutputArray
[
i
]))
{
await
mVideoOutputArray
[
i
]
.
close
();
await
mVideoOutputArray
[
i
]
.
relea
se
();
}
}
if
(
!
isEmpty
(
mPhotoOutputArray
[
0
]))
{
await
mPhotoOutputArray
[
0
]
.
clo
se
();
await
mPhotoOutputArray
[
0
]
.
release
();
}
if
(
!
isEmpty
(
mVideoOutputArray
[
0
]))
{
await
mVideoOutputArray
[
0
]
.
clo
se
();
await
mVideoOutputArray
[
0
]
.
release
();
}
return
true
;
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionExposureTest.test.ets
浏览文件 @
c9e5f824
...
...
@@ -444,6 +444,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
}
}
/*
if (!isEmpty(cameraOutputCap.photoProfiles)) {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
...
...
@@ -476,6 +477,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
console.info(TAG + "createVideoOutput: " + mPhotoOutputArray[i]);
}
*/
}
console
.
info
(
'Exit createOutputs'
);
...
...
@@ -490,6 +492,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
await
mPreviewOutputArray
[
i
]
.
release
();
}
/*
if (!isEmpty(mPhotoOutputArray[i])) {
await mPhotoOutputArray[i].close();
await mPhotoOutputArray[i].release();
...
...
@@ -499,6 +502,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
await mVideoOutputArray[i].close();
await mVideoOutputArray[i].release();
}
*/
}
return
true
;
...
...
@@ -517,6 +521,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
await
mCameraSession
.
addOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutputArray[idx]);
...
...
@@ -526,6 +531,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
console.info(TAG + "Start to addOutput mVideoOutput");
await mCameraSession.addOutput(mVideoOutputArray[idx]);
}
*/
await
commitCameraSessionConfig
();
await
beginCameraSessionConfig
();
...
...
@@ -572,6 +578,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
await
mCameraSession
.
removeOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutputArray[idx]);
...
...
@@ -581,6 +588,7 @@ export default function cameraSessionExposureTest(surfaceId: any) {
console.info(TAG + "Start to removeOutput mVideoOutput");
await mCameraSession.removeOutput(mVideoOutputArray[idx]);
}
*/
console
.
info
(
TAG
+
"Exit stopCameraSession"
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFlashTest.test.ets
浏览文件 @
c9e5f824
...
...
@@ -395,6 +395,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
}
}
/*
if (!isEmpty(cameraOutputCap.photoProfiles)) {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
...
...
@@ -427,6 +428,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
console.info(TAG + "createVideoOutput: " + mPhotoOutputArray[i]);
}
*/
}
console
.
info
(
'Exit createOutputs'
);
...
...
@@ -441,6 +443,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await
mPreviewOutputArray
[
i
]
.
release
();
}
/*
if (!isEmpty(mPhotoOutputArray[i])) {
await mPhotoOutputArray[i].close();
await mPhotoOutputArray[i].release();
...
...
@@ -450,6 +453,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await mVideoOutputArray[i].close();
await mVideoOutputArray[i].release();
}
*/
}
return
true
;
...
...
@@ -468,6 +472,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await
mCameraSession
.
addOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutputArray[idx]);
...
...
@@ -477,6 +482,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
console.info(TAG + "Start to addOutput mVideoOutput");
await mCameraSession.addOutput(mVideoOutputArray[idx]);
}
*/
await
commitCameraSessionConfig
();
await
beginCameraSessionConfig
();
...
...
@@ -523,6 +529,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
await
mCameraSession
.
removeOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutputArray[idx]);
...
...
@@ -532,6 +539,7 @@ export default function cameraSessionFlashTest(surfaceId: any) {
console.info(TAG + "Start to removeOutput mVideoOutput");
await mCameraSession.removeOutput(mVideoOutputArray[idx]);
}
*/
console
.
info
(
TAG
+
"Exit stopCameraSession"
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionFocusTest.test.ets
浏览文件 @
c9e5f824
...
...
@@ -440,6 +440,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
}
}
/*
if (!isEmpty(cameraOutputCap.photoProfiles)) {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
...
...
@@ -472,6 +473,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
console.info(TAG + "createVideoOutput: " + mPhotoOutputArray[i]);
}
*/
}
console
.
info
(
'Exit createOutputs'
);
...
...
@@ -486,6 +488,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
await
mPreviewOutputArray
[
i
]
.
release
();
}
/*
if (!isEmpty(mPhotoOutputArray[i])) {
await mPhotoOutputArray[i].close();
await mPhotoOutputArray[i].release();
...
...
@@ -495,6 +498,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
await mVideoOutputArray[i].close();
await mVideoOutputArray[i].release();
}
*/
}
return
true
;
...
...
@@ -513,6 +517,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
await
mCameraSession
.
addOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutputArray[idx]);
...
...
@@ -522,6 +527,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
console.info(TAG + "Start to addOutput mVideoOutput");
await mCameraSession.addOutput(mVideoOutputArray[idx]);
}
*/
await
commitCameraSessionConfig
();
await
beginCameraSessionConfig
();
...
...
@@ -568,6 +574,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
await
mCameraSession
.
removeOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutputArray[idx]);
...
...
@@ -577,6 +584,7 @@ export default function cameraSessionFocusTest(surfaceId: any) {
console.info(TAG + "Start to removeOutput mVideoOutput");
await mCameraSession.removeOutput(mVideoOutputArray[idx]);
}
*/
console
.
info
(
TAG
+
"Exit stopCameraSession"
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionVideoStabilizationTest.test.ets
浏览文件 @
c9e5f824
...
...
@@ -393,6 +393,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
}
}
/*
if (!isEmpty(cameraOutputCap.photoProfiles)) {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
...
...
@@ -425,6 +426,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
console.info(TAG + "createVideoOutput: " + mPhotoOutputArray[i]);
}
*/
}
console
.
info
(
'Exit createOutputs'
);
...
...
@@ -439,6 +441,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
await
mPreviewOutputArray
[
i
]
.
release
();
}
/*
if (!isEmpty(mPhotoOutputArray[i])) {
await mPhotoOutputArray[i].close();
await mPhotoOutputArray[i].release();
...
...
@@ -448,6 +451,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
await mVideoOutputArray[i].close();
await mVideoOutputArray[i].release();
}
*/
}
return
true
;
...
...
@@ -466,6 +470,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
await
mCameraSession
.
addOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutputArray[idx]);
...
...
@@ -475,6 +480,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
console.info(TAG + "Start to addOutput mVideoOutput");
await mCameraSession.addOutput(mVideoOutputArray[idx]);
}
*/
await
commitCameraSessionConfig
();
await
beginCameraSessionConfig
();
...
...
@@ -521,6 +527,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
await
mCameraSession
.
removeOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutputArray[idx]);
...
...
@@ -530,6 +537,7 @@ export default function cameraSessionVideoStabilizationTest(surfaceId: any) {
console.info(TAG + "Start to removeOutput mVideoOutput");
await mCameraSession.removeOutput(mVideoOutputArray[idx]);
}
*/
console
.
info
(
TAG
+
"Exit stopCameraSession"
);
...
...
multimedia/camera/camera_js_standard/src/main/ets/MainAbility/test/CameraSessionZoomRatioTest.test.ets
浏览文件 @
c9e5f824
...
...
@@ -397,6 +397,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
}
}
/*
if (!isEmpty(cameraOutputCap.photoProfiles)) {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
...
...
@@ -429,6 +430,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
console.info(TAG + "createVideoOutput: " + mPhotoOutputArray[i]);
}
*/
}
console
.
info
(
'Exit createOutputs'
);
...
...
@@ -443,6 +445,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await
mPreviewOutputArray
[
i
]
.
release
();
}
/*
if (!isEmpty(mPhotoOutputArray[i])) {
await mPhotoOutputArray[i].close();
await mPhotoOutputArray[i].release();
...
...
@@ -452,6 +455,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await mVideoOutputArray[i].close();
await mVideoOutputArray[i].release();
}
*/
}
return
true
;
...
...
@@ -470,6 +474,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await
mCameraSession
.
addOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutputArray[idx]);
...
...
@@ -479,6 +484,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
console.info(TAG + "Start to addOutput mVideoOutput");
await mCameraSession.addOutput(mVideoOutputArray[idx]);
}
*/
await
commitCameraSessionConfig
();
await
beginCameraSessionConfig
();
...
...
@@ -525,6 +531,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
await
mCameraSession
.
removeOutput
(
mPreviewOutputArray
[
idx
]);
}
/*
if (!isEmpty(mPhotoOutputArray[idx])) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutputArray[idx]);
...
...
@@ -534,6 +541,7 @@ export default function cameraSessionZoomRatioTest(surfaceId: any) {
console.info(TAG + "Start to removeOutput mVideoOutput");
await mCameraSession.removeOutput(mVideoOutputArray[idx]);
}
*/
console
.
info
(
TAG
+
"Exit stopCameraSession"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录