提交 1d1fa35c 编写于 作者: Q qinliwen

<修复cameraVideo和cameraPreviewFormat切换format问题>

Signed-off-by: Nqinliwen <qinliwen3@huawei.com>
上级 0b78a33b
......@@ -141,12 +141,14 @@ class CameraService {
this.videoConfig.videoSourceType = 0
}
Logger.info(this.tag, `cameraDeviceIndex success: ${cameraDeviceIndex}`)
previewObj.format = this.cameraOutputCapability.previewProfiles[0].format
Logger.info(this.tag, `previewObj format: ${previewObj.format}`)
await this.releaseCamera()
await this.getCameraManagerFn()
await this.getSupportedCamerasFn()
await this.getSupportedOutputCapabilityFn(cameraDeviceIndex)
if (previewObj){
previewObj.format = this.cameraOutputCapability.previewProfiles[0].format
Logger.info(this.tag, `previewObj format: ${previewObj.format}`)
}
await this.createPreviewOutputFn(previewObj ? previewObj : this.cameraOutputCapability.previewProfiles[0], surfaceId)
// await this.createPhotoOutputFn(this.photoProfileObj)
await this.createPhotoOutputFn(obj ? obj : this.cameraOutputCapability.photoProfiles[photoIndex?photoIndex:0])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册