提交 e238285f 编写于 作者: S songchunpeng

modify output xts

Signed-off-by: Nsongchunpeng <songchunpeng@huawei.com>
上级 6527866f
......@@ -387,9 +387,9 @@ export default function cameraJSUnitOutput(surfaceId: any) {
}
cameraInput.open(async (err) => {
if (!err) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_OUTPUT_PROMISE_0100 open callback");
expect(true).assertTrue();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CREATE_CAMERA_OUTPUT_PROMISE_0100 FAILED: " + err.message);
expect().assertFail();
}
await sleep(1000);
done();
......@@ -881,7 +881,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100 captureSession == null || undefined")
expect().assertFail();
} else {
captureSession.start(async (err, data) => {
captureSession.start(async (err) => {
if (!err) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_CAPTURE_SESSION_START_CALLBACK_0100 success");
expect(true).assertTrue();
......@@ -1204,7 +1204,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_START_PREVIEW_OUTPUT_CALLBACK_0100 previewOutput == null || undefined")
expect().assertFail();
} else {
previewOutput.start(async (err, data) => {
previewOutput.start(async (err) => {
if (!err) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_START_PREVIEW_OUTPUT_CALLBACK_0100 success");
expect(true).assertTrue();
......@@ -1236,7 +1236,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_STOP_PREVIEW_OUTPUT_CALLBACK_0100 previewOutput == null || undefined")
expect().assertFail();
} else {
previewOutput.stop(async (err, data) => {
previewOutput.stop(async (err) => {
if (!err) {
expect(true).assertTrue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_STOP_PREVIEW_OUTPUT_CALLBACK_0100 success");
......@@ -1269,10 +1269,11 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_START_0100 to operate");
let count = 0;
previewOutput.on('frameStart', async (err, data) => {
if (!err) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_START_0100 success");
expect(true).assertTrue();
count++;
} else {
console.info(TAG + "Error in SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_START_0100 FAILED: " + err.message);
expect().assertFail();
......@@ -1280,6 +1281,11 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await sleep(1000);
done();
})
await sleep(1000);
done();
previewOutput.start();
previewOutput.stop();
// expect(count == 1).assertTrue();
}
await sleep(1000);
done();
......@@ -1302,9 +1308,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_END_0100 to operate");
let count = 0;
previewOutput.on('frameEnd', async (err, data) => {
if (!err) {
expect(true).assertTrue();
count++
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_FRAME_END_0100 success");
} else {
expect().assertFail();
......@@ -1313,6 +1320,8 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await sleep(1000);
done();
})
previewOutput.stop();
// expect(count == 1).assertTrue();
}
await sleep(1000);
done();
......@@ -1336,7 +1345,6 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_ERROR_0100 to operate");
previewOutput.on('error', async (err, data) => {
if (!err) {
expect(true).assertTrue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PREVIEW_OUTPUT_CALLBACK_ON_ERROR_0100 success");
} else {
expect().assertFail();
......@@ -1559,9 +1567,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 to operate");
let count = 0;
photoOutput.on('captureStart', async (err, data) => {
if (!err) {
expect(true).assertTrue();
count++;
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_START_0100 success");
} else {
expect().assertFail();
......@@ -1570,6 +1579,8 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await sleep(1000);
done();
})
photoOutput.capture();
// expect(count == 1).assertTrue();
}
await sleep(1000);
done();
......@@ -1592,9 +1603,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100 to operate");
let count = 0;
photoOutput.on('frameShutter', async (err, data) => {
if (!err) {
expect(true).assertTrue();
count++;
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100 success");
console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100, captureId = " + data.captureId);
console.info(TAG + "SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_FRAME_SHUTTER_0100, timestamp = " + data.timestamp);
......@@ -1605,6 +1617,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await sleep(1000);
done();
})
await sleep(1000);
done();
photoOutput.capture();
// expect(count == 1).assertTrue();
}
await sleep(1000);
done();
......@@ -1627,9 +1643,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
expect().assertFail();
} else {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_CALLBACK_ON_CAPTURE_END_0100 to operate");
let count = 0;
photoOutput.on('captureEnd', async (err, data) => {
if (!err) {
expect(true).assertTrue();
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);
......@@ -1640,6 +1657,10 @@ export default function cameraJSUnitOutput(surfaceId: any) {
await sleep(1000);
done();
})
await sleep(1000);
done();
photoOutput.capture();
// expect(count == 1).assertTrue();
}
await sleep(1000);
done();
......@@ -1695,7 +1716,7 @@ export default function cameraJSUnitOutput(surfaceId: any) {
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_RELEASE_CALLBACK_0100 photoOutput == null || undefined")
expect().assertFail();
} else {
photoOutput.release(async (err, data) => {
photoOutput.release(async (err) => {
if (!err) {
expect(true).assertTrue();
console.info(TAG + "Entering SUB_MULTIMEDIA_CAMERA_PHOTO_OUTPUT_RELEASE_CALLBACK_0100 success");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册