1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of The Linux Foundation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef ANDROID_HARDWARE_QCAMERA_PARAMETERS_INTF_H
#define ANDROID_HARDWARE_QCAMERA_PARAMETERS_INTF_H
#include <utils/String8.h>
#include <utils/Mutex.h>
#include "cam_intf.h"
#include "cam_types.h"
#include "QCameraThermalAdapter.h"
extern "C" {
#include <mm_camera_interface.h>
#include <mm_jpeg_interface.h>
}
using namespace android;
namespace qcamera {
typedef cam_manual_capture_type QCameraManualCaptureModes;
class QCameraAdjustFPS
{
public:
virtual int recalcFPSRange(int &minFPS, int &maxFPS,
const float &minVideoFPS, const float &maxVideoFPs,
cam_fps_range_t &adjustedRange) = 0;
virtual ~QCameraAdjustFPS() {}
};
class QCameraParameters;
class QCameraParametersIntf
{
public:
// member variables
QCameraParametersIntf();
~QCameraParametersIntf();
int32_t allocate();
int32_t init(cam_capability_t *capabilities,
mm_camera_vtbl_t *mmOps,
QCameraAdjustFPS *adjustFPS);
void deinit();
int32_t updateParameters(const String8& params, bool &needRestart);
int32_t commitParameters();
char* getParameters();
void getPreviewFpsRange(int *min_fps, int *max_fps) const;
#ifdef TARGET_TS_MAKEUP
bool getTsMakeupInfo(int &whiteLevel, int &cleanLevel) const;
#endif
int getPreviewHalPixelFormat();
int32_t getStreamRotation(cam_stream_type_t streamType,
cam_pp_feature_config_t &featureConfig,
cam_dimension_t &dim);
int32_t getStreamFormat(cam_stream_type_t streamType,
cam_format_t &format);
int32_t getStreamDimension(cam_stream_type_t streamType,
cam_dimension_t &dim);
void getThumbnailSize(int *width, int *height) const;
uint8_t getZSLBurstInterval();
uint8_t getZSLQueueDepth();
uint8_t getZSLBackLookCount();
uint8_t getMaxUnmatchedFramesInQueue();
bool isZSLMode();
bool isRdiMode();
bool isSecureMode();
bool isNoDisplayMode();
bool isWNREnabled();
bool isTNRSnapshotEnabled();
int32_t getCDSMode();
bool isLTMForSeeMoreEnabled();
bool isHfrMode();
void getHfrFps(cam_fps_range_t &pFpsRange);
uint8_t getNumOfSnapshots();
uint8_t getNumOfRetroSnapshots();
uint8_t getNumOfExtraHDRInBufsIfNeeded();
uint8_t getNumOfExtraHDROutBufsIfNeeded();
bool getRecordingHintValue();
uint32_t getJpegQuality();
uint32_t getRotation();
uint32_t getDeviceRotation();
uint32_t getJpegExifRotation();
bool useJpegExifRotation();
int32_t getEffectValue();
bool isInstantAECEnabled();
bool isInstantCaptureEnabled();
uint8_t getAecFrameBoundValue();
uint8_t getAecSkipDisplayFrameBound();
int32_t getExifDateTime(String8 &dateTime, String8 &subsecTime);
int32_t getExifFocalLength(rat_t *focalLenght);
uint16_t getExifIsoSpeed();
int32_t getExifGpsProcessingMethod(char *gpsProcessingMethod,
uint32_t &count);
int32_t getExifLatitude(rat_t *latitude, char *latRef);
int32_t getExifLongitude(rat_t *longitude, char *lonRef);
int32_t getExifAltitude(rat_t *altitude, char *altRef);
int32_t getExifGpsDateTimeStamp(char *gpsDateStamp,
uint32_t bufLen, rat_t *gpsTimeStamp);
bool isVideoBuffersCached();
int32_t updateFocusDistances(cam_focus_distances_info_t *focusDistances);
bool isAEBracketEnabled();
int32_t setAEBracketing();
bool isFpsDebugEnabled();
bool isHistogramEnabled();
bool isSceneSelectionEnabled();
int32_t setSelectedScene(cam_scene_mode_type scene);
cam_scene_mode_type getSelectedScene();
bool isFaceDetectionEnabled();
int32_t setFaceDetectionOption(bool enabled);
int32_t setHistogram(bool enabled);
int32_t setFaceDetection(bool enabled, bool initCommit);
int32_t setFrameSkip(enum msm_vfe_frame_skip_pattern pattern);
qcamera_thermal_mode getThermalMode();
int32_t updateRecordingHintValue(int32_t value);
int32_t setHDRAEBracket(cam_exp_bracketing_t hdrBracket);
bool isHDREnabled();
bool isAutoHDREnabled();
int32_t stopAEBracket();
int32_t updateRAW(cam_dimension_t max_dim);
bool isDISEnabled();
cam_is_type_t getISType();
cam_is_type_t getPreviewISType();
uint8_t getMobicatMask();
cam_focus_mode_type getFocusMode() const;
int32_t setNumOfSnapshot();
int32_t adjustPreviewFpsRange(cam_fps_range_t *fpsRange);
bool isJpegPictureFormat();
bool isNV16PictureFormat();
bool isNV21PictureFormat();
cam_denoise_process_type_t getDenoiseProcessPlate(cam_intf_parm_type_t type);
int32_t getMaxPicSize(cam_dimension_t &dim);
int getFlipMode(cam_stream_type_t streamType);
bool isSnapshotFDNeeded();
bool isHDR1xFrameEnabled();
bool isYUVFrameInfoNeeded();
const char*getFrameFmtString(cam_format_t fmt);
bool isHDR1xExtraBufferNeeded();
bool isHDROutputCropEnabled();
bool isPreviewFlipChanged();
bool isVideoFlipChanged();
bool isSnapshotFlipChanged();
void setHDRSceneEnable(bool bflag);
int32_t updateAWBParams(cam_awb_params_t &awb_params);
const char *getASDStateString(cam_auto_scene_t scene);
bool isHDRThumbnailProcessNeeded();
void setMinPpMask(cam_feature_mask_t min_pp_mask);
bool setStreamConfigure(bool isCapture,
bool previewAsPostview, bool resetConfig);
int32_t addOnlineRotation(uint32_t rotation, uint32_t streamId,
int32_t device_rotation);
uint8_t getNumOfExtraBuffersForImageProc();
uint8_t getNumOfExtraBuffersForVideo();
uint8_t getNumOfExtraBuffersForPreview();
uint32_t getExifBufIndex(uint32_t captureIndex);
bool needThumbnailReprocess(cam_feature_mask_t *pFeatureMask);
bool isUbiFocusEnabled();
bool isChromaFlashEnabled();
bool isHighQualityNoiseReductionMode();
bool isTruePortraitEnabled();
size_t getTPMaxMetaSize();
bool isSeeMoreEnabled();
bool isStillMoreEnabled();
bool isOptiZoomEnabled();
int32_t commitAFBracket(cam_af_bracketing_t afBracket);
int32_t set3ALock(bool lock3A);
int32_t setAndCommitZoom(int zoom_level);
uint8_t getBurstCountForAdvancedCapture();
uint32_t getNumberInBufsForSingleShot();
uint32_t getNumberOutBufsForSingleShot();
int32_t setLongshotEnable(bool enable);
String8 dump();
bool isUbiRefocus();
uint32_t getRefocusMaxMetaSize();
uint8_t getRefocusOutputCount();
bool generateThumbFromMain();
void updateCurrentFocusPosition(cam_focus_pos_info_t &cur_pos_info);
void updateAEInfo(cam_3a_params_t &ae_params);
bool isDisplayFrameNeeded();
bool isAdvCamFeaturesEnabled();
int32_t setAecLock(const char *aecStr);
int32_t updateDebugLevel();
bool is4k2kVideoResolution();
bool isUBWCEnabled();
int getBrightness();
int32_t updateOisValue(bool oisValue);
int32_t setIntEvent(cam_int_evt_params_t params);
bool getofflineRAW();
bool getQuadraCfa();
int32_t updatePpFeatureMask(cam_stream_type_t stream_type);
int32_t getStreamPpMask(cam_stream_type_t stream_type, cam_feature_mask_t &pp_mask);
int32_t getSharpness();
int32_t getEffect();
int32_t updateFlashMode(cam_flash_mode_t flash_mode);
int32_t configureAEBracketing(cam_capture_frame_config_t &frame_config);
int32_t configureHDRBracketing(cam_capture_frame_config_t &frame_config);
int32_t configFrameCapture(bool commitSettings);
int32_t resetFrameCapture(bool commitSettings);
cam_still_more_t getStillMoreSettings();
void setStillMoreSettings(cam_still_more_t stillmore_config);
cam_still_more_t getStillMoreCapability();
cam_dyn_img_data_t getDynamicImgData();
void setDynamicImgData(cam_dyn_img_data_t d);
int32_t getParmZoomLevel();
int8_t getReprocCount();
int8_t getCurPPCount();
void setReprocCount();
bool isPostProcScaling();
bool isLLNoiseEnabled();
void setCurPPCount(int8_t count);
int32_t setQuadraCfaMode(uint32_t value, bool initCommit);
int32_t setToneMapMode(uint32_t value, bool initCommit);
void setTintless(bool enable);
uint8_t getLongshotStages();
int8_t getBufBatchCount();
int8_t getVideoBatchSize();
int32_t setManualCaptureMode(
QCameraManualCaptureModes value = CAM_MANUAL_CAPTURE_TYPE_OFF);
QCameraManualCaptureModes getManualCaptureMode();
int64_t getExposureTime();
cam_capture_frame_config_t getCaptureFrameConfig();
void setJpegRotation(int rotation);
uint32_t getJpegRotation();
void setLowLightLevel(cam_low_light_mode_t value);
cam_low_light_mode_t getLowLightLevel();
bool getLowLightCapture();
/* Dual camera specific */
bool getDcrf();
int32_t setRelatedCamSyncInfo(
cam_sync_related_sensors_event_info_t* info);
const cam_sync_related_sensors_event_info_t*
getRelatedCamSyncInfo(void);
int32_t setFrameSyncEnabled(bool enable);
bool isFrameSyncEnabled(void);
int32_t getRelatedCamCalibration(
cam_related_system_calibration_data_t* calib);
int32_t bundleRelatedCameras(bool sync, uint32_t sessionid);
uint8_t fdModeInVideo();
bool isOEMFeatEnabled();
int32_t setZslMode(bool value);
int32_t updateZSLModeValue(bool value);
bool isReprocScaleEnabled();
bool isUnderReprocScaling();
int32_t getPicSizeFromAPK(int &width, int &height);
int32_t checkFeatureConcurrency();
int32_t setInstantAEC(uint8_t enable, bool initCommit);
int32_t getAnalysisInfo(
bool fdVideoEnabled,
bool hal3,
cam_feature_mask_t featureMask,
cam_analysis_info_t *pAnalysisInfo);
private:
QCameraParameters *mImpl;
mutable Mutex mLock;
};
}; // namespace qcamera
#endif
|