From fa4cf9d310685b4c25877cba772ff7da84caf517 Mon Sep 17 00:00:00 2001 From: Igor Murashkin Date: Mon, 4 Mar 2013 16:14:23 -0800 Subject: (Camera)ProCamera: Remove unused functions from binder interface Change-Id: I0582268cef6e84b630bc87c8a03dcd69d54c440d --- include/camera/CameraBase.h | 8 +------- include/camera/IProCameraCallbacks.h | 18 +++++++----------- include/camera/IProCameraUser.h | 3 +-- include/camera/ProCamera.h | 33 +++++++++------------------------ 4 files changed, 18 insertions(+), 44 deletions(-) (limited to 'include/camera') diff --git a/include/camera/CameraBase.h b/include/camera/CameraBase.h index 2735a86..9b08c0f 100644 --- a/include/camera/CameraBase.h +++ b/include/camera/CameraBase.h @@ -91,12 +91,6 @@ protected: //////////////////////////////////////////////////////// virtual void notifyCallback(int32_t msgType, int32_t ext, int32_t ext2); - virtual void dataCallback(int32_t msgType, - const sp& dataPtr, - camera_frame_metadata *metadata); - bool dataCallbackTimestamp(nsecs_t timestamp, - int32_t msgType, - const sp& dataPtr); //////////////////////////////////////////////////////// // Common instance variables @@ -115,7 +109,7 @@ protected: const int mCameraId; - typedef CameraBase CameraBaseT; + typedef CameraBase CameraBaseT; }; }; // namespace android diff --git a/include/camera/IProCameraCallbacks.h b/include/camera/IProCameraCallbacks.h index fc24026..563ec17 100644 --- a/include/camera/IProCameraCallbacks.h +++ b/include/camera/IProCameraCallbacks.h @@ -28,19 +28,14 @@ struct camera_metadata; namespace android { -class IProCameraCallbacks: public IInterface +class IProCameraCallbacks : public IInterface { public: DECLARE_META_INTERFACE(ProCameraCallbacks); - virtual void notifyCallback(int32_t msgType, int32_t ext1, - int32_t ext2) = 0; - virtual void dataCallback(int32_t msgType, - const sp& data, - camera_frame_metadata_t *metadata) = 0; - virtual void dataCallbackTimestamp(nsecs_t timestamp, - int32_t msgType, - const sp& data) = 0; + virtual void notifyCallback(int32_t msgType, + int32_t ext1, + int32_t ext2) = 0; enum LockStatus { LOCK_ACQUIRED, @@ -53,12 +48,13 @@ public: /** Missing by design: implementation is client-side in ProCamera.cpp **/ // virtual void onBufferReceived(int streamId, // const CpuConsumer::LockedBufer& buf); - virtual void onResultReceived(int32_t frameId, camera_metadata* result) = 0; + virtual void onResultReceived(int32_t frameId, + camera_metadata* result) = 0; }; // ---------------------------------------------------------------------------- -class BnProCameraCallbacks: public BnInterface +class BnProCameraCallbacks : public BnInterface { public: virtual status_t onTransact( uint32_t code, diff --git a/include/camera/IProCameraUser.h b/include/camera/IProCameraUser.h index 7bddb0c..45b818c 100644 --- a/include/camera/IProCameraUser.h +++ b/include/camera/IProCameraUser.h @@ -61,8 +61,7 @@ public: bool streaming = false) = 0; virtual status_t cancelRequest(int requestId) = 0; - virtual status_t requestStream(int streamId) = 0; - virtual status_t cancelStream(int streamId) = 0; + virtual status_t deleteStream(int streamId) = 0; virtual status_t createStream( int width, int height, int format, const sp& bufferProducer, diff --git a/include/camera/ProCamera.h b/include/camera/ProCamera.h index 5d6cfaa..3d1652f 100644 --- a/include/camera/ProCamera.h +++ b/include/camera/ProCamera.h @@ -40,9 +40,11 @@ namespace android { // All callbacks on this class are concurrent // (they come from separate threads) -class ProCameraListener : public CameraListener +class ProCameraListener : virtual public RefBase { public: + virtual void notify(int32_t msgType, int32_t ext1, int32_t ext2) = 0; + // Lock has been acquired. Write operations now available. virtual void onLockAcquired() = 0; // Lock has been released with exclusiveUnlock. @@ -53,19 +55,9 @@ public: // Lock free. virtual void onTriggerNotify(int32_t msgType, int32_t ext1, int32_t ext2) = 0; - - // OnBufferReceived and OnRequestReceived can come in with any order, + // onFrameAvailable and OnResultReceived can come in with any order, // use android.sensor.timestamp and LockedBuffer.timestamp to correlate them - // TODO: remove onBufferReceived - - // A new frame buffer has been received for this stream. - // -- This callback only fires for createStreamCpu streams - // -- Use buf.timestamp to correlate with metadata's - // android.sensor.timestamp - // -- The buffer must not be accessed after this function call completes - virtual void onBufferReceived(int streamId, - const CpuConsumer::LockedBuffer& buf) = 0; /** * A new metadata buffer has been received. * -- Ownership of request passes on to the callee, free with @@ -77,17 +69,14 @@ public: // A new frame buffer has been received for this stream. // -- This callback only fires for createStreamCpu streams - // -- Use buf.timestamp to correlate with metadata's android.sensor.timestamp + // -- A buffer may be obtained by calling cpuConsumer->lockNextBuffer + // -- Use buf.timestamp to correlate with result's android.sensor.timestamp // -- The buffer should be accessed with CpuConsumer::lockNextBuffer // and CpuConsumer::unlockBuffer virtual void onFrameAvailable(int /*streamId*/, const sp& /*cpuConsumer*/) { } - // TODO: Remove useOnFrameAvailable - virtual bool useOnFrameAvailable() { - return false; - } }; class ProCamera; @@ -249,14 +238,10 @@ protected: //////////////////////////////////////////////////////// // IProCameraCallbacks implementation //////////////////////////////////////////////////////// - virtual void notifyCallback(int32_t msgType, int32_t ext, + virtual void notifyCallback(int32_t msgType, + int32_t ext, int32_t ext2); - virtual void dataCallback(int32_t msgType, - const sp& dataPtr, - camera_frame_metadata_t *metadata); - virtual void dataCallbackTimestamp(nsecs_t timestamp, - int32_t msgType, - const sp& dataPtr); + virtual void onLockStatusChanged( IProCameraCallbacks::LockStatus newLockStatus); -- cgit v1.1