From c78ac26e3a65328fc0118f16ee76a800d0687eb7 Mon Sep 17 00:00:00 2001 From: Ruben Brunk Date: Thu, 13 Aug 2015 17:58:46 -0700 Subject: Add experimental camera session prepare API. Bug: 18949148 Change-Id: I8f73e68ea2e3acc60d98954106f364d13f439a82 --- include/camera/camera2/ICameraDeviceUser.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/camera') diff --git a/include/camera/camera2/ICameraDeviceUser.h b/include/camera/camera2/ICameraDeviceUser.h index a7bf8ab..4d8eb53 100644 --- a/include/camera/camera2/ICameraDeviceUser.h +++ b/include/camera/camera2/ICameraDeviceUser.h @@ -140,6 +140,11 @@ public: virtual status_t prepare(int streamId) = 0; /** + * Preallocate up to maxCount buffers for a given output stream asynchronously. + */ + virtual status_t prepare2(int maxCount, int streamId) = 0; + + /** * Free all unused buffers for a given output stream. */ virtual status_t tearDown(int streamId) = 0; -- cgit v1.1 From 412fe56cd7cf7d73bc5d2bcc3f635bc650d18de9 Mon Sep 17 00:00:00 2001 From: Eino-Ville Talvala Date: Thu, 20 Aug 2015 17:08:32 -0700 Subject: CameraService: Notify camera service proxy of device status Send the camera proxy service in system server updates to camera device state: opened/closed/active/idle. Bug: 23393557 Change-Id: Id7c70f134821efa34af8f6e7b4caa4c2ab128ebc --- include/camera/ICameraServiceProxy.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include/camera') diff --git a/include/camera/ICameraServiceProxy.h b/include/camera/ICameraServiceProxy.h index 12a555f..2613c01 100644 --- a/include/camera/ICameraServiceProxy.h +++ b/include/camera/ICameraServiceProxy.h @@ -23,15 +23,30 @@ namespace android { +/** + * Interface from native camera service to managed-side camera service proxy. + * + * Keep in sync with frameworks/base/core/java/android/hardware/ICameraServiceProxy.aidl + * + */ class ICameraServiceProxy : public IInterface { public: enum { PING_FOR_USER_UPDATE = IBinder::FIRST_CALL_TRANSACTION, + NOTIFY_CAMERA_STATE + }; + + enum CameraState { + CAMERA_STATE_OPEN, + CAMERA_STATE_ACTIVE, + CAMERA_STATE_IDLE, + CAMERA_STATE_CLOSED }; DECLARE_META_INTERFACE(CameraServiceProxy); virtual void pingForUserUpdate() = 0; + virtual void notifyCameraState(String16 cameraId, CameraState newCameraState) = 0; }; class BnCameraServiceProxy: public BnInterface @@ -48,5 +63,3 @@ public: }; // namespace android #endif // ANDROID_HARDWARE_ICAMERASERVICEPROXY_H - - -- cgit v1.1