提交 c9e5f824 编写于 作者: Y yygxr

fix session xts case error

Signed-off-by: Nyygxr <wuhao30@huawei.com>
上级 e98081a6
......@@ -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].release();
}
if (!isEmpty(mVideoOutputArray[i])) {
await mVideoOutputArray[i].close();
await mVideoOutputArray[i].release();
}
}
if (!isEmpty(mPhotoOutputArray[0])) {
await mPhotoOutputArray[0].close();
await mPhotoOutputArray[0].release();
}
if (!isEmpty(mVideoOutputArray[0])) {
await mVideoOutputArray[0].close();
await mVideoOutputArray[0].release();
}
return true;
......
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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");
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册