From 8951a97b1f8462c37e740ea5082eea0445d2c501 Mon Sep 17 00:00:00 2001 From: Iliyan Malchev Date: Thu, 14 Apr 2011 16:55:59 -0700 Subject: frameworks/base: switch CameraService to a HAL module This patch changes CameraService to load a camera HAL module, instead of linking directly against a library that implements the CameraHardwareInterface class. CameraHardwareInterface no longer defines the API to the camera HAL. Instead, this is now in HAL header hardware/camera.h. We keep CamerHardwareInterface as a class local to CameraService, which wraps around the new HAL calls. In the future, we may remove this class entirely and have CameraService call the HAL methods directly. Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641 Signed-off-by: Iliyan Malchev --- services/camera/libcameraservice/CameraService.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'services/camera/libcameraservice/CameraService.h') diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h index 9a9ab0e..5e2d571 100644 --- a/services/camera/libcameraservice/CameraService.h +++ b/services/camera/libcameraservice/CameraService.h @@ -19,9 +19,8 @@ #define ANDROID_SERVERS_CAMERA_CAMERASERVICE_H #include - #include -#include +#include /* This needs to be increased if we can have more cameras */ #define MAX_CAMERAS 2 @@ -30,6 +29,7 @@ namespace android { class MemoryHeapBase; class MediaPlayer; +class CameraHardwareInterface; class CameraService : public BinderService, @@ -53,6 +53,7 @@ public: virtual status_t dump(int fd, const Vector& args); virtual status_t onTransact(uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags); + virtual void onFirstRef(); enum sound_kind { SOUND_SHUTTER = 0, @@ -199,6 +200,8 @@ private: // is found to be disabled. It returns true if mLock is grabbed. bool lockIfMessageWanted(int32_t msgType); }; + + camera_module_t *mModule; }; } // namespace android -- cgit v1.1