diff options
author | Emilian Peev <epeev@google.com> | 2018-10-29 09:35:21 +0000 |
---|---|---|
committer | Emilian Peev <epeev@google.com> | 2018-11-29 16:40:36 +0000 |
commit | 40a8c6ed51abdf0ebebd566879ef232573696ab0 (patch) | |
tree | f7438502b53ea52f6c0dd2580205930fabe9074f /camera/common | |
parent | ee0ba36773f9cea66f442edaa569ce130df627b3 (diff) | |
download | android_hardware_interfaces-40a8c6ed51abdf0ebebd566879ef232573696ab0.tar.gz android_hardware_interfaces-40a8c6ed51abdf0ebebd566879ef232573696ab0.tar.bz2 android_hardware_interfaces-40a8c6ed51abdf0ebebd566879ef232573696ab0.zip |
Camera: Add support for stream combination query
Camera devices 3.5 and later can optionally support
stream combination queries. These use the regular
'StreamConfiguration' structure however in contrast
to normal stream configuration, the query will be
much faster and will not cause any HW/SW side effects.
Additionally it will be possible to run stream
combination queries at any time after the camera
device is open.
Implement stream combination query for the external
camera provider.
Bug: 111593096
Test: vts-tradefed run commandAndExit vts --skip-all-system-status-check
--skip-preconditions --module VtsHalCameraProviderV2_4Target -l INFO
Change-Id: I59ec936d17dabc89ba49407a750df1cd2e61b145
Diffstat (limited to 'camera/common')
-rw-r--r-- | camera/common/1.0/default/CameraModule.cpp | 10 | ||||
-rw-r--r-- | camera/common/1.0/default/include/CameraModule.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/camera/common/1.0/default/CameraModule.cpp b/camera/common/1.0/default/CameraModule.cpp index 9c2b02ba0..08354b312 100644 --- a/camera/common/1.0/default/CameraModule.cpp +++ b/camera/common/1.0/default/CameraModule.cpp @@ -452,6 +452,16 @@ int CameraModule::setTorchMode(const char* camera_id, bool enable) { return res; } +int CameraModule::isStreamCombinationSupported(int cameraId, camera_stream_combination_t *streams) { + int res = INVALID_OPERATION; + if (mModule->is_stream_combination_supported != NULL) { + ATRACE_BEGIN("camera_module->is_stream_combination_supported"); + res = mModule->is_stream_combination_supported(cameraId, streams); + ATRACE_END(); + } + return res; +} + status_t CameraModule::filterOpenErrorCode(status_t err) { switch(err) { case NO_ERROR: diff --git a/camera/common/1.0/default/include/CameraModule.h b/camera/common/1.0/default/include/CameraModule.h index aee9654dc..ee75e722d 100644 --- a/camera/common/1.0/default/include/CameraModule.h +++ b/camera/common/1.0/default/include/CameraModule.h @@ -66,6 +66,7 @@ public: // Only used by CameraProvider void removeCamera(int cameraId); int getPhysicalCameraInfo(int physicalCameraId, camera_metadata_t **physicalInfo); + int isStreamCombinationSupported(int cameraId, camera_stream_combination_t *streams); private: // Derive camera characteristics keys defined after HAL device version |