summaryrefslogtreecommitdiffstats
path: root/include/camera
diff options
context:
space:
mode:
authorIgor Murashkin <iam@google.com>2013-03-04 16:14:23 -0800
committerIgor Murashkin <iam@google.com>2013-03-11 16:32:24 -0700
commitfa4cf9d310685b4c25877cba772ff7da84caf517 (patch)
treed954ae7a991a1dfc084019433f370b46abb1f6c4 /include/camera
parentce124da179775a81ad7dcc3f33315eca451e66f2 (diff)
downloadframeworks_av-fa4cf9d310685b4c25877cba772ff7da84caf517.zip
frameworks_av-fa4cf9d310685b4c25877cba772ff7da84caf517.tar.gz
frameworks_av-fa4cf9d310685b4c25877cba772ff7da84caf517.tar.bz2
(Camera)ProCamera: Remove unused functions from binder interface
Change-Id: I0582268cef6e84b630bc87c8a03dcd69d54c440d
Diffstat (limited to 'include/camera')
-rw-r--r--include/camera/CameraBase.h8
-rw-r--r--include/camera/IProCameraCallbacks.h18
-rw-r--r--include/camera/IProCameraUser.h3
-rw-r--r--include/camera/ProCamera.h33
4 files changed, 18 insertions, 44 deletions
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<IMemory>& dataPtr,
- camera_frame_metadata *metadata);
- bool dataCallbackTimestamp(nsecs_t timestamp,
- int32_t msgType,
- const sp<IMemory>& dataPtr);
////////////////////////////////////////////////////////
// Common instance variables
@@ -115,7 +109,7 @@ protected:
const int mCameraId;
- typedef CameraBase<TCam> CameraBaseT;
+ typedef CameraBase<TCam> 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<IMemory>& data,
- camera_frame_metadata_t *metadata) = 0;
- virtual void dataCallbackTimestamp(nsecs_t timestamp,
- int32_t msgType,
- const sp<IMemory>& 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<IProCameraCallbacks>
+class BnProCameraCallbacks : public BnInterface<IProCameraCallbacks>
{
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<IGraphicBufferProducer>& 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>& /*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<IMemory>& dataPtr,
- camera_frame_metadata_t *metadata);
- virtual void dataCallbackTimestamp(nsecs_t timestamp,
- int32_t msgType,
- const sp<IMemory>& dataPtr);
+
virtual void onLockStatusChanged(
IProCameraCallbacks::LockStatus newLockStatus);