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

!7139 相机xts同步接口修改

Merge pull request !7139 from SongChunPeng/master
......@@ -96,12 +96,12 @@ export default function cameraEnumTest() {
*/
it('SUB_MULTIMEDIA_CAMERA_ENUM_CAMERATYPE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_ENUM_CAMERATYPE_0100--------------");
console.info("CameraType: "+ JSON.stringify(camera.CameraType));
expect(camera.CameraType.CAMERA_TYPE_DEFAULT == 0).assertTrue();
expect(camera.CameraType.CAMERA_TYPE_WIDE_ANGLE == 1).assertTrue();
expect(camera.CameraType.CAMERA_TYPE_ULTRA_WIDE == 2).assertTrue();
expect(camera.CameraType.CAMERA_TYPE_TELEPHOTO == 3).assertTrue();
expect(camera.CameraType.CAMERA_TYPE_TRUE_DEPTH == 4).assertTrue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ENUM_CAMERATYPE_0100 ends here");
done();
})
......@@ -291,5 +291,29 @@ export default function cameraEnumTest() {
done();
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_ENUM_CAMERAERRORCODE_0100
* @tc.name : Camera CameraErrorCode Eunm
* @tc.desc : Camera CameraErrorCode Eunm
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_MULTIMEDIA_CAMERA_ENUM_CAMERAERRORCODE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_ENUM_CAMERAERRORCODE_0100--------------");
expect(camera.CameraErrorCode.INVALID_ARGUMENT == 7400101).assertTrue();
expect(camera.CameraErrorCode.OPERATION_NOT_ALLOWED == 7400102).assertTrue();
expect(camera.CameraErrorCode.SESSION_NOT_CONFIG == 7400103).assertTrue();
expect(camera.CameraErrorCode.SESSION_NOT_RUNNING == 7400104).assertTrue();
expect(camera.CameraErrorCode.SESSION_CONFIG_LOCKED == 7400105).assertTrue();
expect(camera.CameraErrorCode.DEVICE_SETTING_LOCKED == 7400106).assertTrue();
expect(camera.CameraErrorCode.CONFILICT_CAMERA == 7400107).assertTrue();
expect(camera.CameraErrorCode.DEVICE_DISABLED == 7400108).assertTrue();
expect(camera.CameraErrorCode.SERVICE_FATAL_ERROR == 7400201).assertTrue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ENUM_CAMERAERRORCODE_0100 ends here");
done();
})
})
}
\ No newline at end of file
......@@ -69,10 +69,10 @@ export default function CameraInputTest() {
}
}
async function getCameraManagerInstance() {
function getCameraManagerInstance() {
console.info('Enter getCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -83,10 +83,10 @@ export default function CameraInputTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
mCameraDevicesArray = mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
......@@ -118,15 +118,12 @@ export default function CameraInputTest() {
return true;
}
async function beginCameraSessionConfig() {
function beginCameraSessionConfig() {
console.info('Enter beginCameraSessionConfig');
console.info(TAG + "Entering beginConfig start");
mCameraSession.beginConfig();
console.info(TAG + "Entering beginConfig end");
await sleep(30);
console.info('Exit beginCameraSessionConfig');
return true;
......@@ -150,11 +147,11 @@ export default function CameraInputTest() {
return true;
}
async function createCameraSessionInstance() {
function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
try {
mCameraSession = await mCameraManager.createCaptureSession();
mCameraSession = mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
......@@ -165,7 +162,7 @@ export default function CameraInputTest() {
return false;
}
await beginCameraSessionConfig();
beginCameraSessionConfig();
console.info('Exit createCameraSessionInstance');
......@@ -184,23 +181,16 @@ export default function CameraInputTest() {
return false;
}
mCameraInput = await mCameraManager.createCameraInput(mCameraDevicesArray[idx]);
mCameraInput = mCameraManager.createCameraInput(mCameraDevicesArray[idx]);
if (isEmpty(mCameraInput)) {
console.info(TAG + "createCameraInput FAILED");
return false;
}
mCameraInput.open(async (err) => {
console.info(TAG + "Entering mCameraInput open callback");
if (!err) {
console.info(TAG + "Entering mCameraInput open PASSED ");
} else {
console.info(TAG + "Entering mCameraInput open FAILED : " + err.message);
}
})
await mCameraInput.open();
await sleep(100);
sleep(100);
console.info(idx + 'th CameraInput is: ' + mCameraInput);
......@@ -221,16 +211,16 @@ export default function CameraInputTest() {
return true;
}
async function createOutput(idx:any) {
function createOutput(idx:any) {
console.info('Enter createOutput');
let cameraOutputCap = mCameraManager.getSupportedOutputCapability();
let cameraOutputCap = mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
if (!isEmpty(cameraOutputCap)) {
if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
mPreviewOutput = mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
......@@ -253,7 +243,6 @@ export default function CameraInputTest() {
console.info('Enter releaseOutput');
if (!isEmpty(mPreviewOutput)) {
await mPreviewOutput.stop();
await mPreviewOutput.release();
}
......@@ -266,18 +255,18 @@ export default function CameraInputTest() {
console.info(TAG + "Enter startCameraSession");
await createInput(idx);
await createOutput(idx);
createOutput(idx);
await sleep(1);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPreviewOutput);
}
await sleep(1);
......@@ -294,12 +283,12 @@ export default function CameraInputTest() {
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to removeInput input");
await mCameraSession.removeInput(mCameraInput);
mCameraSession.removeInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
mCameraSession.removeOutput(mPreviewOutput);
}
await releaseInput();
......@@ -316,9 +305,9 @@ export default function CameraInputTest() {
await getPermission();
sleep(1000);
await driveFn();
await getCameraManagerInstance();
await getCameraSupportDevicesArray();
await createCameraSessionInstance();
getCameraManagerInstance();
getCameraSupportDevicesArray();
createCameraSessionInstance();
console.info('beforeAll case');
});
beforeEach(function () {
......
......@@ -296,7 +296,7 @@ export default function cameraJSUnitOutput() {
console.info(TAG + "Entering CREATE_CAMERA_INPUT cameraManager == null || undefined")
expect().assertFail();
} else {
cameraInput = await cameraManager.createCameraInput(cameraDevicesArray[0]);
cameraInput = cameraManager.createCameraInput(cameraDevicesArray[0]);
if (isEmpty(cameraInput)) {
console.info(TAG + "SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_INPUT_PROMISE_0100 FAILED");
}
......@@ -329,7 +329,7 @@ export default function cameraJSUnitOutput() {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PREVIEW_OUTPUT_CALLBACK_0100")
let cameraOutputCap = await getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
let cameraOutputCap = getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
let previewProfilesArray = cameraOutputCap.previewProfiles;
if (isEmpty(previewProfilesArray)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PREVIEW_OUTPUT_CALLBACK_0100 previewProfilesArray == null || undefined")
......@@ -337,7 +337,6 @@ export default function cameraJSUnitOutput() {
}
previewOutput = cameraManager.createPreviewOutput(previewProfilesArray[0], globalThis.surfaceId);
}
await sleep(1000);
done();
})
......@@ -357,19 +356,18 @@ export default function cameraJSUnitOutput() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PHOTO_OUTPUT_PROMISE_0100 cameraManager == null || undefined")
expect().assertFail();
} else {
let cameraOutputCap = await getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
let cameraOutputCap = getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
let photoProfilesArray = cameraOutputCap.photoProfiles;
if (isEmpty(photoProfilesArray)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PHOTO_OUTPUT_PROMISE_0100 previewProfilesArray == null || undefined")
expect().assertFalse();
}
photoOutput = await cameraManager.createPhotoOutput(photoProfilesArray[0], surfaceId1);
photoOutput = cameraManager.createPhotoOutput(photoProfilesArray[0], surfaceId1);
if (isEmpty(photoOutput)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_PHOTO_OUTPUT_PROMISE_0100 data is empty");
expect().assertFalse();
}
}
await sleep(1000);
done();
})
......@@ -389,7 +387,7 @@ export default function cameraJSUnitOutput() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_VIDEO_OUTPUT_CALLBACK_0100 cameraManager == null || undefined")
expect().assertFail();
} else {
let cameraOutputCap = await getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
let cameraOutputCap = getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
console.info("SUB_MULTIMEDIA_CAMERA_CREATE_VIDEO_OUTPUT_CALLBACK_0100 camera:" + cameraDevicesArray[0].cameraId);
expect(isEmpty(cameraOutputCap)).assertFalse();
let videoProfilesArray = cameraOutputCap.videoProfiles;
......@@ -397,7 +395,6 @@ export default function cameraJSUnitOutput() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_VIDEO_OUTPUT_CALLBACK_0100 start createVideoOutput")
videoOutput = cameraManager.createVideoOutput(videoProfilesArray[0], videoSurfaceId);
}
await sleep(1000);
done();
})
......@@ -416,7 +413,7 @@ export default function cameraJSUnitOutput() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_CALLBACK_0100 cameraManager == null || undefined")
expect().assertFail();
} else {
let cameraOutputCap = await getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
let cameraOutputCap = getSupportedOutputCapabilityInPromise(cameraDevicesArray[0]);
console.info("SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_CALLBACK_0100 camera:" + cameraDevicesArray[0].cameraId);
expect(isEmpty(cameraOutputCap)).assertFalse();
mMetadataObjectTypeArray = cameraOutputCap.supportedMetadataObjectTypes;
......@@ -427,7 +424,6 @@ export default function cameraJSUnitOutput() {
metadataOutput = cameraManager.createMetadataOutput(mMetadataObjectTypeArray);
}
}
await sleep(1000);
done();
})
......@@ -450,7 +446,6 @@ export default function cameraJSUnitOutput() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAPTURE_SESSION_CALLBACK_0100")
captureSession = cameraManager.createCaptureSession();
}
await sleep(1000);
done();
})
......@@ -471,7 +466,6 @@ export default function cameraJSUnitOutput() {
} else {
captureSession.beginConfig();
}
await sleep(1000);
done();
})
......@@ -493,7 +487,6 @@ export default function cameraJSUnitOutput() {
} else {
captureSession.addInput(cameraInput)
}
await sleep(1000);
done();
})
......@@ -519,7 +512,6 @@ export default function cameraJSUnitOutput() {
}
captureSession.addOutput(previewOutput)
}
await sleep(1000);
done();
})
......@@ -545,7 +537,6 @@ export default function cameraJSUnitOutput() {
console.info(TAG + "captureSession start add photoOutput")
captureSession.addOutput(photoOutput)
}
await sleep(1000);
done();
})
......@@ -566,7 +557,6 @@ export default function cameraJSUnitOutput() {
} else {
captureSession.addOutput(videoOutput)
}
await sleep(1000);
done();
})
......@@ -588,7 +578,6 @@ export default function cameraJSUnitOutput() {
if (!isEmpty(metadataOutput)) {
captureSession.addOutput(metadataOutput)
}
}
await sleep(1000);
done();
......@@ -671,8 +660,7 @@ export default function cameraJSUnitOutput() {
it('SUB_MULTIMEDIA_CAMERA_METADATA_OUTPUT_CALLBACK_ON_ERROR_0100', 1, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_METADATA_OUTPUT_CALLBACK_ON_ERROR_0100--------------");
if (isEmpty(metadataOutput)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_METADATA_OUTPUT_CALLBACK_ON_ERROR_0100 metadataOutput == null || undefined")
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_METADATA_OUTPUT_CALLBACK_ON_ERROR_0100 metadata is not support")
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_METADATA_OUTPUT_CALLBACK_ON_ERROR_0100 to operate");
metadataOutput.on('error', async (err, data) => {
......
......@@ -161,10 +161,10 @@ export default function cameraManagerTest() {
return false;
}
async function getCameraManagerInstance() {
function getCameraManagerInstance() {
console.info('Enter getCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -175,10 +175,10 @@ export default function cameraManagerTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
mCameraDevicesArray = mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
......@@ -210,7 +210,7 @@ export default function cameraManagerTest() {
return true;
}
async function getSupportedOutputCapability(cameraDevice) {
function getSupportedOutputCapability(cameraDevice) {
if (isEmpty(mCameraManager)) {
console.info(TAG + "Entering getSupportedOutputCapability cameraManager == null || undefined")
expect().assertFail();
......@@ -232,10 +232,10 @@ describe('CameraManagerTest', function () {
console.info(TAG + '----------CameraManagerTest--------------')
beforeAll(async function () {
await getCameraManagerInstance();
getCameraManagerInstance();
await getImageReceiverSurfaceId();
await getVideoReceiveSurface();
await getCameraSupportDevicesArray();
getCameraSupportDevicesArray();
console.info('beforeAll case');
})
......@@ -266,10 +266,9 @@ describe('CameraManagerTest', function () {
*/
it('SUB_MULTIMEDIA_CAMERA_GET_CAMERA_MANAGER_PROMISE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_GET_CAMERA_MANAGER_PROMISE_0100--------------");
let cameraManagerPromise = await cameraObj.getCameraManager(null);
let cameraManagerPromise = cameraObj.getCameraManager(null);
expect(isEmpty(cameraManagerPromise)).assertFalse();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_CAMERA_MANAGER_PROMISE_0100 cameraManagerPromise: " + JSON.stringify(cameraManagerPromise));
await sleep(1000);
done();
})
......@@ -287,7 +286,7 @@ describe('CameraManagerTest', function () {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_CAMERAS_PROMISE_0100 cameraManager == null || undefined")
expect().assertFail();
} else {
let mCameraDevicesArrayPromise = await mCameraManager.getSupportedCameras();
let mCameraDevicesArrayPromise = mCameraManager.getSupportedCameras();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_CAMERAS_PROMISE_0100: " + JSON.stringify(mCameraDevicesArrayPromise));
if (mCameraDevicesArrayPromise != null && mCameraDevicesArrayPromise.length > 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_CAMERAS_PROMISE_0100 success");
......@@ -331,8 +330,7 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_CALLBACK_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
await sleep(100);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_CALLBACK_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let previewProfilesArray = cameraOutputCap.previewProfiles;
......@@ -362,7 +360,6 @@ describe('CameraManagerTest', function () {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_CALLBACK_0100 PASSED camera:" + camerasArray[i].cameraId);
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_CALLBACK_0100 ends here");
await sleep(1000);
done();
})
......@@ -377,7 +374,7 @@ describe('CameraManagerTest', function () {
it('SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_PROMISE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_PROMISE_0100--------------");
for (let i = 0; i < mCameraDevicesArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(mCameraDevicesArray[i]);
let cameraOutputCap = getSupportedOutputCapability(mCameraDevicesArray[i]);
console.info("Entering SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_PROMISE_0100 camera:" + mCameraDevicesArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let previewProfilesArray = cameraOutputCap.previewProfiles;
......@@ -409,7 +406,6 @@ describe('CameraManagerTest', function () {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_PROMISE_0100 PASSED camera:" + mCameraDevicesArray[i].cameraId);
}
console.info("CameraUnitTest: Entering SUB_MULTIMEDIA_CAMERA_GET_SUPPORTED_CAMERA_OUTPUT_CAPABILITY_PROMISE_0100 ends here");
await sleep(1000);
done();
})
......@@ -425,7 +421,7 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_PREVIEW_PROFILES_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info("Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_PROFILES_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let previewProfilesArray = cameraOutputCap.previewProfiles;
......@@ -446,7 +442,6 @@ describe('CameraManagerTest', function () {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_PROFILES_0100 PASSED camera:" + camerasArray[i].cameraId);
}
await sleep(1000);
done();
})
......@@ -462,7 +457,7 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_PHOTO_PROFILES_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info("Entering SUB_MULTIMEDIA_CAMERA_PHOTO_PROFILES_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let photoProfilesArray = cameraOutputCap.photoProfiles;
......@@ -483,7 +478,6 @@ describe('CameraManagerTest', function () {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_PROFILES_0100 PASSED camera:" + camerasArray[i].cameraId);
}
await sleep(1000);
done();
})
......@@ -499,7 +493,7 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_VIDEO_PROFILES_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info("Entering SUB_MULTIMEDIA_CAMERA_VIDEO_PROFILES_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let videoProfilesArray = cameraOutputCap.videoProfiles;
......@@ -523,7 +517,6 @@ describe('CameraManagerTest', function () {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_VIDEO_PROFILES_0100 PASSED camera:" + camerasArray[i].cameraId);
}
await sleep(1000);
done();
})
......@@ -543,7 +536,7 @@ describe('CameraManagerTest', function () {
} else {
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraInputPromise = await mCameraManager.createCameraInput(camerasArray[i]);
let cameraInputPromise = mCameraManager.createCameraInput(camerasArray[i]);
if (isEmpty(cameraInputPromise)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_INPUT_PROMISE_0100 cameraInputPromise == null || undefined")
expect().assertFail();
......@@ -552,7 +545,6 @@ describe('CameraManagerTest', function () {
}
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_INPUT_PROMISE_0100 ends here");
await sleep(1000);
done();
})
......@@ -572,7 +564,7 @@ describe('CameraManagerTest', function () {
} else {
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraInputPromiseByType = await mCameraManager.createCameraInput(camerasArray[i].cameraPosition, camerasArray[i].cameraType);
let cameraInputPromiseByType = mCameraManager.createCameraInput(camerasArray[i].cameraPosition, camerasArray[i].cameraType);
if (isEmpty(cameraInputPromiseByType)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_INPUT_BY_POSITION_AND_TYPE_PROMISE_0100 cameraInputPromiseByType == null || undefined")
expect().assertFail();
......@@ -581,7 +573,6 @@ describe('CameraManagerTest', function () {
}
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_INPUT_BY_POSITION_AND_TYPE_PROMISE_0100 ends here");
await sleep(1000);
done();
})
......@@ -597,7 +588,7 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PREVIEW_OUTPUT_PROMISE_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info("SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PREVIEW_OUTPUT_PROMISE_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let previewProfilesArray = cameraOutputCap.previewProfiles;
......@@ -606,12 +597,11 @@ describe('CameraManagerTest', function () {
expect().assertFail();
} else {
for (let j = 0; j < previewProfilesArray.length; j++) {
let previewOutputPromise = await mCameraManager.createPreviewOutput(previewProfilesArray[j], globalThis.surfaceId);
let previewOutputPromise = mCameraManager.createPreviewOutput(previewProfilesArray[j], globalThis.surfaceId);
if (isEmpty(previewOutputPromise)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PREVIEW_OUTPUT_PROMISE_0100 previewOutputPromise == null || undefined")
expect().assertFail();
}
await sleep(100);
}
}
}
......@@ -635,7 +625,7 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PHOTO_OUTPUT_PROMISE_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info("SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PHOTO_OUTPUT_PROMISE_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let photoProfilesArray = cameraOutputCap.photoProfiles;
......@@ -644,19 +634,17 @@ describe('CameraManagerTest', function () {
expect().assertFail();
} else {
for (let j = 0; j < photoProfilesArray.length; j++) {
let photoOutputPromise = await mCameraManager.createPhotoOutput(photoProfilesArray[j], mPhotoSurface);
let photoOutputPromise = mCameraManager.createPhotoOutput(photoProfilesArray[j], mPhotoSurface);
if (isEmpty(photoOutputPromise)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PHOTO_OUTPUT_PROMISE_0100 photoOutputPromise == null || undefined")
expect().assertFail();
}
await sleep(100);
}
}
}
}
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_PHOTO_OUTPUT_PROMISE_0100 PASS");
await sleep(1000);
done();
})
......@@ -673,7 +661,7 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_VIDEO_OUTPUT_PROMISE_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info("SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_VIDEO_OUTPUT_PROMISE_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let videoProfilesArray = cameraOutputCap.videoProfiles;
......@@ -682,7 +670,7 @@ describe('CameraManagerTest', function () {
expect().assertFail();
} else {
for (let j = 0; j < videoProfilesArray.length; j++) {
let videoOutputPromise = await mCameraManager.createVideoOutput(videoProfilesArray[j], mVideoSurface);
let videoOutputPromise = mCameraManager.createVideoOutput(videoProfilesArray[j], mVideoSurface);
if (isEmpty(videoOutputPromise)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_VIDEO_OUTPUT_PROMISE_0100 videoOutputPromise == null || undefined")
expect().assertFail();
......@@ -690,14 +678,12 @@ describe('CameraManagerTest', function () {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_VIDEO_OUTPUT_CALLBACK_0100 videoOutputPromise = " + videoOutputPromise);
break;
}
await sleep(100);
}
}
}
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_VIDEO_OUTPUT_PROMISE_0100 PASS");
await sleep(1000);
done();
})
......@@ -713,26 +699,24 @@ describe('CameraManagerTest', function () {
console.info("--------------SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_METADATA_OUTPUT_PROMISE_0100--------------");
let camerasArray = mCameraDevicesArray;
for (let i = 0; i < camerasArray.length; i++) {
let cameraOutputCap = await getSupportedOutputCapability(camerasArray[i]);
let cameraOutputCap = getSupportedOutputCapability(camerasArray[i]);
console.info("SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_METADATA_OUTPUT_PROMISE_0100 camera:" + camerasArray[i].cameraId);
if (!isEmpty(cameraOutputCap)) {
let metadataObjectTypeArray = cameraOutputCap.supportedMetadataObjectTypes;
if (!isEmpty(metadataObjectTypeArray)) {
let metadataOutputPromise = await mCameraManager.createMetadataOutput(metadataObjectTypeArray);
let metadataOutputPromise = mCameraManager.createMetadataOutput(metadataObjectTypeArray);
if (isEmpty(metadataOutputPromise)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_METADATA_OUTPUT_PROMISE_0100 metadataOutputPromise == null || undefined")
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_METADATA_OUTPUT_PROMISE_0100 metadataOutputPromise = " + metadataOutputPromise)
}
await sleep(100);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_METADATA_OUTPUT_PROMISE_0100 metadataObjectTypeArray == null || undefined")
}
}
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_METADATA_OUTPUT_PROMISE_0100 PASS");
await sleep(1000);
done();
})
......@@ -746,13 +730,12 @@ describe('CameraManagerTest', function () {
*/
it('SUB_MULTIMEDIA_CAMERA_CREATE_CAPTURE_SESSION_PROMISE_0100', 2, async function (done) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAPTURE_SESSION_PROMISE_0100 to operate");
let captureSessionPromise = await mCameraManager.createCaptureSession();
let captureSessionPromise = mCameraManager.createCaptureSession();
if (isEmpty(captureSessionPromise)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAPTURE_SESSION_PROMISE_0100 captureSessionPromise == null || undefined")
expect().assertFail();
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAPTURE_SESSION_PROMISE_0100 PASSED");
await sleep(1000);
await captureSessionPromise.release();
done();
})
......@@ -779,7 +762,6 @@ describe('CameraManagerTest', function () {
console.log(TAG + "isCameraMuted has failed for " + err.message);
expect().assertFail();
}
await sleep(1000);
done();
})
......
......@@ -171,10 +171,10 @@ export default function cameraSessionTest() {
console.log(TAG + 'Exit releaseVideoReceiveSurface')
}
async function getCameraManagerInstance() {
function getCameraManagerInstance() {
console.info('Enter getCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -185,26 +185,9 @@ export default function cameraSessionTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
if (!err) {
if (data != null || data != undefined) {
mCameraDevicesArray = data;
console.info(TAG + "Entering getCameraSupportDevicesArray PASSED with CameraDevicesArray is: " + data);
} else {
console.info(TAG + "Entering getCameraSupportDevicesArray FAILED with CameraDevicesArray is: " + data);
}
} else {
console.info(TAG + "Entering getCameraSupportDevicesArray FAILED : " + err.message);
}
})
await sleep(3000);
*/
mCameraDevicesArray = mCameraManager.getSupportedCameras();
if (isEmpty(mCameraDevicesArray)) {
console.info(TAG + "getSupportedCameras FAILED");
return false;
......@@ -220,39 +203,11 @@ export default function cameraSessionTest() {
return true;
}
async function beginCameraSessionConfig() {
console.info('Enter beginCameraSessionConfig');
mCameraSession.beginConfig();
console.info('Exit beginCameraSessionConfig');
return true;
}
async function commitCameraSessionConfig() {
console.info('Enter commitCameraSessionConfig');
mCameraSession.commitConfig(async (err) => {
if (!err) {
console.info(TAG + "Entering commitConfig PASSED");
} else {
console.info(TAG + "Entering commitConfig FAILED : " + err.message);
}
})
await sleep(500);
console.info('Exit commitCameraSessionConfig');
return true;
}
async function createCameraSessionInstance() {
function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
try {
mCameraSession = await mCameraManager.createCaptureSession();
mCameraSession = mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
......@@ -263,7 +218,7 @@ export default function cameraSessionTest() {
return false;
}
await beginCameraSessionConfig();
// mCameraSession.beginConfig();
console.info('Exit createCameraSessionInstance');
......@@ -282,16 +237,9 @@ export default function cameraSessionTest() {
return false;
}
mCameraInput = mCameraManager.createCameraInput(mCameraDevicesArray[idx]);
mCameraInput = mCameraManager.createCameraInput(mCameraDevicesArray[idx]);
mCameraInput.open(async (err) => {
console.info(TAG + "Entering mCameraInput open callback");
if (!err) {
console.info(TAG + "Entering mCameraInput open PASSED ");
} else {
console.info(TAG + "Entering mCameraInput open FAILED : " + err.message);
}
})
await mCameraInput.open();
await sleep(100);
......@@ -314,7 +262,7 @@ export default function cameraSessionTest() {
return true;
}
async function createOutput(idx:any) {
function createOutput(idx:any) {
console.info('Enter createOutput');
let cameraOutputCap = mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
......@@ -323,7 +271,7 @@ export default function cameraSessionTest() {
if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
mPreviewOutput = mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
......@@ -340,7 +288,7 @@ export default function cameraSessionTest() {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) {
mPhotoOutput = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
mPhotoOutput = mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
if (!isEmpty(mPhotoOutput)) {
break;
}
......@@ -352,12 +300,12 @@ export default function cameraSessionTest() {
console.info(TAG + "createPhotoOutput: " + mPhotoOutput);
}
/*
if (!isEmpty(cameraOutputCap.videoProfiles)) {
console.info(TAG + "cameraOutputCap.videoProfiles.length: " + cameraOutputCap.videoProfiles.length);
for (let i = 0; i < cameraOutputCap.videoProfiles.length; i++) {
try {
mVideoOutput = await mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface);
mVideoOutput = mCameraManager.createVideoOutput(cameraOutputCap.videoProfiles[i], mVideoSurface);
if (!isEmpty(mVideoOutput)) {
break;
}
......@@ -373,7 +321,7 @@ export default function cameraSessionTest() {
console.info(TAG + "createVideoOutput: " + mVideoOutput);
}
*/
}
console.info('Exit createOutputs');
......@@ -385,7 +333,6 @@ export default function cameraSessionTest() {
console.info('Enter releaseOutput');
if (!isEmpty(mPreviewOutput)) {
await mPreviewOutput.stop();
await mPreviewOutput.release();
}
......@@ -406,23 +353,23 @@ export default function cameraSessionTest() {
console.info(TAG + "Enter startCameraSession");
await createInput(idx);
await createOutput(idx);
createOutput(idx);
await sleep(1);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutput);
mCameraSession.addOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -432,7 +379,7 @@ export default function cameraSessionTest() {
*/
await sleep(100);
await commitCameraSessionConfig();
await mCameraSession.commitConfig();
await sleep(100);
......@@ -455,6 +402,9 @@ export default function cameraSessionTest() {
async function stopCameraSession() {
console.info(TAG + "Enter stopCameraSession");
mCameraSession.beginConfig();
/*
mCameraSession.stop(async (err) => {
console.info(TAG + "Entering mCameraSession stop callback");
......@@ -470,17 +420,17 @@ export default function cameraSessionTest() {
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to removeInput input");
await mCameraSession.removeInput(mCameraInput);
mCameraSession.removeInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
mCameraSession.removeOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutput);
mCameraSession.removeOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -503,9 +453,9 @@ export default function cameraSessionTest() {
sleep(100);
await getPhotoReceiverSurface();
await getVideoReceiveSurface();
await getCameraManagerInstance();
await getCameraSupportDevicesArray();
await createCameraSessionInstance();
getCameraManagerInstance();
getCameraSupportDevicesArray();
createCameraSessionInstance();
console.info('Device type = ' + deviceInfo.deviceType);
......@@ -530,109 +480,27 @@ export default function cameraSessionTest() {
console.info('afterAll case');
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100
* @tc.name : Check capture session begin and commit config with promise or not
* @tc.desc : Check capture session begin and commit config with promise or not
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100--------------");
if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100 FAILED with NoCamera");
expect().assertFail();
done();
}
else {
await createInput(0);
await createOutput(0);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
}
await sleep(500);
try {
await mCameraSession.commitConfig();
} catch {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100 commitConfig with a error");
expect().assertFail();
}
try {
await mCameraSession.beginConfig();
} catch {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100 beginConfig with a error");
expect().assertFail();
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100 PASSED");
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to removeInput");
await mCameraSession.removeInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
}
await releaseInput();
await releaseOutput();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_CONFIG_PROMISE_0100 ends here");
done();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100
* @tc.name : Check capture session begin config duplicated with promise or not
* @tc.desc : Check capture session begin config duplicated with promise or not
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_0100
* @tc.name : Check capture session begin config
* @tc.desc : Check capture session begin config
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100--------------");
it('SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_0100--------------");
if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100 FAILED with NoCamera");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_0100 FAILED with NoCamera");
expect().assertFail();
done();
}
else {
try {
mCameraSession.beginConfig();
} catch(error) {
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100 with a error, ingore it");
}
try {
mCameraSession.beginConfig();
} catch(error) {
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100 with a error, ingore it");
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100 PASSED");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_DUPLICATED_PROMISE_0100 ends here");
mCameraSession.beginConfig();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_BEGIN_CONFIG_0100 PASSED");
done();
}
})
......@@ -640,88 +508,43 @@ export default function cameraSessionTest() {
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100
* @tc.name : Check capture session begin config duplicated with promise or not
* @tc.desc : Check capture session begin config duplicated with promise or not
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_0100
* @tc.name : Check capture session commit config
* @tc.desc : Check capture session commit config
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100--------------");
it('SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_0100--------------");
if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100 FAILED with NoCamera");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_0100 FAILED with NoCamera");
expect().assertFail();
done();
}
else {
try {
await mCameraSession.commitConfig();
} catch(error) {
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100 with a error, ingore it");
await createInput(0);
createOutput(0);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
mCameraSession.addInput(mCameraInput);
}
try {
await mCameraSession.commitConfig();
} catch(error) {
expect().assertFail();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100 with a error, ingore it");
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100 PASSED");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_DUPLICATED_PROMISE_0100 ends here");
done();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100
* @tc.name : Check capture session start/stop/release output with promise or not
* @tc.desc : Check capture session start/stop/release output with promise or not
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 0
*/
it('SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100', 0, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100--------------");
if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 FAILED with NoCamera");
expect().assertFail();
done();
}
else {
for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start for camera[" + i + "]");
await startCameraSession(i);
if (!isEmpty(mPreviewOutput)) {
await mCameraSession.start();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start PASSED");
await sleep(2000);
await mCameraSession.stop();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 stop PASSED");
await sleep(500);
await mCameraSession.release();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 release PASSED");
await sleep(500);
}
await beginCameraSessionConfig();
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 end for camera[" + i + "]");
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
mCameraSession.addOutput(mPreviewOutput);
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 ends here");
done();
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to addOutput mPhotoOutput");
mCameraSession.addOutput(mPhotoOutput);
}
await mCameraSession.commitConfig();
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_COMMIT_CONFIG_0100 PASSED");
done();
}
})
......@@ -737,7 +560,6 @@ export default function cameraSessionTest() {
*/
it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_PROMISE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_PROMISE_0100--------------");
if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_PROMISE_0100 FAILED with NoCamera");
expect().assertFail();
......@@ -748,31 +570,13 @@ export default function cameraSessionTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_PROMISE_0100 start for camera[" + i + "]");
await createInput(i);
await createOutput(i);
if (!isEmpty(mPreviewOutput) && !isEmpty(mPhotoOutput)) {
await mCameraSession.addInput(mCameraInput);
await mCameraSession.addOutput(mPreviewOutput);
await mCameraSession.addOutput(mPhotoOutput);
await sleep(500);
await commitCameraSessionConfig();
await sleep(1);
await beginCameraSessionConfig();
await sleep(1);
await mCameraSession.removeInput(mCameraInput);
await mCameraSession.removeOutput(mPreviewOutput);
await mCameraSession.removeOutput(mPhotoOutput);
await sleep(500);
}
mCameraSession.addInput(mCameraInput);
mCameraSession.removeInput(mCameraInput);
await releaseInput();
await releaseOutput();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_PROMISE_0100 end for camera[" + i + "]");
}
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_INPUT_PROMISE_0100 ends here");
done();
}
......@@ -797,164 +601,63 @@ export default function cameraSessionTest() {
done();
}
else {
await createInput(0);
await createOutput(0);
createOutput(0);
if (!isEmpty(mPreviewOutput) && !isEmpty(mPhotoOutput)) {
await mCameraSession.addOutput(mPreviewOutput);
await mCameraSession.addOutput(mPhotoOutput);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0100 add PASSED");
await mCameraSession.addInput(mCameraInput);
await sleep(500);
await commitCameraSessionConfig();
await sleep(1);
await beginCameraSessionConfig();
await sleep(1);
await sleep(500);
await mCameraSession.removeOutput(mPreviewOutput);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0100 remove PASSED");
await mCameraSession.removeOutput(mPhotoOutput);
await mCameraSession.removeInput(mCameraInput);
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0100 FAILED");
expect().assertFail();
}
mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPhotoOutput);
mCameraSession.addOutput(mVideoOutput);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0100 add PASSED");
await releaseInput();
mCameraSession.removeOutput(mPreviewOutput);
mCameraSession.removeOutput(mPhotoOutput);
mCameraSession.removeOutput(mVideoOutput);
await releaseOutput();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0100 ends here");
done();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101
* @tc.name : Check capture session can add/remove output with promise or not for photo
* @tc.desc : Check capture session can add/remove output with promise or not for photo
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100
* @tc.name : Check capture session start/stop/release output with promise or not
* @tc.desc : Check capture session start/stop/release output with promise or not
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
* @tc.level : Level 0
*/
it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101--------------");
it('SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100', 0, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100--------------");
if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 FAILED with NoCamera");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 FAILED with NoCamera");
expect().assertFail();
done();
}
else {
await createInput(0);
await createOutput(0);
if (!isEmpty(mPhotoOutput)) {
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
}
await mCameraSession.addOutput(mPhotoOutput);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 add PASSED");
await mCameraSession.addInput(mCameraInput);
await sleep(500);
await commitCameraSessionConfig();
await sleep(1);
await beginCameraSessionConfig();
await sleep(1);
await sleep(500);
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
}
await mCameraSession.removeOutput(mPhotoOutput);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 remove PASSED");
await mCameraSession.removeInput(mCameraInput);
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 FAILED");
expect().assertFail();
}
await releaseInput();
await releaseOutput();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0101 ends here");
done();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102
* @tc.name : Check capture session can add/remove output with promise or not for video
* @tc.desc : Check capture session can add/remove output with promise or not for video
* @tc.size : MEDIUM
* @tc.type : Function
* @tc.level : Level 2
*/
it('SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102--------------");
for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start for camera[" + i + "]");
await startCameraSession(i);
if (mCameraNum == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED with NoCamera");
expect().assertFail();
done();
}
else {
await createInput(0);
await createOutput(0);
await mCameraSession.start();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 start PASSED");
await sleep(2000);
if (!isEmpty(mVideoOutput)) {
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
}
await mCameraSession.addOutput(mVideoOutput);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 PASSED");
await mCameraSession.addInput(mCameraInput);
await mCameraSession.stop();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 stop PASSED");
await sleep(500);
await commitCameraSessionConfig();
await sleep(1);
await beginCameraSessionConfig();
await sleep(1);
await mCameraSession.release();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 release PASSED");
await sleep(500);
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
}
await sleep(100);
await mCameraSession.removeOutput(mVideoOutput);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 remove PASSED");
await mCameraSession.removeInput(mCameraInput);
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 FAILED");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 end for camera[" + i + "]");
}
await releaseInput();
await releaseOutput();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_ADD_REMOVE_OUTPUT_PROMISE_0102 ends here");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_START_STOP_RELEASE_PROMISE_0100 ends here");
done();
}
})
/**
* @tc.number : SUB_MULTIMEDIA_CAMERA_SESSION_RELEASE_PROMISE_0100
* @tc.name : Check capture session release with promise or not
......@@ -966,11 +669,9 @@ export default function cameraSessionTest() {
it('SUB_MULTIMEDIA_CAMERA_SESSION_RELEASE_PROMISE_0100', 2, async function (done) {
console.info("--------------SUB_MULTIMEDIA_CAMERA_SESSION_RELEASE_PROMISE_0100--------------");
await mCameraSession.release()
await sleep(500);
await mCameraSession.release();
await createCameraSessionInstance();
await sleep(500);
// createCameraSessionInstance();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_RELEASE_PROMISE_0100 ends here");
done();
......
......@@ -226,10 +226,10 @@ export default function cameraSessionExposureTest() {
console.log(TAG + 'Exit releaseVideoReceiveSurface')
}
async function getCameraManagerInstance() {
function getCameraManagerInstance() {
console.info('Enter getCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -240,10 +240,10 @@ export default function cameraSessionExposureTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
mCameraDevicesArray = mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
......@@ -280,41 +280,11 @@ export default function cameraSessionExposureTest() {
return true;
}
async function beginCameraSessionConfig() {
console.info('Enter beginCameraSessionConfig');
mCameraSession.beginConfig();
await sleep(30);
console.info('Exit beginCameraSessionConfig');
return true;
}
async function commitCameraSessionConfig() {
console.info('Enter commitCameraSessionConfig');
mCameraSession.commitConfig(async (err) => {
if (!err) {
console.info(TAG + "Entering commitConfig PASSED");
} else {
console.info(TAG + "Entering commitConfig FAILED : " + err.message);
}
})
await sleep(500);
console.info('Exit commitCameraSessionConfig');
return true;
}
async function createCameraSessionInstance() {
function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
try {
mCameraSession = await mCameraManager.createCaptureSession();
mCameraSession = mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
......@@ -325,7 +295,7 @@ export default function cameraSessionExposureTest() {
return false;
}
await beginCameraSessionConfig();
mCameraSession.beginConfig();
console.info('Exit createCameraSessionInstance');
......@@ -351,14 +321,7 @@ export default function cameraSessionExposureTest() {
return false;
}
mCameraInput.open(async (err) => {
console.info(TAG + "Entering mCameraInput open callback");
if (!err) {
console.info(TAG + "Entering mCameraInput open PASSED ");
} else {
console.info(TAG + "Entering mCameraInput open FAILED : " + err.message);
}
})
await mCameraInput.open();
await sleep(100);
......@@ -381,7 +344,7 @@ export default function cameraSessionExposureTest() {
return true;
}
async function createOutput(idx:any) {
function createOutput(idx:any) {
console.info('Enter createOutput');
let cameraOutputCap = mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
......@@ -390,7 +353,7 @@ export default function cameraSessionExposureTest() {
if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
mPreviewOutput = mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
......@@ -407,7 +370,7 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) {
mPhotoOutput = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
mPhotoOutput = mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
if (!isEmpty(mPhotoOutput)) {
break;
}
......@@ -452,7 +415,6 @@ export default function cameraSessionExposureTest() {
console.info('Enter releaseOutput');
if (!isEmpty(mPreviewOutput)) {
await mPreviewOutput.stop();
await mPreviewOutput.release();
}
......@@ -474,23 +436,23 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Enter startCameraSession");
await createInput(idx);
await createOutput(idx);
createOutput(idx);
await sleep(1);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutput);
mCameraSession.addOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -500,8 +462,7 @@ export default function cameraSessionExposureTest() {
*/
await sleep(1);
await commitCameraSessionConfig();
await beginCameraSessionConfig();
await mCameraSession.commitConfig();
/*
await mCameraSession.start(async (err) => {
......@@ -522,6 +483,9 @@ export default function cameraSessionExposureTest() {
async function stopCameraSession() {
console.info(TAG + "Enter stopCameraSession");
mCameraSession.beginConfig();
/*
mCameraSession.stop(async (err) => {
console.info(TAG + "Entering mCameraSession stop callback");
......@@ -537,17 +501,17 @@ export default function cameraSessionExposureTest() {
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to removeInput input");
await mCameraSession.removeInput(mCameraInput);
mCameraSession.removeInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
mCameraSession.removeOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutput);
mCameraSession.removeOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -570,9 +534,9 @@ export default function cameraSessionExposureTest() {
sleep(100);
await getPhotoReceiverSurface();
await getVideoReceiveSurface();
await getCameraManagerInstance();
await getCameraSupportDevicesArray();
await createCameraSessionInstance();
getCameraManagerInstance();
getCameraSupportDevicesArray();
createCameraSessionInstance();
console.info('Device type = ' + deviceInfo.deviceType);
......@@ -618,16 +582,14 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
let isExposureModeSupported = await mCameraSession.isExposureModeSupported(cameraObj.ExposureMode.EXPOSURE_MODE_LOCKED);
let isExposureModeSupported = mCameraSession.isExposureModeSupported(cameraObj.ExposureMode.EXPOSURE_MODE_LOCKED);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0100 finish");
if (isExposureModeSupported != null || isExposureModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0100 PASSED with isExposureModeSupported is: " + isExposureModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0100 FAILED with isExposureModeSupported is: " + isExposureModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -663,12 +625,10 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
if (mIsExposureModeSupportedArray[i] == true) {
await mCameraSession.setExposureMode(cameraObj.ExposureMode.EXPOSURE_MODE_LOCKED);
mCameraSession.setExposureMode(cameraObj.ExposureMode.EXPOSURE_MODE_LOCKED);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 PASSED with ExposureMode is: " + cameraObj.ExposureMode.EXPOSURE_MODE_LOCKED);
await sleep(500);
let exposureMode = await mCameraSession.getExposureMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 PASSED with ExposureMode is: " + cameraObj.ExposureMode.EXPOSURE_MODE_LOCKED);
let exposureMode = mCameraSession.getExposureMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 finish");
if (exposureMode == cameraObj.ExposureMode.EXPOSURE_MODE_LOCKED) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 PASSED with ExposureMode is: " + exposureMode);
......@@ -676,7 +636,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 FAILED with ExposureMode is: " + exposureMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0100 not support");
}
......@@ -714,16 +673,14 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
let isExposureModeSupported = await mCameraSession.isExposureModeSupported(cameraObj.ExposureMode.EXPOSURE_MODE_AUTO);
let isExposureModeSupported = mCameraSession.isExposureModeSupported(cameraObj.ExposureMode.EXPOSURE_MODE_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0101 finish");
if (isExposureModeSupported != null || isExposureModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0101 PASSED with isExposureModeSupported is: " + isExposureModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0101 FAILED with isExposureModeSupported is: " + isExposureModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -759,12 +716,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
if (mIsExposureModeSupportedArray[i] == true) {
await mCameraSession.setExposureMode(cameraObj.ExposureMode.EXPOSURE_MODE_AUTO);
mCameraSession.setExposureMode(cameraObj.ExposureMode.EXPOSURE_MODE_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 PASSED with ExposureMode is: " + cameraObj.ExposureMode.EXPOSURE_MODE_AUTO);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 PASSED with ExposureMode is: " + cameraObj.ExposureMode.EXPOSURE_MODE_AUTO);
let exposureMode = await mCameraSession.getExposureMode();
let exposureMode = mCameraSession.getExposureMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 finish");
if (exposureMode == cameraObj.ExposureMode.EXPOSURE_MODE_AUTO) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 PASSED with ExposureMode is: " + exposureMode);
......@@ -772,7 +728,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 FAILED with ExposureMode is: " + exposureMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0101 not support");
}
......@@ -810,16 +765,14 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
let isExposureModeSupported = await mCameraSession.isExposureModeSupported(cameraObj.ExposureMode.EXPOSURE_MODE_CONTINUOUS_AUTO);
let isExposureModeSupported = mCameraSession.isExposureModeSupported(cameraObj.ExposureMode.EXPOSURE_MODE_CONTINUOUS_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0102 finish");
if (isExposureModeSupported != null || isExposureModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0102 PASSED with isExposureModeSupported is: " + isExposureModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_EXPOSURE_MODE_SUPPORT_PROMISE_0102 FAILED with isExposureModeSupported is: " + isExposureModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -855,12 +808,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
if (mIsExposureModeSupportedArray[i] == true) {
await mCameraSession.setExposureMode(cameraObj.ExposureMode.EXPOSURE_MODE_CONTINUOUS_AUTO);
mCameraSession.setExposureMode(cameraObj.ExposureMode.EXPOSURE_MODE_CONTINUOUS_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 PASSED with ExposureMode is: " + cameraObj.ExposureMode.EXPOSURE_MODE_CONTINUOUS_AUTO);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 PASSED with ExposureMode is: " + cameraObj.ExposureMode.EXPOSURE_MODE_CONTINUOUS_AUTO);
let exposureMode = await mCameraSession.getExposureMode();
let exposureMode = mCameraSession.getExposureMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 finish");
if (exposureMode == cameraObj.ExposureMode.EXPOSURE_MODE_CONTINUOUS_AUTO) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 PASSED with ExposureMode is: " + exposureMode);
......@@ -868,7 +820,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 FAILED with ExposureMode is: " + exposureMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_MODE_PROMISE_0102 not support");
}
......@@ -906,12 +857,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPoint);
mCameraSession.setMeteringPoint(mMETERINGPoint);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0100 PASSED with METERINGPoint is: " + mMETERINGPoint.x + ", " + mMETERINGPoint.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0100 PASSED with METERINGPoint is: " + mMETERINGPoint.x + ", " + mMETERINGPoint.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0100 finish");
if ((METERINGPoint.x == mMETERINGPoint.x) && (METERINGPoint.y == mMETERINGPoint.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0100 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -919,10 +869,7 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0100 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0100 end for camera[" + i + "]");
}
......@@ -954,12 +901,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointLT);
mCameraSession.setMeteringPoint(mMETERINGPointLT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 PASSED with METERINGPoint is: " + mMETERINGPointLT.x + ", " + mMETERINGPointLT.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 PASSED with METERINGPoint is: " + mMETERINGPointLT.x + ", " + mMETERINGPointLT.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 finish");
if ((METERINGPoint.x == mMETERINGPointLT.x) && (METERINGPoint.y == mMETERINGPointLT.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -967,7 +913,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0101 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1002,12 +947,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointRT);
mCameraSession.setMeteringPoint(mMETERINGPointRT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0102 PASSED with METERINGPoint is: " + mMETERINGPointRT.x + ", " + mMETERINGPointRT.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0102 PASSED with METERINGPoint is: " + mMETERINGPointRT.x + ", " + mMETERINGPointRT.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0102 finish");
if ((METERINGPoint.x == mMETERINGPointRT.x) && (METERINGPoint.y == mMETERINGPointRT.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0102 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -1015,7 +959,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0102 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1049,12 +992,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointLB);
mCameraSession.setMeteringPoint(mMETERINGPointLB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0103 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0103 PASSED with METERINGPoint is: " + mMETERINGPointLB.x + ", " + mMETERINGPointRB.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0103 PASSED with METERINGPoint is: " + mMETERINGPointLB.x + ", " + mMETERINGPointRB.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0103 finish");
if ((METERINGPoint.x == mMETERINGPointLB.x) && (METERINGPoint.y == mMETERINGPointLB.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0103 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -1062,7 +1004,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0103 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1097,12 +1038,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointRB);
mCameraSession.setMeteringPoint(mMETERINGPointRB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0104 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0104 PASSED with METERINGPoint is: " + mMETERINGPointRB.x + ", " + mMETERINGPointRB.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0104 PASSED with METERINGPoint is: " + mMETERINGPointRB.x + ", " + mMETERINGPointRB.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0104 finish");
if ((METERINGPoint.x == mMETERINGPointRB.x) && (METERINGPoint.y == mMETERINGPointRB.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0104 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -1110,9 +1050,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0104 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0104 end for camera[" + i + "]");
......@@ -1146,12 +1083,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointInvalidLT);
mCameraSession.setMeteringPoint(mMETERINGPointInvalidLT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0105 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0105 PASSED with METERINGPoint is: " + mMETERINGPointInvalidLT.x + ", " + mMETERINGPointInvalidLT.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0105 PASSED with METERINGPoint is: " + mMETERINGPointInvalidLT.x + ", " + mMETERINGPointInvalidLT.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0105 finish");
if (((METERINGPoint.x != mMETERINGPointInvalidLT.x) && (METERINGPoint.y != mMETERINGPointInvalidLT.y)) || (mEnableCheckInvalidMETERINGPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0105 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -1159,7 +1095,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0105 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1194,12 +1129,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointInvalidRT);
mCameraSession.setMeteringPoint(mMETERINGPointInvalidRT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0106 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0106 PASSED with METERINGPoint is: " + mMETERINGPointInvalidRT.x + ", " + mMETERINGPointInvalidRT.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0106 PASSED with METERINGPoint is: " + mMETERINGPointInvalidRT.x + ", " + mMETERINGPointInvalidRT.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0106 finish");
if (((METERINGPoint.x != mMETERINGPointInvalidRT.x) && (METERINGPoint.y != mMETERINGPointInvalidRT.y)) || (mEnableCheckInvalidMETERINGPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0106 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -1207,7 +1141,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0106 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1242,12 +1175,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointInvalidLB);
mCameraSession.setMeteringPoint(mMETERINGPointInvalidLB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0107 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0107 PASSED with METERINGPoint is: " + mMETERINGPointInvalidLB.x + ", " + mMETERINGPointInvalidRB.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0107 PASSED with METERINGPoint is: " + mMETERINGPointInvalidLB.x + ", " + mMETERINGPointInvalidRB.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0107 finish");
if (((METERINGPoint.x != mMETERINGPointInvalidLB.x) && (METERINGPoint.y != mMETERINGPointInvalidLB.y)) || (mEnableCheckInvalidMETERINGPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0107 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -1255,7 +1187,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0107 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1289,12 +1220,11 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
await mCameraSession.setMeteringPoint(mMETERINGPointInvalidRB);
mCameraSession.setMeteringPoint(mMETERINGPointInvalidRB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0108 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0108 PASSED with METERINGPoint is: " + mMETERINGPointInvalidRB.x + ", " + mMETERINGPointInvalidRB.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0108 PASSED with METERINGPoint is: " + mMETERINGPointInvalidRB.x + ", " + mMETERINGPointInvalidRB.y);
let METERINGPoint = await mCameraSession.getMeteringPoint();
let METERINGPoint = mCameraSession.getMeteringPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0108 finish");
if (((METERINGPoint.x != mMETERINGPointInvalidRB.x) && (METERINGPoint.y != mMETERINGPointInvalidRB.y)) || (mEnableCheckInvalidMETERINGPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0108 PASSED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
......@@ -1302,7 +1232,6 @@ export default function cameraSessionExposureTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_METERING_POINT_PROMISE_0108 FAILED with METERINGPoint is: " + METERINGPoint.x + ", " + METERINGPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1337,7 +1266,10 @@ export default function cameraSessionExposureTest() {
await startCameraSession(i);
let exposureBiasRange = await mCameraSession.getExposureBiasRange();
let exposureBiasRange = mCameraSession.getExposureBiasRange();
mExposureBiasRangeArray[i] = exposureBiasRange;
mExposureBiasMaxArray[i] = exposureBiasRange[exposureBiasRange.length -1];
mExposureBiasMinArray[i] = exposureBiasRange[0];
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_GET_EXPOSURE_BIAS_RANGE_PROMISE_0100 finish");
if (exposureBiasRange.length > 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_GET_EXPOSURE_BIAS_RANGE_PROMISE_0100 PASSED with ExposureBiasRange length is: " + exposureBiasRange.length);
......@@ -1349,8 +1281,6 @@ export default function cameraSessionExposureTest() {
for (let j = 0; j < exposureBiasRange.length; j++) {
console.info(TAG + j + "th, exposure bias is: " + exposureBiasRange[j]);
}
await sleep(500);
await stopCameraSession();
......@@ -1382,26 +1312,25 @@ export default function cameraSessionExposureTest() {
} else {
for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 start for camera[" + i + "]");
await startCameraSession(i);
await mCameraSession.setExposureBias(mExposureBiasRangeArray[i][0]);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 PASSED with ExposureBias is: " + mExposureBiasRangeArray[i][0]);
await sleep(500);
let exposureValue = await mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 finish");
if (exposureValue == mExposureBiasRangeArray[i][0]) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 PASSED with ExposureValue is: " + exposureValue);
let exposureBias = mExposureBiasRangeArray[i][0];
if (exposureBias == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 exposureBias is 0");
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
await startCameraSession(i);
mCameraSession.setExposureBias(exposureBias);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 PASSED with ExposureBias is: " + mExposureBiasRangeArray[i][0]);
let exposureValue = mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 finish");
if (exposureValue == mExposureBiasRangeArray[i][0]) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 PASSED with ExposureValue is: " + exposureValue);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
}
await stopCameraSession();
}
await sleep(500);
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0100 end for camera[" + i + "]");
}
......@@ -1430,26 +1359,27 @@ export default function cameraSessionExposureTest() {
} else {
for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 start for camera[" + i + "]");
await startCameraSession(i);
await mCameraSession.setExposureBias(mExposureBiasMinArray[i] - 1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 PASSED with ExposureBias is: " + (mExposureBiasMinArray[i] - 1));
await sleep(500);
let exposureValue = await mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 finish");
if (exposureValue != (mExposureBiasMinArray[i] - 1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 PASSED with ExposureValue is: " + exposureValue);
let exposureBias =mExposureBiasMinArray[i];
if (exposureBias == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 exposureBias is 0");
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
await startCameraSession(i);
mCameraSession.setExposureBias(exposureBias - 1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 PASSED with ExposureBias is: " + (mExposureBiasMinArray[i] - 1));
let exposureValue = mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 finish");
if (exposureValue != (exposureBias - 1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 PASSED with ExposureValue is: " + exposureValue);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
}
await sleep(500);
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0101 end for camera[" + i + "]");
}
......@@ -1478,26 +1408,24 @@ export default function cameraSessionExposureTest() {
} else {
for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 start for camera[" + i + "]");
await startCameraSession(i);
await mCameraSession.setExposureBias(mExposureBiasMinArray[i] - 0.1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 PASSED with ExposureBias is: " + (mExposureBiasMinArray[i] - 0.1));
await sleep(500);
let exposureValue = await mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 finish");
if (exposureValue != (mExposureBiasMinArray[i] - 0.1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 PASSED with ExposureValue is: " + exposureValue);
let exposureBias =mExposureBiasMinArray[i];
if (exposureBias == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 exposureBias is 0");
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
await startCameraSession(i);
mCameraSession.setExposureBias(exposureBias - 0.1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 PASSED with ExposureBias is: " + (mExposureBiasMinArray[i] - 0.1));
let exposureValue = mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 finish");
if (exposureValue != (exposureBias - 0.1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 PASSED with ExposureValue is: " + exposureValue);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
}
await stopCameraSession();
}
await sleep(500);
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0102 end for camera[" + i + "]");
}
......@@ -1526,25 +1454,28 @@ export default function cameraSessionExposureTest() {
} else {
for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 start for camera[" + i + "]");
let exposureBias = mExposureBiasMaxArray[i];
if (exposureBias == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 exposureBias is 0");
} else {
await startCameraSession(i);
await startCameraSession(i);
mCameraSession.setExposureBias(exposureBias + 1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 PASSED with ExposureBias is: " + (mExposureBiasMaxArray[i] + 1));
await mCameraSession.setExposureBias(mExposureBiasMaxArray[i] + 1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 PASSED with ExposureBias is: " + (mExposureBiasMaxArray[i] + 1));
await sleep(500);
let exposureValue = await mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 finish");
if (exposureValue != (mExposureBiasMaxArray[i] + 1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 PASSED with ExposureValue is: " + exposureValue);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
let exposureValue = mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 finish");
if (exposureValue != (exposureBias + 1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 PASSED with ExposureValue is: " + exposureValue);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
}
await stopCameraSession();
}
await sleep(500);
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0103 end for camera[" + i + "]");
}
......@@ -1573,25 +1504,28 @@ export default function cameraSessionExposureTest() {
} else {
for (let i = 0; i < mCameraNum; i++) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 start for camera[" + i + "]");
let exposureBias = mExposureBiasMaxArray[i];
if (exposureBias == 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 exposureBias is 0");
} else {
await startCameraSession(i);
await startCameraSession(i);
mCameraSession.setExposureBias(exposureBias + 0.1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 PASSED with ExposureBias is: " + (mExposureBiasMaxArray[i] + 0.1));
await mCameraSession.setExposureBias(mExposureBiasMaxArray[i] + 0.1);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 PASSED with ExposureBias is: " + (mExposureBiasMaxArray[i] + 0.1));
await sleep(500);
let exposureValue = await mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 finish");
if (exposureValue != (mExposureBiasMaxArray[i] + 0.1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 PASSED with ExposureValue is: " + exposureValue);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
let exposureValue = mCameraSession.getExposureValue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 finish");
if (exposureValue != (exposureBias + 0.1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 PASSED with ExposureValue is: " + exposureValue);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 FAILED with ExposureValue is: " + exposureValue);
expect().assertFail();
}
await stopCameraSession();
}
await sleep(500);
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_EXPOSURE_BIAS_PROMISE_0104 end for camera[" + i + "]");
}
......
......@@ -179,10 +179,10 @@ export default function cameraSessionFlashTest() {
console.log(TAG + 'Exit releaseVideoReceiveSurface')
}
async function mgetCameraManagerInstance() {
function mgetCameraManagerInstance() {
console.info('Enter mgetCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -193,10 +193,10 @@ export default function cameraSessionFlashTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
mCameraDevicesArray = mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
......@@ -231,41 +231,11 @@ export default function cameraSessionFlashTest() {
return true;
}
async function beginCameraSessionConfig() {
console.info('Enter beginCameraSessionConfig');
mCameraSession.beginConfig();
await sleep(30);
console.info('Exit beginCameraSessionConfig');
return true;
}
async function commitCameraSessionConfig() {
console.info('Enter commitCameraSessionConfig');
mCameraSession.commitConfig(async (err) => {
if (!err) {
console.info(TAG + "Entering commitConfig PASSED");
} else {
console.info(TAG + "Entering commitConfig FAILED : " + err.message);
}
})
await sleep(500);
console.info('Exit commitCameraSessionConfig');
return true;
}
async function createCameraSessionInstance() {
function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
try {
mCameraSession = await mCameraManager.createCaptureSession();
mCameraSession = mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
......@@ -276,7 +246,7 @@ export default function cameraSessionFlashTest() {
return false;
}
await beginCameraSessionConfig();
mCameraSession.beginConfig();
console.info('Exit createCameraSessionInstance');
......@@ -289,7 +259,7 @@ export default function cameraSessionFlashTest() {
async function createInput(idx:any) {
console.info('Enter createInput');
if (isEmpty(mCameraDevicesArray)) {
console.info(TAG + "Entering createInputs FAILED with NoCamera");
return false;
......@@ -302,14 +272,7 @@ export default function cameraSessionFlashTest() {
return false;
}
mCameraInput.open(async (err) => {
console.info(TAG + "Entering mCameraInput open callback");
if (!err) {
console.info(TAG + "Entering mCameraInput open PASSED ");
} else {
console.info(TAG + "Entering mCameraInput open FAILED : " + err.message);
}
})
await mCameraInput.open();
await sleep(100);
......@@ -332,7 +295,7 @@ export default function cameraSessionFlashTest() {
return true;
}
async function createOutput(idx:any) {
function createOutput(idx:any) {
console.info('Enter createOutput');
let cameraOutputCap = mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
......@@ -341,7 +304,7 @@ export default function cameraSessionFlashTest() {
if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
mPreviewOutput = mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
......@@ -358,7 +321,7 @@ export default function cameraSessionFlashTest() {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) {
mPhotoOutput = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
mPhotoOutput = mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
if (!isEmpty(mPhotoOutput)) {
break;
}
......@@ -403,7 +366,6 @@ export default function cameraSessionFlashTest() {
console.info('Enter releaseOutput');
if (!isEmpty(mPreviewOutput)) {
await mPreviewOutput.stop();
await mPreviewOutput.release();
}
......@@ -425,23 +387,23 @@ export default function cameraSessionFlashTest() {
console.info(TAG + "Enter startCameraSession");
await createInput(idx);
await createOutput(idx);
createOutput(idx);
await sleep(1);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutput);
mCameraSession.addOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -451,8 +413,8 @@ export default function cameraSessionFlashTest() {
*/
await sleep(1);
await commitCameraSessionConfig();
await beginCameraSessionConfig();
await mCameraSession.commitConfig();
/*
await mCameraSession.start(async (err) => {
......@@ -473,6 +435,9 @@ export default function cameraSessionFlashTest() {
async function stopCameraSession() {
console.info(TAG + "Enter stopCameraSession");
mCameraSession.beginConfig();
/*
mCameraSession.stop(async (err) => {
console.info(TAG + "Entering mCameraSession stop callback");
......@@ -488,18 +453,20 @@ export default function cameraSessionFlashTest() {
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to removeInput input");
await mCameraSession.removeInput(mCameraInput);
mCameraSession.removeInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
mCameraSession.removeOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutput);
mCameraSession.removeOutput(mPhotoOutput);
}
// await mCameraSession.commitConfig();
/*
if (!isEmpty(mVideoOutput)) {
console.info(TAG + "Start to removeOutput mVideoOutput");
......@@ -508,7 +475,7 @@ export default function cameraSessionFlashTest() {
*/
await releaseInput();
await releaseOutput();
console.info(TAG + "Exit stopCameraSession");
return true;
......@@ -521,9 +488,9 @@ export default function cameraSessionFlashTest() {
sleep(100);
await getPhotoReceiverSurface();
await getVideoReceiveSurface();
await mgetCameraManagerInstance();
await getCameraSupportDevicesArray();
await createCameraSessionInstance();
mgetCameraManagerInstance();
getCameraSupportDevicesArray();
createCameraSessionInstance();
console.info('Device type = ' + deviceInfo.deviceType);
......@@ -570,7 +537,7 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
let hasFlashPromise = await mCameraSession.hasFlash();
let hasFlashPromise = mCameraSession.hasFlash();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_HAS_FLASH_PROMISE_0100 finish");
if (hasFlashPromise != null || hasFlashPromise != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_HAS_FLASH_PROMISE_0100 PASSED with hasFlash is: " + hasFlashPromise);
......@@ -613,7 +580,7 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if (mHasFlashArray[i] == true) {
let isFlashModeSupported = await mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_CLOSE);
let isFlashModeSupported = mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_CLOSE);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0100 finish");
if (isFlashModeSupported != null || isFlashModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0100 PASSED with isFlashModeSupported is: " + isFlashModeSupported);
......@@ -662,12 +629,11 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if ((mHasFlashArray[i] == true) && (mIsFlashModeSupportedArray[i] == true)) {
await mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_CLOSE);
mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_CLOSE);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 PASSED with FlashMode is: " + cameraObj.FlashMode.FLASH_MODE_CLOSE);
await sleep(500);
let flashMode = await mCameraSession.getFlashMode();
let flashMode = mCameraSession.getFlashMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 finish");
if (flashMode == cameraObj.FlashMode.FLASH_MODE_CLOSE) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 PASSED with FlaseMode is: " + flashMode);
......@@ -675,7 +641,6 @@ export default function cameraSessionFlashTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 FAILED with FlaseMode is: " + flashMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0100 not support");
}
......@@ -714,16 +679,14 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if (mHasFlashArray[i] == true) {
let isFlashModeSupported = await mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_OPEN);
let isFlashModeSupported = mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_OPEN);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0101 finish");
if (isFlashModeSupported != null || isFlashModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0101 PASSED with isFlashModeSupported is: " + isFlashModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0101 FAILED with isFlashModeSupported is: " + isFlashModeSupported);
expect().assertFail();
}
await sleep(100);
}
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0101 not support");
}
......@@ -762,12 +725,11 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if ((mHasFlashArray[i] == true) && (mIsFlashModeSupportedArray[i] == true)) {
await mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_OPEN);
mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_OPEN);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 PASSED with FlashMode is: " + cameraObj.FlashMode.FLASH_MODE_OPEN);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 PASSED with FlashMode is: " + cameraObj.FlashMode.FLASH_MODE_OPEN);
let flashMode = await mCameraSession.getFlashMode();
let flashMode = mCameraSession.getFlashMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 finish");
if (flashMode == cameraObj.FlashMode.FLASH_MODE_OPEN) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 PASSED with FlaseMode is: " + flashMode);
......@@ -775,7 +737,6 @@ export default function cameraSessionFlashTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 FAILED with FlaseMode is: " + flashMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0101 not support");
}
......@@ -814,16 +775,14 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if (mHasFlashArray[i] == true) {
let isFlashModeSupported = await mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_AUTO);
let isFlashModeSupported = mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0102 finish");
if (isFlashModeSupported != null || isFlashModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0102 PASSED with isFlashModeSupported is: " + isFlashModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0102 FAILED with isFlashModeSupported is: " + isFlashModeSupported);
expect().assertFail();
}
await sleep(100);
}
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0102 not support");
}
......@@ -862,12 +821,10 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if ((mHasFlashArray[i] == true) && (mIsFlashModeSupportedArray[i] == true)) {
await mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_AUTO);
mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 PASSED with FlashMode is: " + cameraObj.FlashMode.FLASH_MODE_AUTO);
await sleep(500);
let flashMode = await mCameraSession.getFlashMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 PASSED with FlashMode is: " + cameraObj.FlashMode.FLASH_MODE_AUTO);
let flashMode = mCameraSession.getFlashMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 finish");
if (flashMode == cameraObj.FlashMode.FLASH_MODE_AUTO) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 PASSED with FlaseMode is: " + flashMode);
......@@ -875,11 +832,9 @@ export default function cameraSessionFlashTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 FAILED with FlaseMode is: " + flashMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 not support");
}
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0102 end for camera[" + i + "]");
......@@ -913,16 +868,14 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if (mHasFlashArray[i] == true) {
let isFlashModeSupported = await mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_ALWAYS_OPEN);
let isFlashModeSupported = mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_ALWAYS_OPEN);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0103 finish");
if (isFlashModeSupported != null || isFlashModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0103 PASSED with hasFlash is: " + isFlashModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0103 FAILED with hasFlash is: " + isFlashModeSupported);
expect().assertFail();
}
await sleep(100);
}
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FLASH_MODE_SUPPORT_PROMISE_0103 not support");
}
......@@ -961,12 +914,10 @@ export default function cameraSessionFlashTest() {
await startCameraSession(i);
if ((mHasFlashArray[i] == true) && (mIsFlashModeSupportedArray[i] == true)) {
await mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_ALWAYS_OPEN);
mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_ALWAYS_OPEN);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 PASSED with FlashMode is: " + cameraObj.FlashMode.FLASH_MODE_ALWAYS_OPEN);
await sleep(500);
let flashMode = await mCameraSession.getFlashMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 PASSED with FlashMode is: " + cameraObj.FlashMode.FLASH_MODE_ALWAYS_OPEN);
let flashMode = mCameraSession.getFlashMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 finish");
if (flashMode == cameraObj.FlashMode.FLASH_MODE_ALWAYS_OPEN) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 PASSED with FlaseMode is: " + flashMode);
......@@ -974,8 +925,6 @@ export default function cameraSessionFlashTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 FAILED with FlaseMode is: " + flashMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FLASH_MODE_PROMISE_0103 not support");
}
......
......@@ -225,10 +225,10 @@ export default function cameraSessionFocusTest() {
console.log(TAG + 'Exit releaseVideoReceiveSurface')
}
async function getCameraManagerInstance() {
function getCameraManagerInstance() {
console.info('Enter getCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -239,32 +239,17 @@ export default function cameraSessionFocusTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
if (!err) {
if (data != null || data != undefined) {
mCameraDevicesArray = data;
console.info(TAG + "Entering getCameraSupportDevicesArray PASSED with CameraDevicesArray is: " + data);
} else {
console.info(TAG + "Entering getCameraSupportDevicesArray FAILED with CameraDevicesArray is: " + data);
}
} else {
console.info(TAG + "Entering getCameraSupportDevicesArray FAILED : " + err.message);
}
})
await sleep(3000);
*/
mCameraDevicesArray = mCameraManager.getSupportedCameras();
if (isEmpty(mCameraDevicesArray)) {
console.info(TAG + "getSupportedCameras FAILED");
return false;
}
//mCameraNum = 1;
mCameraNum = mCameraDevicesArray.length;
console.info(TAG + "getCameraSupportDevicesArray is: " + mCameraNum);
......@@ -276,41 +261,11 @@ export default function cameraSessionFocusTest() {
return true;
}
async function beginCameraSessionConfig() {
console.info('Enter beginCameraSessionConfig');
mCameraSession.beginConfig();
await sleep(30);
console.info('Exit beginCameraSessionConfig');
return true;
}
async function commitCameraSessionConfig() {
console.info('Enter commitCameraSessionConfig');
mCameraSession.commitConfig(async (err, data) => {
if (!err) {
console.info(TAG + "Entering commitConfig PASSED");
} else {
console.info(TAG + "Entering commitConfig FAILED : " + err.message);
}
})
await sleep(500);
console.info('Exit commitCameraSessionConfig');
return true;
}
async function createCameraSessionInstance() {
function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
try {
mCameraSession = await mCameraManager.createCaptureSession();
mCameraSession = mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
......@@ -321,7 +276,7 @@ export default function cameraSessionFocusTest() {
return false;
}
await beginCameraSessionConfig();
mCameraSession.beginConfig();
console.info('Exit createCameraSessionInstance');
......@@ -347,14 +302,7 @@ export default function cameraSessionFocusTest() {
return false;
}
mCameraInput.open(async (err) => {
console.info(TAG + "Entering mCameraInput open callback");
if (!err) {
console.info(TAG + "Entering mCameraInput open PASSED ");
} else {
console.info(TAG + "Entering mCameraInput open FAILED : " + err.message);
}
})
await mCameraInput.open();
await sleep(100);
......@@ -377,7 +325,7 @@ export default function cameraSessionFocusTest() {
return true;
}
async function createOutput(idx:any) {
function createOutput(idx:any) {
console.info('Enter createOutput');
let cameraOutputCap = mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
......@@ -386,7 +334,7 @@ export default function cameraSessionFocusTest() {
if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
mPreviewOutput = mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
......@@ -403,7 +351,7 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) {
mPhotoOutput = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
mPhotoOutput = mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
if (!isEmpty(mPhotoOutput)) {
break;
}
......@@ -448,7 +396,6 @@ export default function cameraSessionFocusTest() {
console.info('Enter releaseOutput');
if (!isEmpty(mPreviewOutput)) {
await mPreviewOutput.stop();
await mPreviewOutput.release();
}
......@@ -470,23 +417,23 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Enter startCameraSession");
await createInput(idx);
await createOutput(idx);
createOutput(idx);
await sleep(1);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutput);
mCameraSession.addOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -496,8 +443,7 @@ export default function cameraSessionFocusTest() {
*/
await sleep(1);
await commitCameraSessionConfig();
await beginCameraSessionConfig();
await mCameraSession.commitConfig();
/*
await mCameraSession.start(async (err) => {
......@@ -518,6 +464,8 @@ export default function cameraSessionFocusTest() {
async function stopCameraSession() {
console.info(TAG + "Enter stopCameraSession");
mCameraSession.beginConfig();
/*
mCameraSession.stop(async (err) => {
console.info(TAG + "Entering mCameraSession stop callback");
......@@ -533,17 +481,17 @@ export default function cameraSessionFocusTest() {
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to removeInput input");
await mCameraSession.removeInput(mCameraInput);
mCameraSession.removeInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
mCameraSession.removeOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutput);
mCameraSession.removeOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -566,9 +514,9 @@ export default function cameraSessionFocusTest() {
sleep(100);
await getPhotoReceiverSurface();
await getVideoReceiveSurface();
await getCameraManagerInstance();
await getCameraSupportDevicesArray();
await createCameraSessionInstance();
getCameraManagerInstance();
getCameraSupportDevicesArray();
createCameraSessionInstance();
console.info('Device type = ' + deviceInfo.deviceType);
......@@ -614,17 +562,14 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
let isFocusModeSupported = await mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_MANUAL);
let isFocusModeSupported = mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_MANUAL);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0100 finish");
if (isFocusModeSupported != null || isFocusModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0100 PASSED with isFocusModeSupported is: " + isFocusModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0100 FAILED with isFocusModeSupported is: " + isFocusModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0100 end for camera[" + i + "]");
......@@ -659,12 +604,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
if (mIsFocusModeSupportedArray[i] == true) {
await mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_MANUAL);
mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_MANUAL);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 PASSED with FocusMode is: " + cameraObj.FocusMode.FOCUS_MODE_MANUAL);
await sleep(500);
let focusMode = await mCameraSession.getFocusMode();
let focusMode = mCameraSession.getFocusMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 finish");
if (focusMode == cameraObj.FocusMode.FOCUS_MODE_MANUAL) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 PASSED with FocusMode is: " + focusMode);
......@@ -672,7 +616,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 FAILED with FocusMode is: " + focusMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0100 not support");
}
......@@ -710,16 +653,14 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
let isFocusModeSupported = await mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_CONTINUOUS_AUTO);
let isFocusModeSupported = mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_CONTINUOUS_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0101 finish");
if (isFocusModeSupported != null || isFocusModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0101 PASSED with isFocusModeSupported is: " + isFocusModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0101 FAILED with isFocusModeSupported is: " + isFocusModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -755,12 +696,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
if (mIsFocusModeSupportedArray[i] == true) {
await mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_CONTINUOUS_AUTO);
mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_CONTINUOUS_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 PASSED with FocusMode is: " + cameraObj.FocusMode.FOCUS_MODE_CONTINUOUS_AUTO);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 PASSED with FocusMode is: " + cameraObj.FocusMode.FOCUS_MODE_CONTINUOUS_AUTO);
let focusMode = await mCameraSession.getFocusMode();
let focusMode = mCameraSession.getFocusMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 finish");
if (focusMode == cameraObj.FocusMode.FOCUS_MODE_CONTINUOUS_AUTO) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 PASSED with FocusMode is: " + focusMode);
......@@ -768,7 +708,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 FAILED with FocusMode is: " + focusMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0101 not support");
}
......@@ -806,7 +745,7 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
let isFocusModeSupported = await mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_AUTO);
let isFocusModeSupported = mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0102 finish");
if (isFocusModeSupported != null || isFocusModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0102 PASSED with isFocusModeSupported is: " + isFocusModeSupported);
......@@ -851,12 +790,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
if (mIsFocusModeSupportedArray[i] == true) {
await mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_AUTO);
mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 PASSED with FocusMode is: " + cameraObj.FocusMode.FOCUS_MODE_AUTO);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 PASSED with FocusMode is: " + cameraObj.FocusMode.FOCUS_MODE_AUTO);
let focusMode = await mCameraSession.getFocusMode();
let focusMode = mCameraSession.getFocusMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 finish");
if (focusMode == cameraObj.FocusMode.FOCUS_MODE_AUTO) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 PASSED with FocusMode is: " + focusMode);
......@@ -864,7 +802,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 FAILED with FocusMode is: " + focusMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0102 not support");
}
......@@ -902,16 +839,14 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
let isFocusModeSupported = await mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_LOCKED);
let isFocusModeSupported = mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_LOCKED);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0103 finish");
if (isFocusModeSupported != null || isFocusModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0103 PASSED with isFocusModeSupported is: " + isFocusModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_FOCUS_MODE_SUPPORT_PROMISE_0103 FAILED with isFocusModeSupported is: " + isFocusModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -947,12 +882,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
if (mIsFocusModeSupportedArray[i] == true) {
await mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_LOCKED);
mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_LOCKED);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 PASSED with FocusMode is: " + cameraObj.FocusMode.FOCUS_MODE_LOCKED);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 PASSED with FocusMode is: " + cameraObj.FocusMode.FOCUS_MODE_LOCKED);
let focusMode = await mCameraSession.getFocusMode();
let focusMode = mCameraSession.getFocusMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 finish");
if (focusMode == cameraObj.FocusMode.FOCUS_MODE_LOCKED) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 PASSED with FocusMode is: " + focusMode);
......@@ -960,7 +894,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 FAILED with FocusMode is: " + focusMode);
expect().assertFail();
}
await sleep(100);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_MODE_PROMISE_0103 not support");
}
......@@ -998,12 +931,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPoint);
mCameraSession.setFocusPoint(mFocusPoint);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0100 PASSED with FocusPoint is: " + mFocusPoint.x + ", " + mFocusPoint.y);
await sleep(500);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0100 finish");
if ((focusPoint.x == mFocusPoint.x) && (focusPoint.y == mFocusPoint.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0100 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1011,7 +943,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0100 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1046,12 +977,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointLT);
mCameraSession.setFocusPoint(mFocusPointLT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0101 PASSED with FocusPoint is: " + mFocusPointLT.x + ", " + mFocusPointLT.y);
await sleep(500);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0101 finish");
if ((focusPoint.x == mFocusPointLT.x) && (focusPoint.y == mFocusPointLT.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0101 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1059,7 +989,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0101 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1094,12 +1023,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointRT);
mCameraSession.setFocusPoint(mFocusPointRT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0102 PASSED with FocusPoint is: " + mFocusPointRT.x + ", " + mFocusPointRT.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0102 PASSED with FocusPoint is: " + mFocusPointRT.x + ", " + mFocusPointRT.y);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0102 finish");
if ((focusPoint.x == mFocusPointRT.x) && (focusPoint.y == mFocusPointRT.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0102 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1107,7 +1035,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0102 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1142,12 +1069,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointLB);
mCameraSession.setFocusPoint(mFocusPointLB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0103 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0103 PASSED with FocusPoint is: " + mFocusPointLB.x + ", " + mFocusPointLB.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0103 PASSED with FocusPoint is: " + mFocusPointLB.x + ", " + mFocusPointLB.y);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0103 finish");
if ((focusPoint.x == mFocusPointLB.x) && (focusPoint.y == mFocusPointLB.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0103 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1155,7 +1081,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0103 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1190,12 +1115,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointRB);
mCameraSession.setFocusPoint(mFocusPointRB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0104 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0104 PASSED with FocusPoint is: " + mFocusPointRB.x + ", " + mFocusPointRB.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0104 PASSED with FocusPoint is: " + mFocusPointRB.x + ", " + mFocusPointRB.y);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0104 finish");
if ((focusPoint.x == mFocusPointRB.x) && (focusPoint.y == mFocusPointRB.y)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0104 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1203,7 +1127,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0104 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1238,12 +1161,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointInvalidLT);
mCameraSession.setFocusPoint(mFocusPointInvalidLT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0105 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0105 PASSED with FocusPoint is: " + mFocusPointInvalidLT.x + ", " + mFocusPointInvalidLT.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0105 PASSED with FocusPoint is: " + mFocusPointInvalidLT.x + ", " + mFocusPointInvalidLT.y);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0105 finish");
if (((focusPoint.x != mFocusPointInvalidLT.x) && (focusPoint.y != mFocusPointInvalidLT.y)) || (mEnableCheckInvalidFocusPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0105 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1251,7 +1173,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0105 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1285,12 +1206,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointInvalidRT);
mCameraSession.setFocusPoint(mFocusPointInvalidRT);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0106 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0106 PASSED with FocusPoint is: " + mFocusPointInvalidRT.x + ", " + mFocusPointInvalidRT.y);
await sleep(500);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0106 finish");
if (((focusPoint.x != mFocusPointInvalidRT.x) && (focusPoint.y != mFocusPointInvalidRT.y)) || (mEnableCheckInvalidFocusPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0106 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1298,7 +1218,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0106 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1333,12 +1252,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointInvalidLB);
mCameraSession.setFocusPoint(mFocusPointInvalidLB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0107 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0107 PASSED with FocusPoint is: " + mFocusPointInvalidLB.x + ", " + mFocusPointInvalidLB.y);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0107 PASSED with FocusPoint is: " + mFocusPointInvalidLB.x + ", " + mFocusPointInvalidLB.y);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0107 finish");
if (((focusPoint.x != mFocusPointInvalidLB.x) && (focusPoint.y != mFocusPointInvalidLB.y)) || (mEnableCheckInvalidFocusPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0107 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1346,7 +1264,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0107 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1381,12 +1298,11 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
await mCameraSession.setFocusPoint(mFocusPointInvalidRB);
mCameraSession.setFocusPoint(mFocusPointInvalidRB);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0108 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0108 PASSED with FocusPoint is: " + mFocusPointInvalidRB.x + ", " + mFocusPointInvalidRB.y);
await sleep(500);
let focusPoint = await mCameraSession.getFocusPoint();
let focusPoint = mCameraSession.getFocusPoint();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0108 finish");
if (((focusPoint.x != mFocusPointInvalidRB.x) && (focusPoint.y != mFocusPointInvalidRB.y)) || (mEnableCheckInvalidFocusPoint == false)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0108 PASSED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
......@@ -1394,7 +1310,6 @@ export default function cameraSessionFocusTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_FOCUS_POINT_PROMISE_0108 FAILED with FocusPoint is: " + focusPoint.x + ", " + focusPoint.y);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
......@@ -1429,11 +1344,9 @@ export default function cameraSessionFocusTest() {
await startCameraSession(i);
let focalLength = await mCameraSession.getFocalLength();
let focalLength = mCameraSession.getFocalLength();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_GET_FOCAL_LENGTH_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_GET_FOCAL_LENGTH_PROMISE_0100 PASSED with FocalLength is: " + focalLength);
await sleep(100);
await stopCameraSession();
......
......@@ -178,10 +178,10 @@ export default function cameraSessionVideoStabilizationTest() {
console.log(TAG + 'Exit releaseVideoReceiveSurface')
}
async function getCameraManagerInstance() {
function getCameraManagerInstance() {
console.info('Enter getCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -192,10 +192,10 @@ export default function cameraSessionVideoStabilizationTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
mCameraDevicesArray = mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
......@@ -229,41 +229,11 @@ export default function cameraSessionVideoStabilizationTest() {
return true;
}
async function beginCameraSessionConfig() {
console.info('Enter beginCameraSessionConfig');
mCameraSession.beginConfig();
await sleep(30);
console.info('Exit beginCameraSessionConfig');
return true;
}
async function commitCameraSessionConfig() {
console.info('Enter commitCameraSessionConfig');
mCameraSession.commitConfig(async (err) => {
if (!err) {
console.info(TAG + "Entering commitConfig PASSED");
} else {
console.info(TAG + "Entering commitConfig FAILED : " + err.message);
}
})
await sleep(500);
console.info('Exit commitCameraSessionConfig');
return true;
}
async function createCameraSessionInstance() {
function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
try {
mCameraSession = await mCameraManager.createCaptureSession();
mCameraSession = mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
......@@ -274,7 +244,7 @@ export default function cameraSessionVideoStabilizationTest() {
return false;
}
await beginCameraSessionConfig();
mCameraSession.beginConfig();
console.info('Exit createCameraSessionInstance');
......@@ -293,21 +263,14 @@ export default function cameraSessionVideoStabilizationTest() {
return false;
}
mCameraInput = await mCameraManager.createCameraInput(mCameraDevicesArray[idx]);
mCameraInput = mCameraManager.createCameraInput(mCameraDevicesArray[idx]);
if (isEmpty(mCameraInput)) {
console.info(TAG + "createCameraInput FAILED");
return false;
}
mCameraInput.open(async (err) => {
console.info(TAG + "Entering mCameraInput open callback");
if (!err) {
console.info(TAG + "Entering mCameraInput open PASSED ");
} else {
console.info(TAG + "Entering mCameraInput open FAILED : " + err.message);
}
})
await mCameraInput.open();
await sleep(100);
......@@ -330,16 +293,16 @@ export default function cameraSessionVideoStabilizationTest() {
return true;
}
async function createOutput(idx:any) {
function createOutput(idx:any) {
console.info('Enter createOutput');
let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
let cameraOutputCap = mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
if (!isEmpty(cameraOutputCap)) {
if (!isEmpty(cameraOutputCap.previewProfiles)) {
console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length);
for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) {
mPreviewOutput = await mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
mPreviewOutput = mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
......@@ -356,7 +319,7 @@ export default function cameraSessionVideoStabilizationTest() {
console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length);
for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) {
mPhotoOutput = await mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
mPhotoOutput = mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface);
if (!isEmpty(mPhotoOutput)) {
break;
}
......@@ -401,7 +364,6 @@ export default function cameraSessionVideoStabilizationTest() {
console.info('Enter releaseOutput');
if (!isEmpty(mPreviewOutput)) {
await mPreviewOutput.stop();
await mPreviewOutput.release();
}
......@@ -423,23 +385,23 @@ export default function cameraSessionVideoStabilizationTest() {
console.info(TAG + "Enter startCameraSession");
await createInput(idx);
await createOutput(idx);
createOutput(idx);
await sleep(1);
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutput);
mCameraSession.addOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -449,8 +411,7 @@ export default function cameraSessionVideoStabilizationTest() {
*/
await sleep(1);
await commitCameraSessionConfig();
await beginCameraSessionConfig();
await mCameraSession.commitConfig();
/*
await mCameraSession.start(async (err) => {
......@@ -471,6 +432,8 @@ export default function cameraSessionVideoStabilizationTest() {
async function stopCameraSession() {
console.info(TAG + "Enter stopCameraSession");
mCameraSession.beginConfig();
/*
mCameraSession.stop(async (err) => {
console.info(TAG + "Entering mCameraSession stop callback");
......@@ -519,9 +482,9 @@ export default function cameraSessionVideoStabilizationTest() {
sleep(100);
await getPhotoReceiverSurface();
await getVideoReceiveSurface();
await getCameraManagerInstance();
await getCameraSupportDevicesArray();
await createCameraSessionInstance();
getCameraManagerInstance();
getCameraSupportDevicesArray();
createCameraSessionInstance();
console.info('Device type = ' + deviceInfo.deviceType);
......@@ -567,16 +530,14 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
let isVideoStabilizationModeSupported = await mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.OFF);
let isVideoStabilizationModeSupported = mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.OFF);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0100 finish");
if (isVideoStabilizationModeSupported != null || isVideoStabilizationModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0100 PASSED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0100 FAILED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -612,12 +573,11 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
if (mIsVideoStabilizationModeSupportedArray[i] == true) {
await mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.OFF);
mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.OFF);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0100 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.OFF);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0100 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.OFF);
let vdeoStabilizationMode = await mCameraSession.getActiveVideoStabilizationMode();
let vdeoStabilizationMode = mCameraSession.getActiveVideoStabilizationMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0100 finish");
if (vdeoStabilizationMode == cameraObj.VideoStabilizationMode.OFF) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0100 PASSED with VideoStabilizationMode is: " + vdeoStabilizationMode);
......@@ -625,7 +585,6 @@ export default function cameraSessionVideoStabilizationTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0100 FAILED with VideoStabilizationMode is: " + vdeoStabilizationMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0100 PASSED");
}
......@@ -662,16 +621,14 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
let isVideoStabilizationModeSupported = await mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.LOW);
let isVideoStabilizationModeSupported = mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.LOW);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0101 finish");
if (isVideoStabilizationModeSupported != null || isVideoStabilizationModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0101 PASSED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0101 FAILED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -707,12 +664,11 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
if (mIsVideoStabilizationModeSupportedArray[i] == true) {
await mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.LOW);
mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.LOW);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0101 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.LOW);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0101 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.LOW);
let vdeoStabilizationMode = await mCameraSession.getActiveVideoStabilizationMode();
let vdeoStabilizationMode = mCameraSession.getActiveVideoStabilizationMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0101 finish");
if (vdeoStabilizationMode == cameraObj.VideoStabilizationMode.LOW) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0101 PASSED with VideoStabilizationMode is: " + vdeoStabilizationMode);
......@@ -720,7 +676,6 @@ export default function cameraSessionVideoStabilizationTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0101 FAILED with VideoStabilizationMode is: " + vdeoStabilizationMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0101 PASSED");
}
......@@ -758,16 +713,14 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
let isVideoStabilizationModeSupported = await mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.MIDDLE);
let isVideoStabilizationModeSupported = mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.MIDDLE);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0102 finish");
if (isVideoStabilizationModeSupported != null || isVideoStabilizationModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0102 PASSED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0102 FAILED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -803,12 +756,11 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
if (mIsVideoStabilizationModeSupportedArray[i] == true) {
await mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.MIDDLE);
mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.MIDDLE);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0102 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.MIDDLE);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0102 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.MIDDLE);
let vdeoStabilizationMode = await mCameraSession.getActiveVideoStabilizationMode();
let vdeoStabilizationMode = mCameraSession.getActiveVideoStabilizationMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0102 finish");
if (vdeoStabilizationMode == cameraObj.VideoStabilizationMode.MIDDLE) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0102 PASSED with VideoStabilizationMode is: " + vdeoStabilizationMode);
......@@ -816,7 +768,6 @@ export default function cameraSessionVideoStabilizationTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0102 FAILED with VideoStabilizationMode is: " + vdeoStabilizationMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0102 PASSED");
}
......@@ -854,16 +805,14 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
let isVideoStabilizationModeSupported = await mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.HIGH);
let isVideoStabilizationModeSupported = mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.HIGH);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0103 finish");
if (isVideoStabilizationModeSupported != null || isVideoStabilizationModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0103 PASSED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0103 FAILED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -899,12 +848,11 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
if (mIsVideoStabilizationModeSupportedArray[i] == true) {
await mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.HIGH);
mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.HIGH);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0103 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0103 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.HIGH);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0103 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.HIGH);
let vdeoStabilizationMode = await mCameraSession.getActiveVideoStabilizationMode();
let vdeoStabilizationMode = mCameraSession.getActiveVideoStabilizationMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0103 finish");
if (vdeoStabilizationMode == cameraObj.VideoStabilizationMode.HIGH) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0103 PASSED with VideoStabilizationMode is: " + vdeoStabilizationMode);
......@@ -912,7 +860,6 @@ export default function cameraSessionVideoStabilizationTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0103 FAILED with VideoStabilizationMode is: " + vdeoStabilizationMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0103 PASSED");
}
......@@ -950,16 +897,14 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
let isVideoStabilizationModeSupported = await mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.AUTO);
let isVideoStabilizationModeSupported = mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0104 finish");
if (isVideoStabilizationModeSupported != null || isVideoStabilizationModeSupported != undefined) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0104 PASSED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_IS_VIDEO_STABILIZATION_MODE_SUPPORT_PROMISE_0104 FAILED with isVideoStabilizationModeSupported is: " + isVideoStabilizationModeSupported);
expect().assertFail();
}
await sleep(100);
}
await stopCameraSession();
......@@ -994,12 +939,11 @@ export default function cameraSessionVideoStabilizationTest() {
await startCameraSession(i);
if (mIsVideoStabilizationModeSupportedArray[i] == true) {
await mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.AUTO);
mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.AUTO);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0104 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0104 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.AUTO);
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0104 PASSED with VideoStabilizationMode is: " + cameraObj.VideoStabilizationMode.AUTO);
let vdeoStabilizationMode = await mCameraSession.getActiveVideoStabilizationMode();
let vdeoStabilizationMode = mCameraSession.getActiveVideoStabilizationMode();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0104 finish");
if (vdeoStabilizationMode == cameraObj.VideoStabilizationMode.AUTO) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0104 PASSED with VideoStabilizationMode is: " + vdeoStabilizationMode);
......@@ -1007,7 +951,6 @@ export default function cameraSessionVideoStabilizationTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0104 FAILED with VideoStabilizationMode is: " + vdeoStabilizationMode);
expect().assertFail();
}
await sleep(500);
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_VIDEO_STABILIZATION_MODE_PROMISE_0104 PASSED");
}
......
......@@ -180,10 +180,10 @@ export default function cameraSessionZoomRatioTest() {
console.log(TAG + 'Exit releaseVideoReceiveSurface')
}
async function getCameraManagerInstance() {
function getCameraManagerInstance() {
console.info('Enter getCameraManagerInstance');
mCameraManager = await cameraObj.getCameraManager(null);
mCameraManager = cameraObj.getCameraManager(null);
if (isEmpty(mCameraManager)) {
console.info(TAG + "getCameraManager FAILED");
return false;
......@@ -194,10 +194,10 @@ export default function cameraSessionZoomRatioTest() {
return true;
}
async function getCameraSupportDevicesArray() {
function getCameraSupportDevicesArray() {
console.info('Enter getCameraSupportDevicesArray');
mCameraDevicesArray = await mCameraManager.getSupportedCameras();
mCameraDevicesArray = mCameraManager.getSupportedCameras();
/*
mCameraManager.getSupportedCameras(async (err, data) => {
console.info(TAG + "Entering getCameraSupportDevicesArray callback");
......@@ -233,41 +233,11 @@ export default function cameraSessionZoomRatioTest() {
return true;
}
async function beginCameraSessionConfig() {
console.info('Enter beginCameraSessionConfig');
mCameraSession.beginConfig();
await sleep(30);
console.info('Exit beginCameraSessionConfig');
return true;
}
async function commitCameraSessionConfig() {
console.info('Enter commitCameraSessionConfig');
mCameraSession.commitConfig(async (err) => {
if (!err) {
console.info(TAG + "Entering commitConfig PASSED");
} else {
console.info(TAG + "Entering commitConfig FAILED : " + err.message);
}
})
await sleep(500);
console.info('Exit commitCameraSessionConfig');
return true;
}
async function createCameraSessionInstance() {
function createCameraSessionInstance() {
console.info('Enter createCameraSessionInstance');
try {
mCameraSession = await mCameraManager.createCaptureSession();
mCameraSession = mCameraManager.createCaptureSession();
}
catch {
console.info('createCaptureSession FAILED');
......@@ -278,7 +248,7 @@ export default function cameraSessionZoomRatioTest() {
return false;
}
// await beginCameraSessionConfig();
mCameraSession.beginConfig();
console.info('Exit createCameraSessionInstance');
......@@ -304,14 +274,7 @@ export default function cameraSessionZoomRatioTest() {
return false;
}
mCameraInput.open(async (err) => {
console.info(TAG + "Entering mCameraInput open callback");
if (!err) {
console.info(TAG + "Entering mCameraInput open PASSED ");
} else {
console.info(TAG + "Entering mCameraInput open FAILED : " + err.message);
}
})
await mCameraInput.open();
await sleep(100);
......@@ -405,7 +368,6 @@ export default function cameraSessionZoomRatioTest() {
console.info('Enter releaseOutput');
if (!isEmpty(mPreviewOutput)) {
await mPreviewOutput.stop();
await mPreviewOutput.release();
}
......@@ -427,9 +389,7 @@ export default function cameraSessionZoomRatioTest() {
console.info(TAG + "Enter startCameraSession");
await createInput(idx);
await createOutput(idx);
await beginCameraSessionConfig();
createOutput(idx);
console.info(TAG + "Start to addInput");
......@@ -438,17 +398,17 @@ export default function cameraSessionZoomRatioTest() {
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to addInput");
await mCameraSession.addInput(mCameraInput);
mCameraSession.addInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to addOutput mPreviewOutput");
await mCameraSession.addOutput(mPreviewOutput);
mCameraSession.addOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to addOutput mPhotoOutput");
await mCameraSession.addOutput(mPhotoOutput);
mCameraSession.addOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -458,13 +418,9 @@ export default function cameraSessionZoomRatioTest() {
*/
await sleep(1);
await commitCameraSessionConfig();
await mCameraSession.commitConfig();
console.info(TAG + "Entering startCameraSession start session begin");
await mCameraSession.start();
console.info(TAG + "Entering startCameraSession start session end");
/*
await mCameraSession.start(async (err) => {
......@@ -485,6 +441,8 @@ export default function cameraSessionZoomRatioTest() {
async function stopCameraSession() {
console.info(TAG + "Enter stopCameraSession");
mCameraSession.beginConfig();
/*
mCameraSession.stop(async (err) => {
console.info(TAG + "Entering mCameraSession stop callback");
......@@ -498,19 +456,20 @@ export default function cameraSessionZoomRatioTest() {
await sleep(100);
*/
// await commitCameraSessionConfig();
if (!isEmpty(mCameraInput)) {
console.info(TAG + "Start to removeInput input");
await mCameraSession.removeInput(mCameraInput);
mCameraSession.removeInput(mCameraInput);
}
if (!isEmpty(mPreviewOutput)) {
console.info(TAG + "Start to removeOutput mPreviewOutput");
await mCameraSession.removeOutput(mPreviewOutput);
mCameraSession.removeOutput(mPreviewOutput);
}
if (!isEmpty(mPhotoOutput)) {
console.info(TAG + "Start to removeOutput mPhotoOutput");
await mCameraSession.removeOutput(mPhotoOutput);
mCameraSession.removeOutput(mPhotoOutput);
}
/*
if (!isEmpty(mVideoOutput)) {
......@@ -518,6 +477,7 @@ export default function cameraSessionZoomRatioTest() {
await mCameraSession.removeOutput(mVideoOutput);
}
*/
await releaseInput();
await releaseOutput();
......@@ -533,9 +493,9 @@ export default function cameraSessionZoomRatioTest() {
sleep(100);
await getPhotoReceiverSurface();
await getVideoReceiveSurface();
await getCameraManagerInstance();
await getCameraSupportDevicesArray();
await createCameraSessionInstance();
getCameraManagerInstance();
getCameraSupportDevicesArray();
createCameraSessionInstance();
console.info('Device type = ' + deviceInfo.deviceType);
......@@ -582,7 +542,7 @@ export default function cameraSessionZoomRatioTest() {
await startCameraSession(i);
try {
let zoomRatioRange = await mCameraSession.getZoomRatioRange();
let zoomRatioRange = mCameraSession.getZoomRatioRange();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_GET_ZOOM_RATIO_RANGE_PROMISE_0100 finish");
if (zoomRatioRange.length > 0) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_GET_ZOOM_RATIO_RANGE_PROMISE_0100 PASSED with ZoomRatioRange length is: " + zoomRatioRange.length);
......@@ -598,8 +558,6 @@ export default function cameraSessionZoomRatioTest() {
catch {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_GET_ZOOM_RATIO_RANGE_CALLBACK_0100 PASSED");
}
await sleep(100);
await stopCameraSession();
......@@ -635,12 +593,11 @@ export default function cameraSessionZoomRatioTest() {
if (!isEmpty(mZoomRatioRangeArray[i])) {
await startCameraSession(i);
await mCameraSession.setZoomRatio(mZoomRatioRangeArray[i][0]);
mCameraSession.setZoomRatio(mZoomRatioRangeArray[i][0]);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0100 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0100 PASSED with ZoomRatio is: " + mZoomRatioRangeArray[i][0]);
await sleep(500);
let zoomRatio = await mCameraSession.getZoomRatio();
let zoomRatio = mCameraSession.getZoomRatio();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0100 finish");
if (zoomRatio == mZoomRatioRangeArray[i][0]) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0100 PASSED with ZoomRatio is: " + zoomRatio);
......@@ -648,7 +605,6 @@ export default function cameraSessionZoomRatioTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0100 FAILED with ZoomRatio is: " + zoomRatio);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
}
......@@ -684,12 +640,11 @@ export default function cameraSessionZoomRatioTest() {
if (!isEmpty(mZoomRatioRangeArray[i])) {
await startCameraSession(i);
await mCameraSession.setZoomRatio((mZoomRatioMaxArray[i] + 1));
mCameraSession.setZoomRatio((mZoomRatioMaxArray[i] + 1));
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0101 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0101 PASSED with ZoomRatio is: " + (mZoomRatioMaxArray[i] + 1));
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0101 PASSED with ZoomRatio is: " + (mZoomRatioMaxArray[i] + 1));
let zoomRatio = await mCameraSession.getZoomRatio();
let zoomRatio = mCameraSession.getZoomRatio();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0101 finish");
if (zoomRatio != (mZoomRatioMaxArray[i] + 1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0101 PASSED with ZoomRatio is: " + zoomRatio);
......@@ -697,7 +652,6 @@ export default function cameraSessionZoomRatioTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0101 FAILED with ZoomRatio is: " + zoomRatio);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
}
......@@ -734,12 +688,11 @@ export default function cameraSessionZoomRatioTest() {
if (!isEmpty(mZoomRatioRangeArray[i])) {
await startCameraSession(i);
await mCameraSession.setZoomRatio((mZoomRatioMaxArray[i] + 0.1));
mCameraSession.setZoomRatio((mZoomRatioMaxArray[i] + 0.1));
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0102 finish");
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0102 PASSED with ZoomRatio is: " + (mZoomRatioMaxArray[i] + 0.1));
await sleep(500);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0102 PASSED with ZoomRatio is: " + (mZoomRatioMaxArray[i] + 0.1));
let zoomRatio = await mCameraSession.getZoomRatio();
let zoomRatio = mCameraSession.getZoomRatio();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0102 finish");
if (zoomRatio != (mZoomRatioMaxArray[i] + 0.1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0102 PASSED with ZoomRatio is: " + zoomRatio);
......@@ -747,7 +700,6 @@ export default function cameraSessionZoomRatioTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0102 FAILED with ZoomRatio is: " + zoomRatio);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
}
......@@ -784,12 +736,11 @@ export default function cameraSessionZoomRatioTest() {
if (!isEmpty(mZoomRatioRangeArray[i])) {
await startCameraSession(i);
await mCameraSession.setZoomRatio((mZoomRatioMinArray[i] - 1));
mCameraSession.setZoomRatio((mZoomRatioMinArray[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);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 PASSED with ZoomRatio is: " + (mZoomRatioMaxArray[i] - 1));
let zoomRatio = await mCameraSession.getZoomRatio();
let zoomRatio = mCameraSession.getZoomRatio();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 finish");
if (zoomRatio != (mZoomRatioMinArray[i] - 1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 PASSED with ZoomRatio is: " + zoomRatio);
......@@ -797,7 +748,6 @@ export default function cameraSessionZoomRatioTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0103 FAILED with ZoomRatio is: " + zoomRatio);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
}
......@@ -834,12 +784,11 @@ export default function cameraSessionZoomRatioTest() {
if (!isEmpty(mZoomRatioRangeArray[i])) {
await startCameraSession(i);
await mCameraSession.setZoomRatio((mZoomRatioMinArray[i] - 0.1));
mCameraSession.setZoomRatio((mZoomRatioMinArray[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);
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 PASSED with ZoomRatio is: " + (mZoomRatioMaxArray[i] - 0.1));
let zoomRatio = await mCameraSession.getZoomRatio();
let zoomRatio = mCameraSession.getZoomRatio();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 finish");
if (zoomRatio != (mZoomRatioMinArray[i] - 0.1)) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 PASSED with ZoomRatio is: " + zoomRatio);
......@@ -847,7 +796,6 @@ export default function cameraSessionZoomRatioTest() {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_SESSION_SET_GET_ZOOM_RATIO_PROMISE_0104 FAILED with ZoomRatio is: " + zoomRatio);
expect().assertFail();
}
await sleep(500);
await stopCameraSession();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册