diff options
author | Yin-Chia Yeh <yinchiayeh@google.com> | 2014-06-18 10:51:34 -0700 |
---|---|---|
committer | Yin-Chia Yeh <yinchiayeh@google.com> | 2014-06-20 15:27:33 -0700 |
commit | cd8fce8fbe0f515e53a0ea0f50b739cf42ee57a4 (patch) | |
tree | 1ae578c40cd358b4dd59dc9f4dbb4a9cc1d2418b /services/camera/libcameraservice/common | |
parent | f5fe801c6e00d99e5dcf15cdbfd3bc5402715089 (diff) | |
download | frameworks_av-cd8fce8fbe0f515e53a0ea0f50b739cf42ee57a4.zip frameworks_av-cd8fce8fbe0f515e53a0ea0f50b739cf42ee57a4.tar.gz frameworks_av-cd8fce8fbe0f515e53a0ea0f50b739cf42ee57a4.tar.bz2 |
Camera2: get stream configs by device verison
Starting from device version 3.2, the following tags:
ANDROID_SCALER_AVAILABLE_FORMATS
ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_JPEG_SIZES
ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES
ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS
ANDROID_SCALER_AVAILABLE_RAW_SIZES
are deprecated and replaced by:
ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
Change-Id: Iadc34af0ea985a16a25759d7a9a3eb4845c486fd
Diffstat (limited to 'services/camera/libcameraservice/common')
-rw-r--r-- | services/camera/libcameraservice/common/Camera2ClientBase.cpp | 8 | ||||
-rw-r--r-- | services/camera/libcameraservice/common/Camera2ClientBase.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/common/Camera2ClientBase.cpp b/services/camera/libcameraservice/common/Camera2ClientBase.cpp index 19efd30..13c9f48 100644 --- a/services/camera/libcameraservice/common/Camera2ClientBase.cpp +++ b/services/camera/libcameraservice/common/Camera2ClientBase.cpp @@ -54,7 +54,8 @@ Camera2ClientBase<TClientBase>::Camera2ClientBase( int servicePid): TClientBase(cameraService, remoteCallback, clientPackageName, cameraId, cameraFacing, clientPid, clientUid, servicePid), - mSharedCameraCallbacks(remoteCallback) + mSharedCameraCallbacks(remoteCallback), + mDeviceVersion(cameraService->getDeviceVersion(cameraId)) { ALOGI("Camera %d: Opened", cameraId); @@ -280,6 +281,11 @@ int Camera2ClientBase<TClientBase>::getCameraId() const { } template <typename TClientBase> +int Camera2ClientBase<TClientBase>::getCameraDeviceVersion() const { + return mDeviceVersion; +} + +template <typename TClientBase> const sp<CameraDeviceBase>& Camera2ClientBase<TClientBase>::getCameraDevice() { return mDevice; } diff --git a/services/camera/libcameraservice/common/Camera2ClientBase.h b/services/camera/libcameraservice/common/Camera2ClientBase.h index 9feca93..f57d204 100644 --- a/services/camera/libcameraservice/common/Camera2ClientBase.h +++ b/services/camera/libcameraservice/common/Camera2ClientBase.h @@ -76,6 +76,7 @@ public: int getCameraId() const; const sp<CameraDeviceBase>& getCameraDevice(); + int getCameraDeviceVersion() const; const sp<CameraService>& getCameraService(); @@ -122,6 +123,7 @@ protected: /** CameraDeviceBase instance wrapping HAL2+ entry */ + const int mDeviceVersion; sp<CameraDeviceBase> mDevice; /** Utility members */ |