diff --git a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraEnumTest.test.ets b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraEnumTest.test.ets index 9f7c10e5a0740c1908bf844fbcca922b9d6409a3..6976ec269b05c29fc9cde80f706c4fccd6be0918 100644 --- a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraEnumTest.test.ets +++ b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraEnumTest.test.ets @@ -315,7 +315,7 @@ export default function cameraEnumTest() { expect(camera.CameraErrorCode.DEVICE_SETTING_LOCKED == 7400106).assertTrue(); console.info(TAG + "--------------DEVICE_SETTING_LOCKED--------------"); expect(camera.CameraErrorCode.CONFLICT_CAMERA == 7400107).assertTrue(); - // console.info(TAG + "--------------CONFLICT_CAMERA--------------"); + console.info(TAG + "--------------CONFLICT_CAMERA--------------"); expect(camera.CameraErrorCode.DEVICE_DISABLED == 7400108).assertTrue(); console.info(TAG + "--------------DEVICE_DISABLED--------------"); expect(camera.CameraErrorCode.DEVICE_PREEMPTED == 7400109).assertTrue(); diff --git a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraErrorCodeUsecaseTest.test.ets b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraErrorCodeUsecaseTest.test.ets index d95cde098f4ccdd747ea3ca151e4ca5c25438df2..24f9e9912941bf569a556fa4e8e4de16da766a57 100644 --- a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraErrorCodeUsecaseTest.test.ets +++ b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraErrorCodeUsecaseTest.test.ets @@ -17,7 +17,7 @@ import cameraObj from '@ohos.multimedia.camera'; import image from '@ohos.multimedia.image'; import media from '@ohos.multimedia.media'; import mediaLibrary from '@ohos.multimedia.mediaLibrary'; -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '@ohos/hypium'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; // 创建视频录制的参数 let videoProfile = { @@ -31,7 +31,7 @@ let videoProfile = { videoFrameWidth: 640, videoFrameHeight: 480, videoFrameRate: 30 - } +} let videoConfig = { audioSourceType: 1, @@ -42,20 +42,20 @@ let videoConfig = { location: { latitude: 30, longitude: 130 }, maxSize: 100, maxDuration: 500 - } +} - let captureLocation = { +let captureLocation = { latitude: 0, longitude: 0, altitude: 0, - } +} - let captureSetting = { +let captureSetting = { quality: cameraObj.QualityLevel.QUALITY_LEVEL_LOW, rotation: cameraObj.ImageRotation.ROTATION_0, location: captureLocation, mirror: false - } +} const TAG = "CameraErrorCodeUsecaseTest: "; let mCameraManager; @@ -113,7 +113,7 @@ export default function CameraErrorCodeUsecaseTest() { return true; } - async function createInput(idx:any) { + async function createInput(idx: any) { console.info(TAG + 'Enter createInput'); if (isEmpty(mCameraDevicesArray)) { console.info(TAG + "Entering createInputs FAILED with NoCamera"); @@ -205,8 +205,8 @@ export default function CameraErrorCodeUsecaseTest() { if (dataUri != undefined) { let args = dataUri.id.toString(); let fetchOp = { - selections: fileKeyObj.ID + "=?", - selectionArgs: [args], + selections: fileKeyObj.ID + "=?", + selectionArgs: [args], } let fetchFileResult = await mediaTest.getFileAssets(fetchOp); fileAsset = await fetchFileResult.getAllObject(); @@ -217,7 +217,7 @@ export default function CameraErrorCodeUsecaseTest() { async function closeFd() { if (fileAsset != null) { - await fileAsset[0].close(fdNumber).then(() => { + await fileAsset[0].close(fdNumber).then(() => { console.info('[mediaLibrary] case close fd success'); }).catch((err) => { console.info('[mediaLibrary] case close fd failed'); @@ -231,33 +231,33 @@ export default function CameraErrorCodeUsecaseTest() { await getFd('ErrorCodeCameraOutput.mp4'); videoConfig.url = fdPath; media.createAVRecorder((err, recorder) => { - if (!err) { - console.info(TAG + 'createVideoRecorder called') - videoRecorder = recorder - console.info(TAG + 'videoRecorder is :' + JSON.stringify(videoRecorder)) - console.info(TAG + 'videoRecorder.prepare called.') - videoRecorder.prepare(videoConfig, (err) => { - if (!err) { - console.info(TAG + 'videoRecorder.prepare success.') - videoRecorder.getInputSurface((err, id) => { - console.info(TAG + 'getInputSurface called') - if (!err) { - videoSurfaceId = id - console.info(TAG + 'getInputSurface surfaceId: ' + JSON.stringify(videoSurfaceId)) - } else { - console.info(TAG + 'getInputSurface FAILED') - } + if (!err) { + console.info(TAG + 'createVideoRecorder called') + videoRecorder = recorder + console.info(TAG + 'videoRecorder is :' + JSON.stringify(videoRecorder)) + console.info(TAG + 'videoRecorder.prepare called.') + videoRecorder.prepare(videoConfig, (err) => { + if (!err) { + console.info(TAG + 'videoRecorder.prepare success.') + videoRecorder.getInputSurface((err, id) => { + console.info(TAG + 'getInputSurface called') + if (!err) { + videoSurfaceId = id + console.info(TAG + 'getInputSurface surfaceId: ' + JSON.stringify(videoSurfaceId)) + } else { + console.info(TAG + 'getInputSurface FAILED') + } + }) + } else { + console.info(TAG + 'prepare FAILED') + } }) - } else { - console.info(TAG + 'prepare FAILED') - } - }) - } - else { - console.info(TAG + 'createVideoRecorder FAILED') - } + } + else { + console.info(TAG + 'createVideoRecorder FAILED') + } }) - } + } async function releaseVideoReceiveSurface() { console.log(TAG + 'Entering releaseVideoReceiveSurface') @@ -268,12 +268,12 @@ export default function CameraErrorCodeUsecaseTest() { console.log(TAG + 'Exit releaseVideoReceiveSurface') } - function createOutput(idx:any) { + function createOutput(idx: any) { console.info(TAG + 'Enter createOutput'); cameraOutputCap = mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]); if (!isEmpty(cameraOutputCap)) { if (!isEmpty(cameraOutputCap.previewProfiles)) { - console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); + console.info(TAG + "cameraOutputCap.previewProfiles.length: " + cameraOutputCap.previewProfiles.length); for (let i = 0; i < cameraOutputCap.previewProfiles.length; i++) { mPreviewOutput = mCameraManager.createPreviewOutput(cameraOutputCap.previewProfiles[i], globalThis.surfaceId); if (!isEmpty(mPreviewOutput)) { @@ -287,8 +287,8 @@ export default function CameraErrorCodeUsecaseTest() { } } if (!isEmpty(cameraOutputCap.photoProfiles)) { - console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); - + console.info(TAG + "cameraOutputCap.photoProfiles.length: " + cameraOutputCap.photoProfiles.length); + for (let i = 0; i < cameraOutputCap.photoProfiles.length; i++) { mPhotoOutput = mCameraManager.createPhotoOutput(cameraOutputCap.photoProfiles[i], mPhotoSurface); if (!isEmpty(mPhotoOutput)) { @@ -358,7 +358,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_CAMERA_INPUT_0100 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let camerainput = mCameraManager.createCameraInput(); } catch (error) { @@ -368,7 +368,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -385,7 +385,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_CAMERA_INPUT_0200 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let camerainput = mCameraManager.createCameraInput("cameraInput"); } catch (error) { @@ -395,7 +395,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -412,9 +412,9 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_CAMERA_INPUT_0300 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { - let camerainput = mCameraManager.createCameraInput(null,"cameraInput"); + let camerainput = mCameraManager.createCameraInput(null, "cameraInput"); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_CAMERA_INPUT_0300 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -422,7 +422,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -439,7 +439,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_CAMERA_INPUT_0400 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let camerainput = mCameraManager.createCameraInput(null); } catch (error) { @@ -449,7 +449,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -466,7 +466,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_PREVIEW_OUTPUT_0100 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let previewoutput = mCameraManager.createPreviewOutput(null); } catch (error) { @@ -476,7 +476,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -493,9 +493,9 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_PREVIEW_OUTPUT_0200 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { - let previewoutput = mCameraManager.createPreviewOutput(null,"createoutput"); + let previewoutput = mCameraManager.createPreviewOutput(null, "createoutput"); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_PREVIEW_OUTPUT_0200 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -503,7 +503,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -520,9 +520,9 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_PHOTO_OUTPUT_0100 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { - let photooutput = mCameraManager.createPhotoOutput(null,"createoutput"); + let photooutput = mCameraManager.createPhotoOutput(null, "createoutput"); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_PHOTO_OUTPUT_0100 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -530,7 +530,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -547,7 +547,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_PHOTO_OUTPUT_0200 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let photooutput = mCameraManager.createPhotoOutput(null); } catch (error) { @@ -557,7 +557,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -574,7 +574,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_VIDEO_OUTPUT_0100 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let videooutput = mCameraManager.createVideoOutput(null); } catch (error) { @@ -584,7 +584,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -601,9 +601,9 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_VIDEO_OUTPUT_0200 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { - let videooutput = mCameraManager.createVideoOutput(null,"createoutput"); + let videooutput = mCameraManager.createVideoOutput(null, "createoutput"); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_VIDEO_OUTPUT_0200 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -611,7 +611,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -628,7 +628,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_METADATA_OUTPUT_0100 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let videooutput = mCameraManager.createMetadataOutput(null); } catch (error) { @@ -638,7 +638,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -655,7 +655,7 @@ export default function CameraErrorCodeUsecaseTest() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CREATE_METADATA_OUTPUT_0200 cameraManager == null || undefined") expect().assertFail(); done(); - } else { + } else { try { let metadataoutput = mCameraManager.createMetadataOutput(); } catch (error) { @@ -665,7 +665,7 @@ export default function CameraErrorCodeUsecaseTest() { expect(true).assertTrue(); } done(); - } + } }) /** @@ -862,7 +862,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - mPhotoOutput.capture({},async (err) => { + mPhotoOutput.capture({}, async (err) => { if (!err) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_PHOTOOUTPUT_CAPTURE_0200 success"); } else { @@ -1118,7 +1118,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let isFlash = mCameraSession.hasFlash(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_HASFLASH_0100 FAILED"); @@ -1145,7 +1145,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let isFlashmodesupported = mCameraSession.isFlashModeSupported(cameraObj.FlashMode.FLASH_MODE_AUTO); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_ISFLASHMODESUPPORTED_0100 FAILED"); @@ -1172,7 +1172,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let flashmode = mCameraSession.getFlashMode(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETFLASHMODE_0100 FAILED"); @@ -1199,7 +1199,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { mCameraSession.setFlashMode(cameraObj.FlashMode.FLASH_MODE_AUTO); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETFLASHMODE_0100 FAILED"); @@ -1228,7 +1228,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ + try { mCameraSession.setFlashMode(5); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETFLASHMODE_0101 FAILED"); @@ -1254,7 +1254,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let issupported = mCameraSession.isExposureModeSupported(cameraObj.ExposureMode.EXPOSURE_MODE_AUTO); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_ISEXPOSUREMODESUPPORTED_0100 FAILED"); @@ -1281,7 +1281,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let exposure = mCameraSession.getExposureMode(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETEXPOSUREMODE_0100 FAILED"); @@ -1308,7 +1308,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { mCameraSession.setExposureMode(cameraObj.ExposureMode.EXPOSURE_MODE_AUTO); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETEXPOSUREMODE_0100 FAILED"); @@ -1336,7 +1336,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ + try { mCameraSession.setExposureMode(5); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETEXPOSUREMODE_0101 FAILED"); @@ -1362,7 +1362,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let point = mCameraSession.getMeteringPoint(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETMETERINGPOINT_0100 FAILED"); @@ -1389,8 +1389,8 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ - mCameraSession.setMeteringPoint({x:1,y:1}); + try { + mCameraSession.setMeteringPoint({ x: 1, y: 1 }); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETMETERINGPOINT_0100 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -1418,8 +1418,8 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ - mCameraSession.setMeteringPoint({x:-1,y:-1}); + try { + mCameraSession.setMeteringPoint({ x: -1, y: -1 }); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETMETERINGPOINT_0101 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -1444,7 +1444,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let range = mCameraSession.getExposureBiasRange(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETEXPOSUREBIASRANGE_0100 FAILED"); @@ -1471,7 +1471,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let range = mCameraSession.getExposureBiasRange(); mCameraSession.setExposureBias(range[0]); } catch (error) { @@ -1501,7 +1501,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ + try { let range = mCameraSession.getExposureBiasRange(); mCameraSession.setExposureBias(-101); } catch (error) { @@ -1528,7 +1528,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let value = mCameraSession.getExposureValue(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETEXPOSUREVALUE_0100 FAILED"); @@ -1555,7 +1555,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let issupported = mCameraSession.isFocusModeSupported(cameraObj.FocusMode.FOCUS_MODE_AUTO); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_ISFOCUSMODESUPPORTED_0100 FAILED"); @@ -1582,7 +1582,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let focusmode = mCameraSession.getFocusMode(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETFOCUSMODE_0100 FAILED"); @@ -1609,7 +1609,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { mCameraSession.setFocusMode(cameraObj.FocusMode.FOCUS_MODE_MANUAL); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETFOCUSMODE_0100 FAILED"); @@ -1637,7 +1637,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ + try { mCameraSession.setFocusMode(5); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETFOCUSMODE_0101 FAILED"); @@ -1663,8 +1663,8 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ - mCameraSession.setFocusPoint({x:1,y:1}); + try { + mCameraSession.setFocusPoint({ x: 1, y: 1 }); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETFOCUSPOINT_0100 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -1692,8 +1692,8 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ - mCameraSession.setFocusPoint({x:-1,y:-1}); + try { + mCameraSession.setFocusPoint({ x: -1, y: -1 }); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETFOCUSPOINT_0101 FAILED"); console.info(TAG + "ERRORCODE: " + error.code); @@ -1712,7 +1712,7 @@ export default function CameraErrorCodeUsecaseTest() { */ it('SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETFOCUSPOINT_0100', 0, async function (done) { console.info("--------------SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETFOCUSPOINT_0100--------------"); - if(mCameraSession){ + if (mCameraSession) { mCameraSession.release(); mCameraSession = null; } @@ -1722,7 +1722,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let point = mCameraSession.getFocusPoint(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETFOCUSPOINT_0100 FAILED"); @@ -1749,7 +1749,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let length = mCameraSession.getFocalLength(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETFOCUSLENGTH_0100 FAILED"); @@ -1776,7 +1776,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let zoomratiorange = mCameraSession.getZoomRatioRange(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETZOOMRATIORANG_0100 FAILED"); @@ -1803,7 +1803,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let zoomratio = mCameraSession.getZoomRatio(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_GETZOOMRATIO_0100 FAILED"); @@ -1830,7 +1830,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let zoomratiorange = mCameraSession.getZoomRatioRange(); mCameraSession.setZoomRatio(zoomratiorange[0]); } catch (error) { @@ -1860,7 +1860,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ + try { let zoomratiorange = mCameraSession.getZoomRatioRange(); mCameraSession.setZoomRatio(-101); } catch (error) { @@ -1887,7 +1887,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let isVSMS = mCameraSession.isVideoStabilizationModeSupported(cameraObj.VideoStabilizationMode.LOW); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_ISVSMS_0100 FAILED"); @@ -1914,7 +1914,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { let avstmode = mCameraSession.getActiveVideoStabilizationMode(); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_AVSTMODE_0100 FAILED"); @@ -1941,7 +1941,7 @@ export default function CameraErrorCodeUsecaseTest() { createOutput(0); mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); - try{ + try { mCameraSession.setVideoStabilizationMode(cameraObj.VideoStabilizationMode.LOW); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETVSTMODE_0100 FAILED"); @@ -1970,7 +1970,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); await mCameraSession.start(); - try{ + try { mCameraSession.setVideoStabilizationMode(5); } catch (error) { console.info(TAG + "SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_CAPTURESESSION_SETVSTMODE_0101 FAILED"); @@ -2240,7 +2240,7 @@ export default function CameraErrorCodeUsecaseTest() { mCameraSession.addOutput(mPreviewOutput); mCameraSession.addOutput(mPhotoOutput); await commitCameraSessionConfig(); - mPhotoOutput.capture(captureSetting,async (err) => { + mPhotoOutput.capture(captureSetting, async (err) => { if (!err) { expect(true).assertTrue(); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ERROR_CODE_USECASE_PHOTOOUTPUT_CAPTURE_0700 success"); diff --git a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets index 4e561e104af6b39789a108f5effbdd8428582ccc..c05f545c5d2e8aea74a9ffdb4120fc970c1cc478 100644 --- a/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets +++ b/multimedia/camera/camera_js_standard/entry/src/main/ets/test/CameraJSUnitOutput.test.ets @@ -412,7 +412,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_CALLBACK_0100--------------"); if (isEmpty(cameraManager)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_METADATA_OUTPUT_CALLBACK_0100 cameraManager == null || undefined") @@ -574,7 +574,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_CALLBACK_0100--------------"); if (isEmpty(captureSession)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_ADD_METADATA_OUTPUT_CALLBACK_0100 captureSession == null || undefined") @@ -629,7 +629,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100--------------"); if (isEmpty(metadataOutput)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_ON_AVAILABLE_METADATA_OUTPUT_CALLBACK_0100 metadataOutput == null || undefined") @@ -693,7 +693,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100--------------"); if (isEmpty(captureSession)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100 captureSession == null || undefined") @@ -725,7 +725,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100--------------"); if (isEmpty(metadataOutput)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_CALLBACK_0100 metadataOutput == null || undefined") @@ -753,7 +753,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100--------------"); if (isEmpty(mMetadataObjectArray)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_TYPE_PROMISE_0100 mMetadataObjectArray == null || undefined") @@ -774,7 +774,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100--------------"); if (isEmpty(mMetadataObjectArray)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_TIMESTAMP_PROMISE_0100 mMetadataObjectArray == null || undefined") @@ -795,7 +795,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100--------------"); if (isEmpty(mMetadataObjectArray)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_GET_METADATA_BOUNDING_BOX_PROMISE_0100 mMetadataObjectArray == null || undefined") @@ -821,7 +821,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100--------------"); if (isEmpty(metadataOutput)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_CALLBACK_0100 metadataOutput == null || undefined") @@ -1069,7 +1069,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100--------------"); if (isEmpty(photoOutput)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_IS_MIRROR_SUPPORTED_PROMISE_0100 photoOutput == null || undefined") @@ -1102,8 +1102,8 @@ export default function cameraJSUnitOutput() { await photoOutput.capture().then(() => { console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_DEFAULT_PROMISE_0100 success'); }).catch((err) => { - console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_DEFAULT_PROMISE_0100 failed :' + err); - expect().assertFail(); + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_DEFAULT_PROMISE_0100 failed :' + err); + expect().assertFail(); }); } await sleep(1000); @@ -1152,7 +1152,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100--------------"); if (isEmpty(photoOutput)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 photoOutput == null || undefined") @@ -1168,15 +1168,15 @@ export default function cameraJSUnitOutput() { await photoOutput.capture(captureSetting).then((result) => { console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 success :' + result); }).catch((err) => { - console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 failed :' + err); + console.info('SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_PROMISE_0100 failed :' + err); }); - + } await sleep(1000); done(); }) - + /** * @tc.number : SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CAPTURE_SETTING_CALLBACK_0100 @@ -1226,12 +1226,20 @@ export default function cameraJSUnitOutput() { } else { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 to operate"); let count = 0; - photoOutput.on('captureStart', async (data) => { - count++; - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"); - await sleep(1000); - done(); + photoOutput.on('captureStart', async (err, data) => { + if (!err) { + expect(true).assertTrue(); + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"); + // count++; + // console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success"); + // await sleep(1000); + // done(); + } else { + expect().assertFail(); + console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 FAILED: " + err.message); + } }) + await sleep(1000); photoOutput.capture(); // expect(count == 1).assertTrue(); } @@ -1297,13 +1305,16 @@ export default function cameraJSUnitOutput() { } else { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 to operate"); let count = 0; - photoOutput.on('captureEnd', async (data) => { - count++; - console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 success"); - console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, captureId = " + data.captureId); - console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, frameCount = " + data.frameCount); - await sleep(1000); - done(); + photoOutput.on('captureEnd', async (err, data) => { + if (!err) { + count++; + console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 success"); + console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, captureId = " + data.captureId); + console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100, frameCount = " + data.frameCount); + } else { + expect().assertFail(); + console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 FAILED: " + err.message); + } }) await sleep(1000); done(); @@ -1332,11 +1343,11 @@ export default function cameraJSUnitOutput() { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_ERROR_0100 to operate"); photoOutput.on('error', async (err, data) => { if (!err) { - expect(true).assertTrue(); console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_ERROR_0100 success"); + expect(true).assertTrue(); } else { - expect().assertFail(); console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_ERROR_0100 FAILED: " + err.message); + expect().assertFail(); } await sleep(1000); done(); @@ -1439,7 +1450,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100--------------"); if (isEmpty(metadataOutput)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_START_METADATA_OUTPUT_PROMISE_0100 metadataOutput == null || undefined") @@ -1464,7 +1475,7 @@ export default function cameraJSUnitOutput() { * @tc.type : Function * @tc.level : Level 1 */ - it('SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100', 1, async function (done) { + it('SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100', 1, async function (done) { console.info(TAG + " --------------SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100--------------"); if (isEmpty(metadataOutput)) { console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_STOP_METADATA_OUTPUT_PROMISE_0100 metadataOutput == null || undefined")