未验证 提交 87712302 编写于 作者: O openharmony_ci 提交者: Gitee

!5795 modify camera xts on branch 3.2Beta3

Merge pull request !5795 from supeng/OpenHarmony-3.2-Beta3
......@@ -2991,7 +2991,8 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
await CaptureSessionPromise.addInput(camera1InputPromise);
// 创建预览输出流
let previewOutput = await cameraObj.createPreviewOutput(surfaceId);
// 创建ImageReceiver对象,并设置照片参数
let imageReceiver = await image.createImageReceiver(640, 480, 4, 8);
......@@ -2999,6 +3000,8 @@ export default function cameraJSUnitPhotoPromise(surfaceId: any) {
let photoSurfaceId = await imageReceiver.getReceivingSurfaceId();
// 创建拍照输出流
let photoOutput = await cameraObj.createPhotoOutput((photoSurfaceId));
// 向会话中添加预览输入流
await CaptureSessionPromise.addOutput(previewOutput);
// 向会话中添加拍照输出流
await CaptureSessionPromise.addOutput(photoOutput);
......
......@@ -1101,6 +1101,37 @@ export default function cameraJSUnitVideoAsync(surfaceId: any) {
}
})
/**
* @tc.number : VA_COMMIT_CONFIG_CALLBACK_0100
* @tc.name : CommitConfig async api
* @tc.desc : CommitConfig async api
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('VA_COMMIT_CONFIG_CALLBACK_0100', 0, async function (done) {
if (captureSession == null || captureSession == undefined) {
console.info(TAG + 'Entering CommitConfig captureSession == null || undefined')
} else {
console.info(TAG + 'Entering VA_COMMIT_CONFIG_CALLBACK_0100 to operate')
await sleep(1)
captureSession.commitConfig(async (err, data) => {
if (!err) {
console.info(TAG + 'Entering CommitConfig data is not null || undefined')
console.info(TAG + 'Entering VA_COMMIT_CONFIG_CALLBACK_0100 success')
} else {
console.info(TAG + 'Entering VA_COMMIT_CONFIG_CALLBACK_0100 err: ' + err.message)
}
expect(true).assertTrue();
console.info(TAG + 'Entering VA_COMMIT_CONFIG_CALLBACK_0100 ends here')
await sleep(1)
done()
})
await sleep(1)
done()
}
})
//framerate
/**
* @tc.number : GET_FRAME_RATE_RANGE
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册