From 93b94584edb1c59037319d9bbf84881ccff9f66a Mon Sep 17 00:00:00 2001 From: Dave Sparks Date: Thu, 7 May 2009 19:27:32 -0700 Subject: 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. --- camera/libcameraservice/CameraService.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'camera') 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& mem) { LOGD("postRaw"); - mCameraClient->rawCallback(mem); + mCameraClient->dataCallback(CAMERA_MSG_RAW_IMAGE, mem); } void CameraService::Client::postJpeg(const sp& mem) { LOGD("postJpeg"); - mCameraClient->jpegCallback(mem); + mCameraClient->dataCallback(CAMERA_MSG_COMPRESSED_IMAGE, mem); } void CameraService::Client::copyFrameAndPostCopiedFrame(sp heap, size_t offset, size_t size) @@ -960,7 +960,7 @@ void CameraService::Client::copyFrameAndPostCopiedFrame(sp 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& frame) @@ -970,7 +970,7 @@ void CameraService::Client::postRecordingFrame(const sp& frame) LOGW("frame is a null pointer"); return; } - mCameraClient->recordingCallback(frame); + mCameraClient->dataCallback(CAMERA_MSG_VIDEO_FRAME, frame); } void CameraService::Client::postPreviewFrame(const sp& mem) @@ -1004,7 +1004,7 @@ void CameraService::Client::postPreviewFrame(const sp& 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& 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& args) -- cgit v1.1