summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/common
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2014-08-19 16:19:59 -0700
committerIgor Murashkin <iam@google.com>2014-08-20 20:58:57 +0000
commite2d167eb689d7a536805f950c31f11b9e9c578ae (patch)
tree8ef8aef0adfb4ad847d5031468dd6193acf6610d /services/camera/libcameraservice/common
parente0b5cf7eae5ae16699864eeb8ae36975caa7a26c (diff)
downloadframeworks_av-e2d167eb689d7a536805f950c31f11b9e9c578ae.zip
frameworks_av-e2d167eb689d7a536805f950c31f11b9e9c578ae.tar.gz
frameworks_av-e2d167eb689d7a536805f950c31f11b9e9c578ae.tar.bz2
camera: Configure streams immediately when API2 does configuration
This makes the configuration more eager (no more waiting until the first request) and also allows any errors to immediately be sent back to the client. Bug: 16629195 Change-Id: I0c365bc8f760466916dcc089217a43c43f9f4c9d
Diffstat (limited to 'services/camera/libcameraservice/common')
-rw-r--r--services/camera/libcameraservice/common/CameraDeviceBase.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/common/CameraDeviceBase.h b/services/camera/libcameraservice/common/CameraDeviceBase.h
index 9e124b0..d26e20c 100644
--- a/services/camera/libcameraservice/common/CameraDeviceBase.h
+++ b/services/camera/libcameraservice/common/CameraDeviceBase.h
@@ -141,6 +141,18 @@ class CameraDeviceBase : public virtual RefBase {
virtual status_t deleteReprocessStream(int id) = 0;
/**
+ * Take the currently-defined set of streams and configure the HAL to use
+ * them. This is a long-running operation (may be several hundered ms).
+ *
+ * The device must be idle (see waitUntilDrained) before calling this.
+ *
+ * Returns OK on success; otherwise on error:
+ * - BAD_VALUE if the set of streams was invalid (e.g. fmts or sizes)
+ * - INVALID_OPERATION if the device was in the wrong state
+ */
+ virtual status_t configureStreams() = 0;
+
+ /**
* Create a metadata buffer with fields that the HAL device believes are
* best for the given use case
*/