summaryrefslogtreecommitdiff
path: root/camera/libcameraservice/CameraService.cpp
diff options
context:
space:
mode:
author Dave Sparks <davidsparks@android.com> 2009-05-07 19:27:32 -0700
committer Dave Sparks <davidsparks@android.com> 2009-05-11 07:36:58 -0700
commit93b94584edb1c59037319d9bbf84881ccff9f66a (patch)
tree7397a7b18c5731e1350f15ff9e9855443261b8d5 /camera/libcameraservice/CameraService.cpp
parentacbd84df864a26d2a928dcc9975001f6f7fb42d7 (diff)
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/libcameraservice/CameraService.cpp')
-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 96ee502241..f85ea9f850 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)