summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/api2/CameraDeviceClient.h
diff options
context:
space:
mode:
authorJianing Wei <jianingwei@google.com>2014-03-12 18:29:36 -0700
committerJianing Wei <jianingwei@google.com>2014-04-10 11:54:08 -0700
commitcb0652e5a850b2fcd919e977247e87239efaf70e (patch)
treebdba4ac95dedd4ad9be77b9f5a86e147c11224f3 /services/camera/libcameraservice/api2/CameraDeviceClient.h
parentd27368f7d28813f7dad37fc31940c822df80e68e (diff)
downloadframeworks_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/api2/CameraDeviceClient.h')
-rw-r--r--services/camera/libcameraservice/api2/CameraDeviceClient.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.h b/services/camera/libcameraservice/api2/CameraDeviceClient.h
index e96e1ae..0b37784 100644
--- a/services/camera/libcameraservice/api2/CameraDeviceClient.h
+++ b/services/camera/libcameraservice/api2/CameraDeviceClient.h
@@ -64,11 +64,17 @@ public:
// Note that the callee gets a copy of the metadata.
virtual status_t submitRequest(sp<CaptureRequest> request,
- bool streaming = false);
+ bool streaming = false,
+ /*out*/
+ int64_t* lastFrameNumber = NULL);
// List of requests are copied.
virtual status_t submitRequestList(List<sp<CaptureRequest> > requests,
- bool streaming = false);
- virtual status_t cancelRequest(int requestId);
+ bool streaming = false,
+ /*out*/
+ int64_t* lastFrameNumber = NULL);
+ virtual status_t cancelRequest(int requestId,
+ /*out*/
+ int64_t* lastFrameNumber = NULL);
// Returns -EBUSY if device is not idle
virtual status_t deleteStream(int streamId);
@@ -92,7 +98,8 @@ public:
virtual status_t waitUntilIdle();
// Flush all active and pending requests as fast as possible
- virtual status_t flush();
+ virtual status_t flush(/*out*/
+ int64_t* lastFrameNumber = NULL);
/**
* Interface used by CameraService
@@ -117,16 +124,16 @@ public:
*/
virtual void notifyIdle();
- virtual void notifyError();
- virtual void notifyShutter(int requestId, nsecs_t timestamp);
+ virtual void notifyError(ICameraDeviceCallbacks::CameraErrorCode errorCode,
+ const CaptureResultExtras& resultExtras);
+ virtual void notifyShutter(const CaptureResultExtras& resultExtras, nsecs_t timestamp);
/**
* Interface used by independent components of CameraDeviceClient.
*/
protected:
/** FilteredListener implementation **/
- virtual void onFrameAvailable(int32_t requestId,
- const CameraMetadata& frame);
+ virtual void onResultAvailable(const CaptureResult& result);
virtual void detachDevice();
// Calculate the ANativeWindow transform from android.sensor.orientation