提交 5c3eb9dd 编写于 作者: Y yygxr

fix xts case error for musl

Signed-off-by: Nyygxr <wuhao30@huawei.com>
上级 f5cf1c29
......@@ -262,23 +262,32 @@ export default function CameraInputTest(surfaceId) {
async function createOutput(idx:any) {
console.info('Enter createOutput');
let cameraOutputCap = await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]);
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], surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
}
let cameraOutputCap = null;
await mCameraManager.getSupportedOutputCapability(mCameraDevicesArray[idx]).then((result) => {
console.info('getSupportedOutputCapability success');
cameraOutputCap = result;
}).catch((err) => {
console.info('getSupportedOutputCapability failed, err = ' + err.message);
});
if (isEmpty(mPreviewOutput)) {
console.info(TAG + "createPreviewOutput FAILED");
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], surfaceId);
if (!isEmpty(mPreviewOutput)) {
break;
}
}
if (isEmpty(mPreviewOutput)) {
console.info(TAG + "createPreviewOutput FAILED");
}
console.info(TAG + "createPreviewOutput: " + mPreviewOutput);
}
console.info(TAG + "createPreviewOutput: " + mPreviewOutput);
}
console.info('Exit createOutputs');
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册