Loading camera/device/3.2/default/CameraDeviceSession.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -1198,7 +1198,7 @@ Return<void> CameraDeviceSession::close() { return Void(); } void CameraDeviceSession::constructCaptureResult(CaptureResult& result, status_t CameraDeviceSession::constructCaptureResult(CaptureResult& result, const camera3_capture_result *hal_result) { uint32_t frameNumber = hal_result->frame_number; bool hasInputBuf = (hal_result->input_buffer != nullptr); Loading @@ -1213,7 +1213,7 @@ void CameraDeviceSession::constructCaptureResult(CaptureResult& result, if (mInflightBuffers.count(key) != 1) { ALOGE("%s: input buffer for stream %d frame %d is not inflight!", __FUNCTION__, streamId, frameNumber); return; return -EINVAL; } } Loading @@ -1224,7 +1224,7 @@ void CameraDeviceSession::constructCaptureResult(CaptureResult& result, if (mInflightBuffers.count(key) != 1) { ALOGE("%s: output buffer for stream %d frame %d is not inflight!", __FUNCTION__, streamId, frameNumber); return; return -EINVAL; } } } Loading Loading @@ -1344,7 +1344,7 @@ void CameraDeviceSession::constructCaptureResult(CaptureResult& result, ALOGV("%s: inflight buffer queue is now empty!", __FUNCTION__); } } return OK; } /** Loading @@ -1356,11 +1356,12 @@ void CameraDeviceSession::sProcessCaptureResult( CameraDeviceSession *d = const_cast<CameraDeviceSession*>(static_cast<const CameraDeviceSession*>(cb)); CaptureResult result; d->constructCaptureResult(result, hal_result); CaptureResult result = {}; status_t ret = d->constructCaptureResult(result, hal_result); if (ret == OK) { d->mResultBatcher.processCaptureResult(result); } } void CameraDeviceSession::sNotify( const camera3_callback_ops *cb, Loading camera/device/3.2/default/CameraDeviceSession.h +1 −1 Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ protected: static callbacks_process_capture_result_t sProcessCaptureResult; static callbacks_notify_t sNotify; void constructCaptureResult(CaptureResult& result, status_t constructCaptureResult(CaptureResult& result, const camera3_capture_result *hal_result); private: Loading camera/device/3.4/default/CameraDeviceSession.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -450,8 +450,12 @@ void CameraDeviceSession::sProcessCaptureResult_3_4( CameraDeviceSession *d = const_cast<CameraDeviceSession*>(static_cast<const CameraDeviceSession*>(cb)); CaptureResult result; d->constructCaptureResult(result.v3_2, hal_result); CaptureResult result = {}; status_t ret = d->constructCaptureResult(result.v3_2, hal_result); if (ret != OK) { return; } result.physicalCameraMetadata.resize(hal_result->num_physcam_metadata); for (uint32_t i = 0; i < hal_result->num_physcam_metadata; i++) { std::string physicalId = hal_result->physcam_ids[i]; Loading Loading
camera/device/3.2/default/CameraDeviceSession.cpp +9 −8 Original line number Diff line number Diff line Loading @@ -1198,7 +1198,7 @@ Return<void> CameraDeviceSession::close() { return Void(); } void CameraDeviceSession::constructCaptureResult(CaptureResult& result, status_t CameraDeviceSession::constructCaptureResult(CaptureResult& result, const camera3_capture_result *hal_result) { uint32_t frameNumber = hal_result->frame_number; bool hasInputBuf = (hal_result->input_buffer != nullptr); Loading @@ -1213,7 +1213,7 @@ void CameraDeviceSession::constructCaptureResult(CaptureResult& result, if (mInflightBuffers.count(key) != 1) { ALOGE("%s: input buffer for stream %d frame %d is not inflight!", __FUNCTION__, streamId, frameNumber); return; return -EINVAL; } } Loading @@ -1224,7 +1224,7 @@ void CameraDeviceSession::constructCaptureResult(CaptureResult& result, if (mInflightBuffers.count(key) != 1) { ALOGE("%s: output buffer for stream %d frame %d is not inflight!", __FUNCTION__, streamId, frameNumber); return; return -EINVAL; } } } Loading Loading @@ -1344,7 +1344,7 @@ void CameraDeviceSession::constructCaptureResult(CaptureResult& result, ALOGV("%s: inflight buffer queue is now empty!", __FUNCTION__); } } return OK; } /** Loading @@ -1356,11 +1356,12 @@ void CameraDeviceSession::sProcessCaptureResult( CameraDeviceSession *d = const_cast<CameraDeviceSession*>(static_cast<const CameraDeviceSession*>(cb)); CaptureResult result; d->constructCaptureResult(result, hal_result); CaptureResult result = {}; status_t ret = d->constructCaptureResult(result, hal_result); if (ret == OK) { d->mResultBatcher.processCaptureResult(result); } } void CameraDeviceSession::sNotify( const camera3_callback_ops *cb, Loading
camera/device/3.2/default/CameraDeviceSession.h +1 −1 Original line number Diff line number Diff line Loading @@ -327,7 +327,7 @@ protected: static callbacks_process_capture_result_t sProcessCaptureResult; static callbacks_notify_t sNotify; void constructCaptureResult(CaptureResult& result, status_t constructCaptureResult(CaptureResult& result, const camera3_capture_result *hal_result); private: Loading
camera/device/3.4/default/CameraDeviceSession.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -450,8 +450,12 @@ void CameraDeviceSession::sProcessCaptureResult_3_4( CameraDeviceSession *d = const_cast<CameraDeviceSession*>(static_cast<const CameraDeviceSession*>(cb)); CaptureResult result; d->constructCaptureResult(result.v3_2, hal_result); CaptureResult result = {}; status_t ret = d->constructCaptureResult(result.v3_2, hal_result); if (ret != OK) { return; } result.physicalCameraMetadata.resize(hal_result->num_physcam_metadata); for (uint32_t i = 0; i < hal_result->num_physcam_metadata; i++) { std::string physicalId = hal_result->physcam_ids[i]; Loading