diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2013-10-04 11:08:25 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-04 11:08:25 -0700 |
commit | 4cde555e00a129f5684b1bdba1440fc89760383b (patch) | |
tree | 16cdfad20156871578692c819acac7f521cb0e66 /include | |
parent | b7f82eaed2876bacc3a402182b75323026813c30 (diff) | |
parent | 38ea22bb3a841dd37cc2be0fdca8c5e4ba3cf6db (diff) | |
download | frameworks_av-4cde555e00a129f5684b1bdba1440fc89760383b.zip frameworks_av-4cde555e00a129f5684b1bdba1440fc89760383b.tar.gz frameworks_av-4cde555e00a129f5684b1bdba1440fc89760383b.tar.bz2 |
am 38ea22bb: am b2d71d3a: Merge "Camera API 2, Device 2/3: Implement idle and shutter callbacks" into klp-dev
* commit '38ea22bb3a841dd37cc2be0fdca8c5e4ba3cf6db':
Camera API 2, Device 2/3: Implement idle and shutter callbacks
Diffstat (limited to 'include')
-rw-r--r-- | include/camera/IProCameraCallbacks.h | 2 | ||||
-rw-r--r-- | include/camera/ProCamera.h | 2 | ||||
-rw-r--r-- | include/camera/camera2/ICameraDeviceCallbacks.h | 22 |
3 files changed, 20 insertions, 6 deletions
diff --git a/include/camera/IProCameraCallbacks.h b/include/camera/IProCameraCallbacks.h index c774698..e8abb89 100644 --- a/include/camera/IProCameraCallbacks.h +++ b/include/camera/IProCameraCallbacks.h @@ -51,7 +51,7 @@ 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, + virtual void onResultReceived(int32_t requestId, camera_metadata* result) = 0; }; diff --git a/include/camera/ProCamera.h b/include/camera/ProCamera.h index d9ee662..83a3028 100644 --- a/include/camera/ProCamera.h +++ b/include/camera/ProCamera.h @@ -252,7 +252,7 @@ protected: virtual void onLockStatusChanged( IProCameraCallbacks::LockStatus newLockStatus); - virtual void onResultReceived(int32_t frameId, + virtual void onResultReceived(int32_t requestId, camera_metadata* result); private: ProCamera(int cameraId); diff --git a/include/camera/camera2/ICameraDeviceCallbacks.h b/include/camera/camera2/ICameraDeviceCallbacks.h index 041fa65..8dac4f2 100644 --- a/include/camera/camera2/ICameraDeviceCallbacks.h +++ b/include/camera/camera2/ICameraDeviceCallbacks.h @@ -35,13 +35,27 @@ class ICameraDeviceCallbacks : public IInterface public: DECLARE_META_INTERFACE(CameraDeviceCallbacks); + /** + * Error codes for CAMERA_MSG_ERROR + */ + enum CameraErrorCode { + ERROR_CAMERA_DISCONNECTED = 0, + ERROR_CAMERA_DEVICE = 1, + ERROR_CAMERA_SERVICE = 2 + }; + + // One way + virtual void onDeviceError(CameraErrorCode errorCode) = 0; + + // One way + virtual void onDeviceIdle() = 0; + // One way - virtual void notifyCallback(int32_t msgType, - int32_t ext1, - int32_t ext2) = 0; + virtual void onCaptureStarted(int32_t requestId, + int64_t timestamp) = 0; // One way - virtual void onResultReceived(int32_t frameId, + virtual void onResultReceived(int32_t requestId, const CameraMetadata& result) = 0; }; |