From e09fd9e819c23dc90bca68375645e15544861330 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:05:43 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- libs/ui/ICameraClient.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'libs/ui/ICameraClient.cpp') diff --git a/libs/ui/ICameraClient.cpp b/libs/ui/ICameraClient.cpp index 3737034fe9..c5d6d52f4d 100644 --- a/libs/ui/ICameraClient.cpp +++ b/libs/ui/ICameraClient.cpp @@ -15,9 +15,11 @@ ** limitations under the License. */ +//#define LOG_NDEBUG 0 +#define LOG_TAG "ICameraClient" +#include #include #include - #include namespace android { @@ -42,6 +44,7 @@ public: // callback to let the app know the shutter has closed, ideal for playing the shutter sound void shutterCallback() { + LOGV("shutterCallback"); Parcel data, reply; data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor()); remote()->transact(SHUTTER_CALLBACK, data, &reply, IBinder::FLAG_ONEWAY); @@ -50,6 +53,7 @@ public: // callback from camera service to app with picture data void rawCallback(const sp& picture) { + LOGV("rawCallback"); Parcel data, reply; data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor()); data.writeStrongBinder(picture->asBinder()); @@ -59,6 +63,7 @@ public: // callback from camera service to app with picture data void jpegCallback(const sp& picture) { + LOGV("jpegCallback"); Parcel data, reply; data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor()); data.writeStrongBinder(picture->asBinder()); @@ -68,6 +73,7 @@ public: // callback from camera service to app with video frame data void frameCallback(const sp& frame) { + LOGV("frameCallback"); Parcel data, reply; data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor()); data.writeStrongBinder(frame->asBinder()); @@ -77,6 +83,7 @@ public: // callback from camera service to app to report error void errorCallback(status_t error) { + LOGV("errorCallback"); Parcel data, reply; data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor()); data.writeInt32(error); @@ -86,6 +93,7 @@ public: // callback from camera service to app to report autofocus completion void autoFocusCallback(bool focused) { + LOGV("autoFocusCallback"); Parcel data, reply; data.writeInterfaceToken(ICameraClient::getInterfaceDescriptor()); data.writeInt32(focused); @@ -108,35 +116,41 @@ status_t BnCameraClient::onTransact( { switch(code) { case SHUTTER_CALLBACK: { + LOGV("SHUTTER_CALLBACK"); CHECK_INTERFACE(ICameraClient, data, reply); shutterCallback(); return NO_ERROR; } break; case RAW_CALLBACK: { + LOGV("RAW_CALLBACK"); CHECK_INTERFACE(ICameraClient, data, reply); sp picture = interface_cast(data.readStrongBinder()); rawCallback(picture); return NO_ERROR; } break; case JPEG_CALLBACK: { + LOGV("JPEG_CALLBACK"); CHECK_INTERFACE(ICameraClient, data, reply); sp picture = interface_cast(data.readStrongBinder()); jpegCallback(picture); return NO_ERROR; } break; case FRAME_CALLBACK: { + LOGV("FRAME_CALLBACK"); CHECK_INTERFACE(ICameraClient, data, reply); sp frame = interface_cast(data.readStrongBinder()); frameCallback(frame); return NO_ERROR; } break; case ERROR_CALLBACK: { + LOGV("ERROR_CALLBACK"); CHECK_INTERFACE(ICameraClient, data, reply); status_t error = data.readInt32(); errorCallback(error); return NO_ERROR; } break; case AUTOFOCUS_CALLBACK: { + LOGV("AUTOFOCUS_CALLBACK"); CHECK_INTERFACE(ICameraClient, data, reply); bool focused = (bool)data.readInt32(); autoFocusCallback(focused); -- cgit v1.2.3-59-g8ed1b