From cb0652e5a850b2fcd919e977247e87239efaf70e Mon Sep 17 00:00:00 2001 From: Jianing Wei Date: Wed, 12 Mar 2014 18:29:36 -0700 Subject: CameraService: trigger appropriate callbacks for burst capture. * Instead of tracking CameraMetadata only, now we track both CameraMetadata and CaptureResultExtras, which is not part of the HAL metadata. This will enable the correct callback of onCaptureStarted and onResultReceived given burst requests. * Get last frame number in reply when submitting requests, canceling requests, and flushing device. For repeating requests, this frame number is the last frame number of the previous request. For non-repeating requests, this frame number is the expected last frame number of the current request. The goal is provide frame number to Java side in order to trigger onCaptureSequenceCompleted correctly. * Fix notifyError so that onDeviceError can be called correctly. Bug: 10749500 Change-Id: I2f3dda6c530090055d4a2ff9f0f087bbbe8d9257 --- services/camera/libcameraservice/CameraService.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'services/camera/libcameraservice/CameraService.h') diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h index 8853e48..76ea7be 100644 --- a/services/camera/libcameraservice/CameraService.h +++ b/services/camera/libcameraservice/CameraService.h @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -182,7 +183,9 @@ public: status_t finishCameraOps(); // Notify client about a fatal error - virtual void notifyError() = 0; + virtual void notifyError( + ICameraDeviceCallbacks::CameraErrorCode errorCode, + const CaptureResultExtras& resultExtras) = 0; private: AppOpsManager mAppOpsManager; @@ -259,7 +262,8 @@ public: // convert client from cookie. Client lock should be acquired before getting Client. static Client* getClientFromCookie(void* user); - virtual void notifyError(); + virtual void notifyError(ICameraDeviceCallbacks::CameraErrorCode errorCode, + const CaptureResultExtras& resultExtras); // Initialized in constructor @@ -307,7 +311,8 @@ public: virtual void onExclusiveLockStolen() = 0; protected: - virtual void notifyError(); + virtual void notifyError(ICameraDeviceCallbacks::CameraErrorCode errorCode, + const CaptureResultExtras& resultExtras); sp mRemoteCallback; }; // class ProClient -- cgit v1.1