diff options
author | Iliyan Malchev <malchev@google.com> | 2011-04-14 16:51:21 -0700 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-05-03 15:49:39 -0700 |
commit | 9c7ac0d142eaf4b083a309299ab023932a9bb109 (patch) | |
tree | eacc12f5b030d872cf460ae77747eece8938c8fd /services/camera/libcameraservice/CameraService.cpp | |
parent | 9d216f7b0ef66e4d2e32f86cd7e31608fcce49b6 (diff) | |
download | frameworks_base-9c7ac0d142eaf4b083a309299ab023932a9bb109.zip frameworks_base-9c7ac0d142eaf4b083a309299ab023932a9bb109.tar.gz frameworks_base-9c7ac0d142eaf4b083a309299ab023932a9bb109.tar.bz2 |
frameworks/base: include system/core header camera.h in Camera.h
We define struct CameraInfo in this camera/Camera.h, even though an identical
struct camera_info is defined in hardware/camera.h (but not in
hardware/camera_defs.h). We may not export struct definitions from the HAL
into headers which may find their way into the NDK.
This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx.
Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'services/camera/libcameraservice/CameraService.cpp')
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index f4859ec..56c9246 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -320,7 +320,7 @@ CameraService::Client::Client(const sp<CameraService>& cameraService, CAMERA_MSG_FOCUS); // Callback is disabled by default - mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP; + mPreviewCallbackFlag = CAMERA_FRAME_CALLBACK_FLAG_NOOP; mOrientation = getOrientation(0, mCameraFacing == CAMERA_FACING_FRONT); mPlayShutterSound = true; cameraService->setCameraBusy(cameraId); @@ -410,7 +410,7 @@ status_t CameraService::Client::connect(const sp<ICameraClient>& client) { return NO_ERROR; } - mPreviewCallbackFlag = FRAME_CALLBACK_FLAG_NOOP; + mPreviewCallbackFlag = CAMERA_FRAME_CALLBACK_FLAG_NOOP; mClientPid = callingPid; mCameraClient = client; @@ -543,7 +543,7 @@ void CameraService::Client::setPreviewCallbackFlag(int callback_flag) { if (checkPidAndHardware() != NO_ERROR) return; mPreviewCallbackFlag = callback_flag; - if (mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ENABLE_MASK) { + if (mPreviewCallbackFlag & CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK) { enableMsgType(CAMERA_MSG_PREVIEW_FRAME); } else { disableMsgType(CAMERA_MSG_PREVIEW_FRAME); @@ -1009,7 +1009,7 @@ void CameraService::Client::handlePreviewData(const sp<IMemory>& mem) { int flags = mPreviewCallbackFlag; // is callback enabled? - if (!(flags & FRAME_CALLBACK_FLAG_ENABLE_MASK)) { + if (!(flags & CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK)) { // If the enable bit is off, the copy-out and one-shot bits are ignored LOG2("frame callback is disabled"); mLock.unlock(); @@ -1020,17 +1020,17 @@ void CameraService::Client::handlePreviewData(const sp<IMemory>& mem) { sp<ICameraClient> c = mCameraClient; // clear callback flags if no client or one-shot mode - if (c == 0 || (mPreviewCallbackFlag & FRAME_CALLBACK_FLAG_ONE_SHOT_MASK)) { + if (c == 0 || (mPreviewCallbackFlag & CAMERA_FRAME_CALLBACK_FLAG_ONE_SHOT_MASK)) { LOG2("Disable preview callback"); - mPreviewCallbackFlag &= ~(FRAME_CALLBACK_FLAG_ONE_SHOT_MASK | - FRAME_CALLBACK_FLAG_COPY_OUT_MASK | - FRAME_CALLBACK_FLAG_ENABLE_MASK); + mPreviewCallbackFlag &= ~(CAMERA_FRAME_CALLBACK_FLAG_ONE_SHOT_MASK | + CAMERA_FRAME_CALLBACK_FLAG_COPY_OUT_MASK | + CAMERA_FRAME_CALLBACK_FLAG_ENABLE_MASK); disableMsgType(CAMERA_MSG_PREVIEW_FRAME); } if (c != 0) { // Is the received frame copied out or not? - if (flags & FRAME_CALLBACK_FLAG_COPY_OUT_MASK) { + if (flags & CAMERA_FRAME_CALLBACK_FLAG_COPY_OUT_MASK) { LOG2("frame is copied"); copyFrameAndPostCopiedFrame(c, heap, offset, size); } else { |