summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorDave Sparks <davidsparks@android.com>2009-05-07 19:27:32 -0700
committerDave Sparks <davidsparks@android.com>2009-05-11 07:36:58 -0700
commitd6289b1b03d209219c2dd3126ee8839a45682b33 (patch)
tree1c7d73bff30577aaf680aea9f72df5a219a1ca2d /camera
parentb4735b6c04c6bca3219115395748a1b5ef02ff6c (diff)
downloadframeworks_base-d6289b1b03d209219c2dd3126ee8839a45682b33.zip
frameworks_base-d6289b1b03d209219c2dd3126ee8839a45682b33.tar.gz
frameworks_base-d6289b1b03d209219c2dd3126ee8839a45682b33.tar.bz2
Modify camera framework to use new streamlined binder interface.
This is the second half of bug 1837832. Modifies the camera client and camera service to use the new binder interface. Removes the old binder interface. There will be one more part to this change to surface the undefined callbacks to the Java layer so that partners can implement new features without having to touch the stack.
Diffstat (limited to 'camera')
-rw-r--r--camera/libcameraservice/CameraService.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/camera/libcameraservice/CameraService.cpp b/camera/libcameraservice/CameraService.cpp
index 96ee502..f85ea9f 100644
--- a/camera/libcameraservice/CameraService.cpp
+++ b/camera/libcameraservice/CameraService.cpp
@@ -915,24 +915,24 @@ String8 CameraService::Client::getParameters() const
void CameraService::Client::postAutoFocus(bool focused)
{
LOGV("postAutoFocus");
- mCameraClient->autoFocusCallback(focused);
+ mCameraClient->notifyCallback(CAMERA_MSG_FOCUS, (int32_t)focused, 0);
}
void CameraService::Client::postShutter()
{
- mCameraClient->shutterCallback();
+ mCameraClient->notifyCallback(CAMERA_MSG_SHUTTER, 0, 0);
}
void CameraService::Client::postRaw(const sp<IMemory>& mem)
{
LOGD("postRaw");
- mCameraClient->rawCallback(mem);
+ mCameraClient->dataCallback(CAMERA_MSG_RAW_IMAGE, mem);
}
void CameraService::Client::postJpeg(const sp<IMemory>& mem)
{
LOGD("postJpeg");
- mCameraClient->jpegCallback(mem);
+ mCameraClient->dataCallback(CAMERA_MSG_COMPRESSED_IMAGE, mem);
}
void CameraService::Client::copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size)
@@ -960,7 +960,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, si
LOGE("failed to allocate space for frame callback");
return;
}
- mCameraClient->previewCallback(frame);
+ mCameraClient->dataCallback(CAMERA_MSG_PREVIEW_FRAME, frame);
}
void CameraService::Client::postRecordingFrame(const sp<IMemory>& frame)
@@ -970,7 +970,7 @@ void CameraService::Client::postRecordingFrame(const sp<IMemory>& frame)
LOGW("frame is a null pointer");
return;
}
- mCameraClient->recordingCallback(frame);
+ mCameraClient->dataCallback(CAMERA_MSG_VIDEO_FRAME, frame);
}
void CameraService::Client::postPreviewFrame(const sp<IMemory>& mem)
@@ -1004,7 +1004,7 @@ void CameraService::Client::postPreviewFrame(const sp<IMemory>& mem)
copyFrameAndPostCopiedFrame(heap, offset, size);
} else {
LOGV("frame is directly sent out without copying");
- mCameraClient->previewCallback(mem);
+ mCameraClient->dataCallback(CAMERA_MSG_PREVIEW_FRAME, mem);
}
// Is this is one-shot only?
@@ -1018,7 +1018,7 @@ void CameraService::Client::postPreviewFrame(const sp<IMemory>& mem)
void CameraService::Client::postError(status_t error)
{
- mCameraClient->errorCallback(error);
+ mCameraClient->notifyCallback(CAMERA_MSG_ERROR, error, 0);
}
status_t CameraService::dump(int fd, const Vector<String16>& args)