diff options
author | Jianing Wei <jianingwei@google.com> | 2014-03-12 18:29:36 -0700 |
---|---|---|
committer | Jianing Wei <jianingwei@google.com> | 2014-04-10 11:54:08 -0700 |
commit | cb0652e5a850b2fcd919e977247e87239efaf70e (patch) | |
tree | bdba4ac95dedd4ad9be77b9f5a86e147c11224f3 /services/camera/libcameraservice/api_pro | |
parent | d27368f7d28813f7dad37fc31940c822df80e68e (diff) | |
download | frameworks_av-cb0652e5a850b2fcd919e977247e87239efaf70e.zip frameworks_av-cb0652e5a850b2fcd919e977247e87239efaf70e.tar.gz frameworks_av-cb0652e5a850b2fcd919e977247e87239efaf70e.tar.bz2 |
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
Diffstat (limited to 'services/camera/libcameraservice/api_pro')
-rw-r--r-- | services/camera/libcameraservice/api_pro/ProCamera2Client.cpp | 9 | ||||
-rw-r--r-- | services/camera/libcameraservice/api_pro/ProCamera2Client.h | 5 |
2 files changed, 6 insertions, 8 deletions
diff --git a/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp b/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp index 1a7a7a7..0f6d278 100644 --- a/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp +++ b/services/camera/libcameraservice/api_pro/ProCamera2Client.cpp @@ -373,9 +373,7 @@ void ProCamera2Client::detachDevice() { Camera2ClientBase::detachDevice(); } -/** Device-related methods */ -void ProCamera2Client::onFrameAvailable(int32_t requestId, - const CameraMetadata& frame) { +void ProCamera2Client::onResultAvailable(const CaptureResult& result) { ATRACE_CALL(); ALOGV("%s", __FUNCTION__); @@ -383,13 +381,12 @@ void ProCamera2Client::onFrameAvailable(int32_t requestId, SharedCameraCallbacks::Lock l(mSharedCameraCallbacks); if (mRemoteCallback != NULL) { - CameraMetadata tmp(frame); + CameraMetadata tmp(result.mMetadata); camera_metadata_t* meta = tmp.release(); ALOGV("%s: meta = %p ", __FUNCTION__, meta); - mRemoteCallback->onResultReceived(requestId, meta); + mRemoteCallback->onResultReceived(result.mResultExtras.requestId, meta); tmp.acquire(meta); } - } bool ProCamera2Client::enforceRequestPermissions(CameraMetadata& metadata) { diff --git a/services/camera/libcameraservice/api_pro/ProCamera2Client.h b/services/camera/libcameraservice/api_pro/ProCamera2Client.h index 8a0f547..9d83122 100644 --- a/services/camera/libcameraservice/api_pro/ProCamera2Client.h +++ b/services/camera/libcameraservice/api_pro/ProCamera2Client.h @@ -21,6 +21,7 @@ #include "common/FrameProcessorBase.h" #include "common/Camera2ClientBase.h" #include "device2/Camera2Device.h" +#include "camera/CaptureResult.h" namespace android { @@ -97,8 +98,8 @@ public: protected: /** FilteredListener implementation **/ - virtual void onFrameAvailable(int32_t requestId, - const CameraMetadata& frame); + virtual void onResultAvailable(const CaptureResult& result); + virtual void detachDevice(); private: |