Loading services/camera/libcameraservice/device3/Camera3Device.cpp +16 −1 Original line number Diff line number Diff line Loading @@ -1417,7 +1417,12 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) { } InFlightRequest &request = mInFlightMap.editValueAt(idx); timestamp = request.captureTimestamp; if (timestamp == 0) { /** * One of the following must happen before it's legal to call process_capture_result: * - CAMERA3_MSG_SHUTTER (expected during normal operation) * - CAMERA3_MSG_ERROR (expected during flush) */ if (request.requestStatus == OK && timestamp == 0) { SET_ERR("Called before shutter notify for frame %d", frameNumber); return; Loading Loading @@ -1541,6 +1546,16 @@ void Camera3Device::notify(const camera3_notify_msg *msg) { ALOGV("Camera %d: %s: HAL error, frame %d, stream %d: %d", mId, __FUNCTION__, msg->message.error.frame_number, streamId, msg->message.error.error_code); // Set request error status for the request in the in-flight tracking { Mutex::Autolock l(mInFlightLock); ssize_t idx = mInFlightMap.indexOfKey(msg->message.error.frame_number); if (idx >= 0) { mInFlightMap.editValueAt(idx).requestStatus = msg->message.error.error_code; } } if (listener != NULL) { listener->notifyError(msg->message.error.error_code, msg->message.error.frame_number, streamId); Loading services/camera/libcameraservice/device3/Camera3Device.h +2 −0 Original line number Diff line number Diff line Loading @@ -438,6 +438,7 @@ class Camera3Device : int requestId; // Set by notify() SHUTTER call. nsecs_t captureTimestamp; int requestStatus; // Set by process_capture_result call with valid metadata bool haveResultMetadata; // Decremented by calls to process_capture_result with valid output Loading @@ -448,6 +449,7 @@ class Camera3Device : InFlightRequest() : requestId(0), captureTimestamp(0), requestStatus(OK), haveResultMetadata(false), numBuffersLeft(0) { } Loading Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +16 −1 Original line number Diff line number Diff line Loading @@ -1417,7 +1417,12 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) { } InFlightRequest &request = mInFlightMap.editValueAt(idx); timestamp = request.captureTimestamp; if (timestamp == 0) { /** * One of the following must happen before it's legal to call process_capture_result: * - CAMERA3_MSG_SHUTTER (expected during normal operation) * - CAMERA3_MSG_ERROR (expected during flush) */ if (request.requestStatus == OK && timestamp == 0) { SET_ERR("Called before shutter notify for frame %d", frameNumber); return; Loading Loading @@ -1541,6 +1546,16 @@ void Camera3Device::notify(const camera3_notify_msg *msg) { ALOGV("Camera %d: %s: HAL error, frame %d, stream %d: %d", mId, __FUNCTION__, msg->message.error.frame_number, streamId, msg->message.error.error_code); // Set request error status for the request in the in-flight tracking { Mutex::Autolock l(mInFlightLock); ssize_t idx = mInFlightMap.indexOfKey(msg->message.error.frame_number); if (idx >= 0) { mInFlightMap.editValueAt(idx).requestStatus = msg->message.error.error_code; } } if (listener != NULL) { listener->notifyError(msg->message.error.error_code, msg->message.error.frame_number, streamId); Loading
services/camera/libcameraservice/device3/Camera3Device.h +2 −0 Original line number Diff line number Diff line Loading @@ -438,6 +438,7 @@ class Camera3Device : int requestId; // Set by notify() SHUTTER call. nsecs_t captureTimestamp; int requestStatus; // Set by process_capture_result call with valid metadata bool haveResultMetadata; // Decremented by calls to process_capture_result with valid output Loading @@ -448,6 +449,7 @@ class Camera3Device : InFlightRequest() : requestId(0), captureTimestamp(0), requestStatus(OK), haveResultMetadata(false), numBuffersLeft(0) { } Loading