Loading camera/libcameraservice/CameraHardwareStub.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,12 @@ CameraParameters CameraHardwareStub::getParameters() const return mParameters; } status_t CameraHardwareStub::sendCommand(int32_t command, int32_t arg1, int32_t arg2) { return BAD_VALUE; } void CameraHardwareStub::release() { } Loading camera/libcameraservice/CameraHardwareStub.h +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ public: virtual status_t dump(int fd, const Vector<String16>& args) const; virtual status_t setParameters(const CameraParameters& params); virtual CameraParameters getParameters() const; virtual status_t sendCommand(int32_t command, int32_t arg1, int32_t arg2); virtual void release(); static sp<CameraHardwareInterface> createInstance(); Loading camera/libcameraservice/CameraService.cpp +18 −3 Original line number Diff line number Diff line Loading @@ -1134,6 +1134,21 @@ String8 CameraService::Client::getParameters() const return params; } status_t CameraService::Client::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) { LOGD("sendCommand (pid %d)", getCallingPid()); Mutex::Autolock lock(mLock); status_t result = checkPid(); if (result != NO_ERROR) return result; if (mHardware == 0) { LOGE("mHardware is NULL, returning."); return INVALID_OPERATION; } return mHardware->sendCommand(cmd, arg1, arg2); } void CameraService::Client::copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size) { LOGV("copyFrameAndPostCopiedFrame"); Loading camera/libcameraservice/CameraService.h +3 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,9 @@ private: // get preview/capture parameters - key/value pairs virtual String8 getParameters() const; // send command to camera driver virtual status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2); // our client... const sp<ICameraClient>& getCameraClient() const { return mCameraClient; } Loading include/ui/Camera.h +9 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,12 @@ enum { CAMERA_MSG_ALL_MSGS = 0x1FF }; // cmdType in sendCommand functions enum { CAMERA_CMD_START_SMOOTH_ZOOM = 1, CAMERA_CMD_STOP_SMOOTH_ZOOM = 2, }; // camera fatal errors enum { CAMERA_ERROR_UKNOWN = 1, Loading Loading @@ -155,6 +161,9 @@ public: // get preview/capture parameters - key/value pairs String8 getParameters() const; // send command to camera driver status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2); void setListener(const sp<CameraListener>& listener); void setPreviewCallbackFlags(int preview_callback_flag); Loading Loading
camera/libcameraservice/CameraHardwareStub.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,12 @@ CameraParameters CameraHardwareStub::getParameters() const return mParameters; } status_t CameraHardwareStub::sendCommand(int32_t command, int32_t arg1, int32_t arg2) { return BAD_VALUE; } void CameraHardwareStub::release() { } Loading
camera/libcameraservice/CameraHardwareStub.h +2 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,8 @@ public: virtual status_t dump(int fd, const Vector<String16>& args) const; virtual status_t setParameters(const CameraParameters& params); virtual CameraParameters getParameters() const; virtual status_t sendCommand(int32_t command, int32_t arg1, int32_t arg2); virtual void release(); static sp<CameraHardwareInterface> createInstance(); Loading
camera/libcameraservice/CameraService.cpp +18 −3 Original line number Diff line number Diff line Loading @@ -1134,6 +1134,21 @@ String8 CameraService::Client::getParameters() const return params; } status_t CameraService::Client::sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) { LOGD("sendCommand (pid %d)", getCallingPid()); Mutex::Autolock lock(mLock); status_t result = checkPid(); if (result != NO_ERROR) return result; if (mHardware == 0) { LOGE("mHardware is NULL, returning."); return INVALID_OPERATION; } return mHardware->sendCommand(cmd, arg1, arg2); } void CameraService::Client::copyFrameAndPostCopiedFrame(sp<IMemoryHeap> heap, size_t offset, size_t size) { LOGV("copyFrameAndPostCopiedFrame"); Loading
camera/libcameraservice/CameraService.h +3 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,9 @@ private: // get preview/capture parameters - key/value pairs virtual String8 getParameters() const; // send command to camera driver virtual status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2); // our client... const sp<ICameraClient>& getCameraClient() const { return mCameraClient; } Loading
include/ui/Camera.h +9 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,12 @@ enum { CAMERA_MSG_ALL_MSGS = 0x1FF }; // cmdType in sendCommand functions enum { CAMERA_CMD_START_SMOOTH_ZOOM = 1, CAMERA_CMD_STOP_SMOOTH_ZOOM = 2, }; // camera fatal errors enum { CAMERA_ERROR_UKNOWN = 1, Loading Loading @@ -155,6 +161,9 @@ public: // get preview/capture parameters - key/value pairs String8 getParameters() const; // send command to camera driver status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2); void setListener(const sp<CameraListener>& listener); void setPreviewCallbackFlags(int preview_callback_flag); Loading