1 /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
2  *
3  * Redistribution and use in source and binary forms, with or without
4  * modification, are permitted provided that the following conditions are
5  * met:
6  *     * Redistributions of source code must retain the above copyright
7  *       notice, this list of conditions and the following disclaimer.
8  *     * Redistributions in binary form must reproduce the above
9  *       copyright notice, this list of conditions and the following
10  *       disclaimer in the documentation and/or other materials provided
11  *       with the distribution.
12  *     * Neither the name of The Linux Foundation nor the names of its
13  *       contributors may be used to endorse or promote products derived
14  *       from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19  * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  *
28  */
29 
30 #define LOG_TAG "QCameraParametersIntf"
31 
32 // System dependencies
33 #include <utils/Mutex.h>
34 
35 // Camera dependencies
36 #include "QCameraParameters.h"
37 #include "QCameraParametersIntf.h"
38 #include "QCameraTrace.h"
39 
40 extern "C" {
41 #include "mm_camera_dbg.h"
42 }
43 
44 namespace qcamera {
45 
46 #define CHECK_PARAM_INTF(impl) LOG_ALWAYS_FATAL_IF(((impl) == NULL), "impl is NULL!")
47 
QCameraParametersIntf()48 QCameraParametersIntf::QCameraParametersIntf() :
49         mImpl(NULL)
50 {
51 }
52 
~QCameraParametersIntf()53 QCameraParametersIntf::~QCameraParametersIntf()
54 {
55     {
56         Mutex::Autolock lock(mLock);
57         if (mImpl) {
58             delete mImpl;
59             mImpl = NULL;
60         }
61     }
62 }
63 
64 
allocate(uint8_t bufCount)65 int32_t QCameraParametersIntf::allocate(uint8_t bufCount)
66 {
67     Mutex::Autolock lock(mLock);
68     mImpl = new QCameraParameters();
69     if (!mImpl) {
70         LOGE("Out of memory");
71         return NO_MEMORY;
72     }
73 
74     return mImpl->allocate(bufCount);
75 }
76 
init(cam_capability_t * capabilities,mm_camera_vtbl_t * mmOps,QCameraAdjustFPS * adjustFPS,QCameraFOVControl * fovControl)77 int32_t QCameraParametersIntf::init(cam_capability_t *capabilities,
78         mm_camera_vtbl_t *mmOps,
79         QCameraAdjustFPS *adjustFPS,
80         QCameraFOVControl *fovControl)
81 {
82     Mutex::Autolock lock(mLock);
83     CHECK_PARAM_INTF(mImpl);
84     return mImpl->init(capabilities, mmOps, adjustFPS, fovControl);
85 }
86 
deinit()87 void QCameraParametersIntf::deinit()
88 {
89     Mutex::Autolock lock(mLock);
90     CHECK_PARAM_INTF(mImpl);
91     mImpl->deinit();
92 }
93 
updateParameters(const String8 & params,bool & needRestart)94 int32_t QCameraParametersIntf::updateParameters(const String8& params, bool &needRestart)
95 {
96     Mutex::Autolock lock(mLock);
97     CHECK_PARAM_INTF(mImpl);
98     return mImpl->updateParameters(params, needRestart);
99 }
100 
commitParameters()101 int32_t QCameraParametersIntf::commitParameters()
102 {
103     Mutex::Autolock lock(mLock);
104     CHECK_PARAM_INTF(mImpl);
105     return mImpl->commitParameters();
106 }
107 
getParameters()108 char* QCameraParametersIntf::QCameraParametersIntf::getParameters()
109 {
110     Mutex::Autolock lock(mLock);
111     CHECK_PARAM_INTF(mImpl);
112     return mImpl->getParameters();
113 }
114 
getPreviewFpsRange(int * min_fps,int * max_fps) const115 void QCameraParametersIntf::getPreviewFpsRange(int *min_fps, int *max_fps) const
116 {
117     Mutex::Autolock lock(mLock);
118     CHECK_PARAM_INTF(mImpl);
119     mImpl->getPreviewFpsRange(min_fps, max_fps);
120 }
121 
122 #ifdef TARGET_TS_MAKEUP
getTsMakeupInfo(int & whiteLevel,int & cleanLevel) const123 bool QCameraParametersIntf::getTsMakeupInfo(int &whiteLevel, int &cleanLevel) const
124 {
125     Mutex::Autolock lock(mLock);
126     CHECK_PARAM_INTF(mImpl);
127     return mImpl->getTsMakeupInfo(whiteLevel, cleanLevel);
128 }
129 #endif
130 
getPreviewHalPixelFormat()131 int QCameraParametersIntf::getPreviewHalPixelFormat()
132 {
133     Mutex::Autolock lock(mLock);
134     CHECK_PARAM_INTF(mImpl);
135     return mImpl->getPreviewHalPixelFormat();
136 }
137 
getStreamRotation(cam_stream_type_t streamType,cam_pp_feature_config_t & featureConfig,cam_dimension_t & dim)138 int32_t QCameraParametersIntf::getStreamRotation(cam_stream_type_t streamType,
139                                             cam_pp_feature_config_t &featureConfig,
140                                             cam_dimension_t &dim)
141 {
142     Mutex::Autolock lock(mLock);
143     CHECK_PARAM_INTF(mImpl);
144     return mImpl->getStreamRotation(streamType, featureConfig, dim);
145 
146 }
147 
getStreamSubFormat(cam_stream_type_t streamType,cam_sub_format_type_t & sub_format)148 int32_t QCameraParametersIntf::getStreamSubFormat(cam_stream_type_t streamType,
149                                             cam_sub_format_type_t &sub_format)
150 {
151     Mutex::Autolock lock(mLock);
152     CHECK_PARAM_INTF(mImpl);
153     return mImpl->getStreamSubFormat(streamType, sub_format);
154 }
155 
156 
getStreamFormat(cam_stream_type_t streamType,cam_format_t & format)157 int32_t QCameraParametersIntf::getStreamFormat(cam_stream_type_t streamType,
158                                             cam_format_t &format)
159 {
160     Mutex::Autolock lock(mLock);
161     CHECK_PARAM_INTF(mImpl);
162     return mImpl->getStreamFormat(streamType, format);
163 }
164 
getStreamDimension(cam_stream_type_t streamType,cam_dimension_t & dim,uint32_t cam_type)165 int32_t QCameraParametersIntf::getStreamDimension(cam_stream_type_t streamType,
166                                                cam_dimension_t &dim, uint32_t cam_type)
167 {
168     Mutex::Autolock lock(mLock);
169     CHECK_PARAM_INTF(mImpl);
170     return mImpl->getStreamDimension(streamType, dim, cam_type);
171 }
172 
getThumbnailSize(int * width,int * height) const173 void QCameraParametersIntf::getThumbnailSize(int *width, int *height) const
174 {
175     Mutex::Autolock lock(mLock);
176     CHECK_PARAM_INTF(mImpl);
177     mImpl->getThumbnailSize(width, height);
178 }
179 
getZSLBurstInterval()180 uint8_t QCameraParametersIntf::getZSLBurstInterval()
181 {
182     Mutex::Autolock lock(mLock);
183     CHECK_PARAM_INTF(mImpl);
184     return mImpl->getZSLBurstInterval();
185 }
186 
getZSLQueueDepth()187 uint8_t QCameraParametersIntf::getZSLQueueDepth()
188 {
189     Mutex::Autolock lock(mLock);
190     CHECK_PARAM_INTF(mImpl);
191     return mImpl->getZSLQueueDepth();
192 }
193 
getZSLBackLookCount()194 uint8_t QCameraParametersIntf::getZSLBackLookCount()
195 {
196     Mutex::Autolock lock(mLock);
197     CHECK_PARAM_INTF(mImpl);
198     return mImpl->getZSLBackLookCount();
199 }
200 
getMaxUnmatchedFramesInQueue()201 uint8_t QCameraParametersIntf::getMaxUnmatchedFramesInQueue()
202 {
203     Mutex::Autolock lock(mLock);
204     CHECK_PARAM_INTF(mImpl);
205     return mImpl->getMaxUnmatchedFramesInQueue();
206 }
207 
isZSLMode()208 bool QCameraParametersIntf::isZSLMode()
209 {
210     Mutex::Autolock lock(mLock);
211     CHECK_PARAM_INTF(mImpl);
212     return mImpl->isZSLMode();
213 }
214 
isRdiMode()215 bool QCameraParametersIntf::isRdiMode()
216 {
217     Mutex::Autolock lock(mLock);
218     CHECK_PARAM_INTF(mImpl);
219     return mImpl->isRdiMode();
220 }
221 
isSecureMode()222 bool QCameraParametersIntf::isSecureMode()
223 {
224     Mutex::Autolock lock(mLock);
225     CHECK_PARAM_INTF(mImpl);
226     return mImpl->isSecureMode();
227 }
228 
getSecureStreamType()229 cam_stream_type_t QCameraParametersIntf::getSecureStreamType()
230 {
231     Mutex::Autolock lock(mLock);
232     CHECK_PARAM_INTF(mImpl);
233     return mImpl->getSecureStreamType();
234 }
235 
isNoDisplayMode()236 bool QCameraParametersIntf::isNoDisplayMode()
237 {
238     Mutex::Autolock lock(mLock);
239     CHECK_PARAM_INTF(mImpl);
240     return mImpl->isNoDisplayMode();
241 }
242 
isWNREnabled()243 bool QCameraParametersIntf::isWNREnabled()
244 {
245     Mutex::Autolock lock(mLock);
246     CHECK_PARAM_INTF(mImpl);
247     return mImpl->isWNREnabled();
248 }
249 
isTNRSnapshotEnabled()250 bool QCameraParametersIntf::isTNRSnapshotEnabled()
251 {
252     Mutex::Autolock lock(mLock);
253     CHECK_PARAM_INTF(mImpl);
254     return mImpl->isTNRSnapshotEnabled();
255 }
256 
getCDSMode()257 int32_t QCameraParametersIntf::getCDSMode()
258 {
259     Mutex::Autolock lock(mLock);
260     CHECK_PARAM_INTF(mImpl);
261     return mImpl->getCDSMode();
262 }
263 
isLTMForSeeMoreEnabled()264 bool QCameraParametersIntf::isLTMForSeeMoreEnabled()
265 {
266     Mutex::Autolock lock(mLock);
267     CHECK_PARAM_INTF(mImpl);
268     return mImpl->isLTMForSeeMoreEnabled();
269 }
270 
isHfrMode()271 bool QCameraParametersIntf::isHfrMode()
272 {
273     Mutex::Autolock lock(mLock);
274     CHECK_PARAM_INTF(mImpl);
275     return mImpl->isHfrMode();
276 }
277 
getHfrFps(cam_fps_range_t & pFpsRange)278 void QCameraParametersIntf::getHfrFps(cam_fps_range_t &pFpsRange)
279 {
280     Mutex::Autolock lock(mLock);
281     CHECK_PARAM_INTF(mImpl);
282     mImpl->getHfrFps(pFpsRange);
283 }
284 
getNumOfSnapshots()285 uint8_t QCameraParametersIntf::getNumOfSnapshots()
286 {
287     Mutex::Autolock lock(mLock);
288     CHECK_PARAM_INTF(mImpl);
289     return mImpl->getNumOfSnapshots();
290 }
291 
getNumOfRetroSnapshots()292 uint8_t QCameraParametersIntf::getNumOfRetroSnapshots()
293 {
294     Mutex::Autolock lock(mLock);
295     CHECK_PARAM_INTF(mImpl);
296     return mImpl->getNumOfRetroSnapshots();
297 }
298 
getNumOfExtraHDRInBufsIfNeeded()299 uint8_t QCameraParametersIntf::getNumOfExtraHDRInBufsIfNeeded()
300 {
301     Mutex::Autolock lock(mLock);
302     CHECK_PARAM_INTF(mImpl);
303     return mImpl->getNumOfExtraHDRInBufsIfNeeded();
304 }
305 
getNumOfExtraHDROutBufsIfNeeded()306 uint8_t QCameraParametersIntf::getNumOfExtraHDROutBufsIfNeeded()
307 {
308     Mutex::Autolock lock(mLock);
309     CHECK_PARAM_INTF(mImpl);
310     return mImpl->getNumOfExtraHDROutBufsIfNeeded();
311 }
312 
getRecordingHintValue()313 bool QCameraParametersIntf::getRecordingHintValue()
314 {
315     Mutex::Autolock lock(mLock);
316     CHECK_PARAM_INTF(mImpl);
317     return mImpl->getRecordingHintValue();
318 }
319 
getJpegQuality()320 uint32_t QCameraParametersIntf::getJpegQuality()
321 {
322     Mutex::Autolock lock(mLock);
323     CHECK_PARAM_INTF(mImpl);
324     return mImpl->getJpegQuality();
325 }
326 
getRotation()327 uint32_t QCameraParametersIntf::getRotation()
328 {
329     Mutex::Autolock lock(mLock);
330     CHECK_PARAM_INTF(mImpl);
331     return mImpl->getRotation();
332 }
333 
getDeviceRotation()334 uint32_t QCameraParametersIntf::getDeviceRotation()
335 {
336     Mutex::Autolock lock(mLock);
337     CHECK_PARAM_INTF(mImpl);
338     return mImpl->getDeviceRotation();
339 }
340 
getJpegExifRotation()341 uint32_t QCameraParametersIntf::getJpegExifRotation()
342 {
343     Mutex::Autolock lock(mLock);
344     CHECK_PARAM_INTF(mImpl);
345     return mImpl->getJpegExifRotation();
346 }
347 
useJpegExifRotation()348 bool QCameraParametersIntf::useJpegExifRotation()
349 {
350     Mutex::Autolock lock(mLock);
351     CHECK_PARAM_INTF(mImpl);
352     return mImpl->useJpegExifRotation();
353 }
354 
getEffectValue()355 int32_t QCameraParametersIntf::getEffectValue()
356 {
357     Mutex::Autolock lock(mLock);
358     CHECK_PARAM_INTF(mImpl);
359     return mImpl->getEffectValue();
360 }
361 
isInstantAECEnabled()362 bool QCameraParametersIntf::isInstantAECEnabled()
363 {
364     Mutex::Autolock lock(mLock);
365     CHECK_PARAM_INTF(mImpl);
366     return mImpl->isInstantAECEnabled();
367 }
368 
isInstantCaptureEnabled()369 bool QCameraParametersIntf::isInstantCaptureEnabled()
370 {
371     Mutex::Autolock lock(mLock);
372     CHECK_PARAM_INTF(mImpl);
373     return mImpl->isInstantCaptureEnabled();
374 }
375 
getAecFrameBoundValue()376 uint8_t QCameraParametersIntf::getAecFrameBoundValue()
377 {
378     Mutex::Autolock lock(mLock);
379     CHECK_PARAM_INTF(mImpl);
380     return mImpl->getAecFrameBoundValue();
381 }
382 
getAecSkipDisplayFrameBound()383 uint8_t QCameraParametersIntf::getAecSkipDisplayFrameBound()
384 {
385     Mutex::Autolock lock(mLock);
386     CHECK_PARAM_INTF(mImpl);
387     return mImpl->getAecSkipDisplayFrameBound();
388 }
389 
getExifDateTime(String8 & dateTime,String8 & subsecTime)390 int32_t QCameraParametersIntf::getExifDateTime(
391         String8 &dateTime, String8 &subsecTime)
392 {
393     Mutex::Autolock lock(mLock);
394     CHECK_PARAM_INTF(mImpl);
395     return mImpl->getExifDateTime(dateTime, subsecTime);
396 }
397 
getExifFocalLength(rat_t * focalLength)398 int32_t QCameraParametersIntf::getExifFocalLength(rat_t *focalLength)
399 {
400     Mutex::Autolock lock(mLock);
401     CHECK_PARAM_INTF(mImpl);
402     return mImpl->getExifFocalLength(focalLength);
403 }
404 
getExifIsoSpeed()405 uint16_t QCameraParametersIntf::getExifIsoSpeed()
406 {
407     Mutex::Autolock lock(mLock);
408     CHECK_PARAM_INTF(mImpl);
409     return mImpl->getExifIsoSpeed();
410 }
411 
getExifGpsProcessingMethod(char * gpsProcessingMethod,uint32_t & count)412 int32_t QCameraParametersIntf::getExifGpsProcessingMethod(char *gpsProcessingMethod, uint32_t &count)
413 {
414     Mutex::Autolock lock(mLock);
415     CHECK_PARAM_INTF(mImpl);
416     return mImpl->getExifGpsProcessingMethod(gpsProcessingMethod, count);
417 }
418 
getExifLatitude(rat_t * latitude,char * latRef)419 int32_t QCameraParametersIntf::getExifLatitude(rat_t *latitude, char *latRef)
420 {
421     Mutex::Autolock lock(mLock);
422     CHECK_PARAM_INTF(mImpl);
423     return mImpl->getExifLatitude(latitude, latRef);
424 }
425 
getExifLongitude(rat_t * longitude,char * lonRef)426 int32_t QCameraParametersIntf::getExifLongitude(rat_t *longitude, char *lonRef)
427 {
428     Mutex::Autolock lock(mLock);
429     CHECK_PARAM_INTF(mImpl);
430     return mImpl->getExifLongitude(longitude, lonRef);
431 }
432 
getExifAltitude(rat_t * altitude,char * altRef)433 int32_t QCameraParametersIntf::getExifAltitude(rat_t *altitude, char *altRef)
434 {
435     Mutex::Autolock lock(mLock);
436     CHECK_PARAM_INTF(mImpl);
437     return mImpl->getExifAltitude(altitude, altRef);
438 }
439 
getExifGpsDateTimeStamp(char * gpsDateStamp,uint32_t bufLen,rat_t * gpsTimeStamp)440 int32_t QCameraParametersIntf::getExifGpsDateTimeStamp(char *gpsDateStamp, uint32_t bufLen, rat_t *gpsTimeStamp)
441 {
442     Mutex::Autolock lock(mLock);
443     CHECK_PARAM_INTF(mImpl);
444     return mImpl->getExifGpsDateTimeStamp(gpsDateStamp, bufLen, gpsTimeStamp);
445 }
446 
isVideoBuffersCached()447 bool QCameraParametersIntf::isVideoBuffersCached()
448 {
449     Mutex::Autolock lock(mLock);
450     CHECK_PARAM_INTF(mImpl);
451     return mImpl->isVideoBuffersCached();
452 }
453 
updateFocusDistances(cam_focus_distances_info_t * focusDistances)454 int32_t QCameraParametersIntf::updateFocusDistances(cam_focus_distances_info_t *focusDistances)
455 {
456     Mutex::Autolock lock(mLock);
457     CHECK_PARAM_INTF(mImpl);
458     return mImpl->updateFocusDistances(focusDistances);
459 }
460 
isAEBracketEnabled()461 bool QCameraParametersIntf::isAEBracketEnabled()
462 {
463     Mutex::Autolock lock(mLock);
464     CHECK_PARAM_INTF(mImpl);
465     return mImpl->isAEBracketEnabled();
466 }
467 
setAEBracketing()468 int32_t QCameraParametersIntf::setAEBracketing()
469 {
470     Mutex::Autolock lock(mLock);
471     CHECK_PARAM_INTF(mImpl);
472     return mImpl->setAEBracketing();
473 }
474 
isFpsDebugEnabled()475 bool QCameraParametersIntf::isFpsDebugEnabled()
476 {
477     Mutex::Autolock lock(mLock);
478     CHECK_PARAM_INTF(mImpl);
479     return mImpl->isFpsDebugEnabled();
480 }
481 
isHistogramEnabled()482 bool QCameraParametersIntf::isHistogramEnabled()
483 {
484     Mutex::Autolock lock(mLock);
485     CHECK_PARAM_INTF(mImpl);
486     return mImpl->isHistogramEnabled();
487 }
488 
isSceneSelectionEnabled()489 bool QCameraParametersIntf::isSceneSelectionEnabled()
490 {
491     Mutex::Autolock lock(mLock);
492     CHECK_PARAM_INTF(mImpl);
493     return mImpl->isSceneSelectionEnabled();
494 }
495 
isSmallJpegSizeEnabled()496 bool QCameraParametersIntf::isSmallJpegSizeEnabled()
497 {
498     Mutex::Autolock lock(mLock);
499     CHECK_PARAM_INTF(mImpl);
500     return mImpl->isSmallJpegSizeEnabled();
501 }
502 
setSelectedScene(cam_scene_mode_type scene)503 int32_t QCameraParametersIntf::setSelectedScene(cam_scene_mode_type scene)
504 {
505     Mutex::Autolock lock(mLock);
506     CHECK_PARAM_INTF(mImpl);
507     return mImpl->setSelectedScene(scene);
508 }
509 
getSelectedScene()510 cam_scene_mode_type QCameraParametersIntf::getSelectedScene()
511 {
512     Mutex::Autolock lock(mLock);
513     CHECK_PARAM_INTF(mImpl);
514     return mImpl->getSelectedScene();
515 }
516 
isFaceDetectionEnabled()517 bool QCameraParametersIntf::isFaceDetectionEnabled()
518 {
519     Mutex::Autolock lock(mLock);
520     CHECK_PARAM_INTF(mImpl);
521     return mImpl->isFaceDetectionEnabled();
522 }
523 
setFaceDetectionOption(bool enabled)524 int32_t QCameraParametersIntf::setFaceDetectionOption(bool enabled)
525 {
526     Mutex::Autolock lock(mLock);
527     CHECK_PARAM_INTF(mImpl);
528     return mImpl->setFaceDetectionOption(enabled);
529 }
530 
setHistogram(bool enabled)531 int32_t QCameraParametersIntf::setHistogram(bool enabled)
532 {
533     Mutex::Autolock lock(mLock);
534     CHECK_PARAM_INTF(mImpl);
535     return mImpl->setHistogram(enabled);
536 }
537 
setFaceDetection(bool enabled,bool initCommit)538 int32_t QCameraParametersIntf::setFaceDetection(bool enabled, bool initCommit)
539 {
540     Mutex::Autolock lock(mLock);
541     CHECK_PARAM_INTF(mImpl);
542     return mImpl->setFaceDetection(enabled, initCommit);
543 }
544 
setFrameSkip(enum msm_vfe_frame_skip_pattern pattern)545 int32_t QCameraParametersIntf::setFrameSkip(enum msm_vfe_frame_skip_pattern pattern)
546 {
547     Mutex::Autolock lock(mLock);
548     CHECK_PARAM_INTF(mImpl);
549     return mImpl->setFrameSkip(pattern);
550 }
551 
getThermalMode()552 qcamera_thermal_mode QCameraParametersIntf::getThermalMode()
553 {
554     Mutex::Autolock lock(mLock);
555     CHECK_PARAM_INTF(mImpl);
556     return mImpl->getThermalMode();
557 }
558 
updateRecordingHintValue(int32_t value)559 int32_t QCameraParametersIntf::updateRecordingHintValue(int32_t value)
560 {
561     Mutex::Autolock lock(mLock);
562     CHECK_PARAM_INTF(mImpl);
563     return mImpl->updateRecordingHintValue(value);
564 }
565 
setHDRAEBracket(cam_exp_bracketing_t hdrBracket)566 int32_t QCameraParametersIntf::setHDRAEBracket(cam_exp_bracketing_t hdrBracket)
567 {
568     Mutex::Autolock lock(mLock);
569     CHECK_PARAM_INTF(mImpl);
570     return mImpl->setHDRAEBracket(hdrBracket);
571 }
572 
isHDREnabled()573 bool QCameraParametersIntf::isHDREnabled()
574 {
575     Mutex::Autolock lock(mLock);
576     CHECK_PARAM_INTF(mImpl);
577     return mImpl->isHDREnabled();
578 }
579 
isAutoHDREnabled()580 bool QCameraParametersIntf::isAutoHDREnabled()
581 {
582     Mutex::Autolock lock(mLock);
583     CHECK_PARAM_INTF(mImpl);
584     return mImpl->isAutoHDREnabled();
585 }
586 
stopAEBracket()587 int32_t QCameraParametersIntf::stopAEBracket()
588 {
589     Mutex::Autolock lock(mLock);
590     CHECK_PARAM_INTF(mImpl);
591     return mImpl->stopAEBracket();
592 }
593 
updateRAW(cam_dimension_t max_dim)594 int32_t QCameraParametersIntf::updateRAW(cam_dimension_t max_dim)
595 {
596     Mutex::Autolock lock(mLock);
597     CHECK_PARAM_INTF(mImpl);
598     return mImpl->updateRAW(max_dim);
599 }
600 
isDISEnabled()601 bool QCameraParametersIntf::isDISEnabled()
602 {
603     Mutex::Autolock lock(mLock);
604     CHECK_PARAM_INTF(mImpl);
605     return mImpl->isDISEnabled();
606 }
607 
isAVTimerEnabled()608 bool QCameraParametersIntf::isAVTimerEnabled()
609 {
610     Mutex::Autolock lock(mLock);
611     CHECK_PARAM_INTF(mImpl);
612     return mImpl->isAVTimerEnabled();
613 }
614 
setISType()615 int32_t QCameraParametersIntf::setISType()
616 {
617     Mutex::Autolock lock(mLock);
618     CHECK_PARAM_INTF(mImpl);
619     return mImpl->setISType();
620 }
621 
getVideoISType()622 cam_is_type_t QCameraParametersIntf::getVideoISType()
623 {
624     Mutex::Autolock lock(mLock);
625     CHECK_PARAM_INTF(mImpl);
626     return mImpl->getVideoISType();
627 }
628 
getPreviewISType()629 cam_is_type_t QCameraParametersIntf::getPreviewISType()
630 {
631     Mutex::Autolock lock(mLock);
632     CHECK_PARAM_INTF(mImpl);
633     return mImpl->getPreviewISType();
634 }
635 
getMobicatMask()636 uint8_t QCameraParametersIntf::getMobicatMask()
637 {
638     Mutex::Autolock lock(mLock);
639     CHECK_PARAM_INTF(mImpl);
640     return mImpl->getMobicatMask();
641 }
642 
getFocusMode() const643 cam_focus_mode_type QCameraParametersIntf::getFocusMode() const
644 {
645     Mutex::Autolock lock(mLock);
646     CHECK_PARAM_INTF(mImpl);
647     return mImpl->getFocusMode();
648 }
649 
setNumOfSnapshot()650 int32_t QCameraParametersIntf::setNumOfSnapshot()
651 {
652     Mutex::Autolock lock(mLock);
653     CHECK_PARAM_INTF(mImpl);
654     return mImpl->setNumOfSnapshot();
655 }
656 
adjustPreviewFpsRange(cam_fps_range_t * fpsRange)657 int32_t QCameraParametersIntf::adjustPreviewFpsRange(cam_fps_range_t *fpsRange)
658 {
659     Mutex::Autolock lock(mLock);
660     CHECK_PARAM_INTF(mImpl);
661     return mImpl->adjustPreviewFpsRange(fpsRange);
662 }
663 
isJpegPictureFormat()664 bool QCameraParametersIntf::isJpegPictureFormat()
665 {
666     Mutex::Autolock lock(mLock);
667     CHECK_PARAM_INTF(mImpl);
668     return mImpl->isJpegPictureFormat();
669 }
670 
isNV16PictureFormat()671 bool QCameraParametersIntf::isNV16PictureFormat()
672 {
673     Mutex::Autolock lock(mLock);
674     CHECK_PARAM_INTF(mImpl);
675     return mImpl->isNV16PictureFormat();
676 }
677 
isNV21PictureFormat()678 bool QCameraParametersIntf::isNV21PictureFormat()
679 {
680     Mutex::Autolock lock(mLock);
681     CHECK_PARAM_INTF(mImpl);
682     return mImpl->isNV21PictureFormat();
683 }
684 
getDenoiseProcessPlate(cam_intf_parm_type_t type)685 cam_denoise_process_type_t QCameraParametersIntf::getDenoiseProcessPlate(
686         cam_intf_parm_type_t type)
687 {
688     Mutex::Autolock lock(mLock);
689     CHECK_PARAM_INTF(mImpl);
690     return mImpl->getDenoiseProcessPlate(type);
691 }
692 
getMaxPicSize(cam_dimension_t & dim)693 int32_t QCameraParametersIntf::getMaxPicSize(cam_dimension_t &dim)
694 {
695     Mutex::Autolock lock(mLock);
696     CHECK_PARAM_INTF(mImpl);
697     return mImpl->getMaxPicSize(dim);
698 }
699 
getFlipMode(cam_stream_type_t streamType)700 int QCameraParametersIntf::getFlipMode(cam_stream_type_t streamType)
701 {
702     Mutex::Autolock lock(mLock);
703     CHECK_PARAM_INTF(mImpl);
704     return mImpl->getFlipMode(streamType);
705 }
706 
isSnapshotFDNeeded()707 bool QCameraParametersIntf::isSnapshotFDNeeded()
708 {
709     Mutex::Autolock lock(mLock);
710     CHECK_PARAM_INTF(mImpl);
711     return mImpl->isSnapshotFDNeeded();
712 }
713 
isHDR1xFrameEnabled()714 bool QCameraParametersIntf::isHDR1xFrameEnabled()
715 {
716     Mutex::Autolock lock(mLock);
717     CHECK_PARAM_INTF(mImpl);
718     return mImpl->isHDR1xFrameEnabled();
719 }
720 
isYUVFrameInfoNeeded()721 bool QCameraParametersIntf::isYUVFrameInfoNeeded()
722 {
723     Mutex::Autolock lock(mLock);
724     CHECK_PARAM_INTF(mImpl);
725     return mImpl->isYUVFrameInfoNeeded();
726 }
727 
getFrameFmtString(cam_format_t fmt)728 const char* QCameraParametersIntf::getFrameFmtString(cam_format_t fmt)
729 {
730     Mutex::Autolock lock(mLock);
731     CHECK_PARAM_INTF(mImpl);
732     return mImpl->getFrameFmtString(fmt);
733 }
734 
isHDR1xExtraBufferNeeded()735 bool QCameraParametersIntf::isHDR1xExtraBufferNeeded()
736 {
737     Mutex::Autolock lock(mLock);
738     CHECK_PARAM_INTF(mImpl);
739     return mImpl->isHDR1xExtraBufferNeeded();
740 }
741 
isHDROutputCropEnabled()742 bool QCameraParametersIntf::isHDROutputCropEnabled()
743 {
744     Mutex::Autolock lock(mLock);
745     CHECK_PARAM_INTF(mImpl);
746     return mImpl->isHDROutputCropEnabled();
747 }
748 
isPreviewFlipChanged()749 bool QCameraParametersIntf::isPreviewFlipChanged()
750 {
751     Mutex::Autolock lock(mLock);
752     CHECK_PARAM_INTF(mImpl);
753     return mImpl->isPreviewFlipChanged();
754 }
755 
isVideoFlipChanged()756 bool QCameraParametersIntf::isVideoFlipChanged()
757 {
758     Mutex::Autolock lock(mLock);
759     CHECK_PARAM_INTF(mImpl);
760     return mImpl->isVideoFlipChanged();
761 }
762 
isSnapshotFlipChanged()763 bool QCameraParametersIntf::isSnapshotFlipChanged()
764 {
765     Mutex::Autolock lock(mLock);
766     CHECK_PARAM_INTF(mImpl);
767     return mImpl->isSnapshotFlipChanged();
768 }
769 
isZoomChanged()770 bool QCameraParametersIntf::isZoomChanged()
771 {
772     Mutex::Autolock lock(mLock);
773     CHECK_PARAM_INTF(mImpl);
774     return mImpl->isZoomChanged();
775 }
776 
setHDRSceneEnable(bool bflag)777 void QCameraParametersIntf::setHDRSceneEnable(bool bflag)
778 {
779     Mutex::Autolock lock(mLock);
780     CHECK_PARAM_INTF(mImpl);
781     mImpl->setHDRSceneEnable(bflag);
782 }
783 
updateAWBParams(cam_awb_params_t & awb_params)784 int32_t QCameraParametersIntf::updateAWBParams(cam_awb_params_t &awb_params)
785 {
786     Mutex::Autolock lock(mLock);
787     CHECK_PARAM_INTF(mImpl);
788     return mImpl->updateAWBParams(awb_params);
789 }
790 
getASDStateString(cam_auto_scene_t scene)791 const char * QCameraParametersIntf::getASDStateString(cam_auto_scene_t scene)
792 {
793     Mutex::Autolock lock(mLock);
794     CHECK_PARAM_INTF(mImpl);
795     return mImpl->getASDStateString(scene);
796 }
797 
isHDRThumbnailProcessNeeded()798 bool QCameraParametersIntf::isHDRThumbnailProcessNeeded()
799 {
800     Mutex::Autolock lock(mLock);
801     CHECK_PARAM_INTF(mImpl);
802     return mImpl->isHDRThumbnailProcessNeeded();
803 }
804 
setMinPpMask(cam_feature_mask_t min_pp_mask)805 void QCameraParametersIntf::setMinPpMask(cam_feature_mask_t min_pp_mask)
806 {
807     Mutex::Autolock lock(mLock);
808     CHECK_PARAM_INTF(mImpl);
809     mImpl->setMinPpMask(min_pp_mask);
810 }
811 
setStreamConfigure(bool isCapture,bool previewAsPostview,bool resetConfig)812 bool QCameraParametersIntf::setStreamConfigure(bool isCapture,
813         bool previewAsPostview, bool resetConfig)
814 {
815     Mutex::Autolock lock(mLock);
816     CHECK_PARAM_INTF(mImpl);
817     return mImpl->setStreamConfigure(isCapture,
818             previewAsPostview, resetConfig);
819 }
820 
addOnlineRotation(uint32_t rotation,uint32_t streamId,int32_t device_rotation)821 int32_t QCameraParametersIntf::addOnlineRotation(uint32_t rotation,
822         uint32_t streamId, int32_t device_rotation)
823 {
824     Mutex::Autolock lock(mLock);
825     CHECK_PARAM_INTF(mImpl);
826     return mImpl->addOnlineRotation(rotation, streamId, device_rotation);
827 }
828 
getNumOfExtraBuffersForImageProc()829 uint8_t QCameraParametersIntf::getNumOfExtraBuffersForImageProc()
830 {
831     Mutex::Autolock lock(mLock);
832     CHECK_PARAM_INTF(mImpl);
833     return mImpl->getNumOfExtraBuffersForImageProc();
834 }
835 
getNumOfExtraBuffersForVideo()836 uint8_t QCameraParametersIntf::getNumOfExtraBuffersForVideo()
837 {
838     Mutex::Autolock lock(mLock);
839     CHECK_PARAM_INTF(mImpl);
840     return mImpl->getNumOfExtraBuffersForVideo();
841 }
842 
getNumOfExtraBuffersForPreview()843 uint8_t QCameraParametersIntf::getNumOfExtraBuffersForPreview()
844 {
845     Mutex::Autolock lock(mLock);
846     CHECK_PARAM_INTF(mImpl);
847     return mImpl->getNumOfExtraBuffersForPreview();
848 }
849 
getExifBufIndex(uint32_t captureIndex)850 uint32_t QCameraParametersIntf::getExifBufIndex(uint32_t captureIndex)
851 {
852     Mutex::Autolock lock(mLock);
853     CHECK_PARAM_INTF(mImpl);
854     return mImpl->getExifBufIndex(captureIndex);
855 }
856 
needThumbnailReprocess(cam_feature_mask_t * pFeatureMask)857 bool QCameraParametersIntf::needThumbnailReprocess(cam_feature_mask_t *pFeatureMask)
858 {
859     Mutex::Autolock lock(mLock);
860     CHECK_PARAM_INTF(mImpl);
861     return mImpl->needThumbnailReprocess(pFeatureMask);
862 }
863 
isUbiFocusEnabled()864 bool QCameraParametersIntf::isUbiFocusEnabled()
865 {
866     Mutex::Autolock lock(mLock);
867     CHECK_PARAM_INTF(mImpl);
868     return mImpl->isUbiFocusEnabled();
869 }
870 
isChromaFlashEnabled()871 bool QCameraParametersIntf::isChromaFlashEnabled()
872 {
873     Mutex::Autolock lock(mLock);
874     CHECK_PARAM_INTF(mImpl);
875     return mImpl->isChromaFlashEnabled();
876 }
877 
isHighQualityNoiseReductionMode()878 bool QCameraParametersIntf::isHighQualityNoiseReductionMode()
879 {
880     Mutex::Autolock lock(mLock);
881     CHECK_PARAM_INTF(mImpl);
882     return mImpl->isHighQualityNoiseReductionMode();
883 }
884 
isTruePortraitEnabled()885 bool QCameraParametersIntf::isTruePortraitEnabled()
886 {
887     Mutex::Autolock lock(mLock);
888     CHECK_PARAM_INTF(mImpl);
889     return mImpl->isTruePortraitEnabled();
890 }
891 
getTPMaxMetaSize()892 size_t QCameraParametersIntf::getTPMaxMetaSize()
893 {
894     Mutex::Autolock lock(mLock);
895     CHECK_PARAM_INTF(mImpl);
896     return mImpl->getTPMaxMetaSize();
897 }
898 
isSeeMoreEnabled()899 bool QCameraParametersIntf::isSeeMoreEnabled()
900 {
901     Mutex::Autolock lock(mLock);
902     CHECK_PARAM_INTF(mImpl);
903     return mImpl->isSeeMoreEnabled();
904 }
905 
isStillMoreEnabled()906 bool QCameraParametersIntf::isStillMoreEnabled()
907 {
908     Mutex::Autolock lock(mLock);
909     CHECK_PARAM_INTF(mImpl);
910     return mImpl->isStillMoreEnabled();
911 }
912 
isOptiZoomEnabled()913 bool QCameraParametersIntf::isOptiZoomEnabled()
914 {
915     Mutex::Autolock lock(mLock);
916     CHECK_PARAM_INTF(mImpl);
917     return mImpl->isOptiZoomEnabled();
918 }
919 
commitAFBracket(cam_af_bracketing_t afBracket)920 int32_t QCameraParametersIntf::commitAFBracket(cam_af_bracketing_t afBracket)
921 {
922     Mutex::Autolock lock(mLock);
923     CHECK_PARAM_INTF(mImpl);
924     return mImpl->commitAFBracket(afBracket);
925 }
926 
927 
set3ALock(bool lock3A)928 int32_t QCameraParametersIntf::set3ALock(bool lock3A)
929 {
930     Mutex::Autolock lock(mLock);
931     CHECK_PARAM_INTF(mImpl);
932     return mImpl->set3ALock(lock3A);
933 }
934 
setAndCommitZoom(int zoom_level)935 int32_t QCameraParametersIntf::setAndCommitZoom(int zoom_level)
936 {
937     Mutex::Autolock lock(mLock);
938     CHECK_PARAM_INTF(mImpl);
939     return mImpl->setAndCommitZoom(zoom_level);
940 }
getBurstCountForAdvancedCapture()941 uint8_t QCameraParametersIntf::getBurstCountForAdvancedCapture()
942 {
943     Mutex::Autolock lock(mLock);
944     CHECK_PARAM_INTF(mImpl);
945     return mImpl->getBurstCountForAdvancedCapture();
946 }
getNumberInBufsForSingleShot()947 uint32_t QCameraParametersIntf::getNumberInBufsForSingleShot()
948 {
949     Mutex::Autolock lock(mLock);
950     CHECK_PARAM_INTF(mImpl);
951     return mImpl->getNumberInBufsForSingleShot();
952 }
getNumberOutBufsForSingleShot()953 uint32_t QCameraParametersIntf::getNumberOutBufsForSingleShot()
954 {
955     Mutex::Autolock lock(mLock);
956     CHECK_PARAM_INTF(mImpl);
957     return mImpl->getNumberOutBufsForSingleShot();
958 }
setLongshotEnable(bool enable)959 int32_t QCameraParametersIntf::setLongshotEnable(bool enable)
960 {
961     Mutex::Autolock lock(mLock);
962     CHECK_PARAM_INTF(mImpl);
963     return mImpl->setLongshotEnable(enable);
964 }
dump()965 String8 QCameraParametersIntf::dump()
966 {
967     Mutex::Autolock lock(mLock);
968     CHECK_PARAM_INTF(mImpl);
969     return mImpl->dump();
970 }
isUbiRefocus()971 bool QCameraParametersIntf::isUbiRefocus()
972 {
973     Mutex::Autolock lock(mLock);
974     CHECK_PARAM_INTF(mImpl);
975     return mImpl->isUbiRefocus();
976 }
getRefocusMaxMetaSize()977 uint32_t QCameraParametersIntf::getRefocusMaxMetaSize()
978 {
979     Mutex::Autolock lock(mLock);
980     CHECK_PARAM_INTF(mImpl);
981     return mImpl->getRefocusMaxMetaSize();
982 }
getRefocusOutputCount()983 uint8_t QCameraParametersIntf::getRefocusOutputCount()
984 {
985     Mutex::Autolock lock(mLock);
986     CHECK_PARAM_INTF(mImpl);
987     return mImpl->getRefocusOutputCount();
988 }
989 
generateThumbFromMain()990 bool QCameraParametersIntf::generateThumbFromMain()
991 {
992     Mutex::Autolock lock(mLock);
993     CHECK_PARAM_INTF(mImpl);
994     return mImpl->generateThumbFromMain();
995 }
996 
updateCurrentFocusPosition(cam_focus_pos_info_t & cur_pos_info)997 void QCameraParametersIntf::updateCurrentFocusPosition(cam_focus_pos_info_t &cur_pos_info)
998 {
999     Mutex::Autolock lock(mLock);
1000     CHECK_PARAM_INTF(mImpl);
1001     mImpl->updateCurrentFocusPosition(cur_pos_info);
1002 }
1003 
updateAEInfo(cam_3a_params_t & ae_params)1004 void QCameraParametersIntf::updateAEInfo(cam_3a_params_t &ae_params)
1005 {
1006     Mutex::Autolock lock(mLock);
1007     CHECK_PARAM_INTF(mImpl);
1008     mImpl->updateAEInfo(ae_params);
1009 }
1010 
isAdvCamFeaturesEnabled()1011 bool QCameraParametersIntf::isAdvCamFeaturesEnabled()
1012 {
1013     Mutex::Autolock lock(mLock);
1014     CHECK_PARAM_INTF(mImpl);
1015     return mImpl->isAdvCamFeaturesEnabled();
1016 }
1017 
setAecLock(const char * aecStr)1018 int32_t QCameraParametersIntf::setAecLock(const char *aecStr)
1019 {
1020     Mutex::Autolock lock(mLock);
1021     CHECK_PARAM_INTF(mImpl);
1022     return mImpl->setAecLock(aecStr);
1023 }
1024 
updateDebugLevel()1025 int32_t QCameraParametersIntf::updateDebugLevel()
1026 {
1027     Mutex::Autolock lock(mLock);
1028     CHECK_PARAM_INTF(mImpl);
1029     return mImpl->updateDebugLevel();
1030 }
1031 
is4k2kVideoResolution()1032 bool QCameraParametersIntf::is4k2kVideoResolution()
1033 {
1034     Mutex::Autolock lock(mLock);
1035     CHECK_PARAM_INTF(mImpl);
1036     return mImpl->is4k2kVideoResolution();
1037 }
1038 
isUBWCEnabled()1039 bool QCameraParametersIntf::isUBWCEnabled()
1040 {
1041     Mutex::Autolock lock(mLock);
1042     CHECK_PARAM_INTF(mImpl);
1043     return mImpl->isUBWCEnabled();
1044 }
getBrightness()1045 int QCameraParametersIntf::getBrightness()
1046 {
1047     Mutex::Autolock lock(mLock);
1048     CHECK_PARAM_INTF(mImpl);
1049     return mImpl->getBrightness();
1050 }
1051 
updateOisValue(bool oisValue)1052 int32_t QCameraParametersIntf::updateOisValue(bool oisValue)
1053 {
1054     Mutex::Autolock lock(mLock);
1055     CHECK_PARAM_INTF(mImpl);
1056     return mImpl->updateOisValue(oisValue);
1057 }
1058 
setIntEvent(cam_int_evt_params_t params)1059 int32_t QCameraParametersIntf::setIntEvent(cam_int_evt_params_t params)
1060 {
1061     Mutex::Autolock lock(mLock);
1062     CHECK_PARAM_INTF(mImpl);
1063     return mImpl->setIntEvent(params);
1064 }
1065 
getofflineRAW()1066 bool QCameraParametersIntf::getofflineRAW()
1067 {
1068     Mutex::Autolock lock(mLock);
1069     CHECK_PARAM_INTF(mImpl);
1070     return mImpl->getofflineRAW();
1071 }
1072 
getQuadraCfa()1073 bool QCameraParametersIntf::getQuadraCfa()
1074 {
1075     Mutex::Autolock lock(mLock);
1076     CHECK_PARAM_INTF(mImpl);
1077     return mImpl->getQuadraCfa();
1078 }
1079 
updatePpFeatureMask(cam_stream_type_t stream_type)1080 int32_t QCameraParametersIntf::updatePpFeatureMask(cam_stream_type_t stream_type)
1081 {
1082     Mutex::Autolock lock(mLock);
1083     CHECK_PARAM_INTF(mImpl);
1084     return mImpl->updatePpFeatureMask(stream_type);
1085 }
1086 
getStreamPpMask(cam_stream_type_t stream_type,cam_feature_mask_t & pp_mask)1087 int32_t QCameraParametersIntf::getStreamPpMask(cam_stream_type_t stream_type,
1088         cam_feature_mask_t &pp_mask)
1089 {
1090     Mutex::Autolock lock(mLock);
1091     CHECK_PARAM_INTF(mImpl);
1092     return mImpl->getStreamPpMask(stream_type, pp_mask);
1093 }
1094 
getSharpness()1095 int32_t QCameraParametersIntf::getSharpness()
1096 {
1097     Mutex::Autolock lock(mLock);
1098     CHECK_PARAM_INTF(mImpl);
1099     return mImpl->getSharpness();
1100 }
1101 
getEffect()1102 int32_t QCameraParametersIntf::getEffect()
1103 {
1104     Mutex::Autolock lock(mLock);
1105     CHECK_PARAM_INTF(mImpl);
1106     return mImpl->getEffect();
1107 }
1108 
updateFlashMode(cam_flash_mode_t flash_mode)1109 int32_t QCameraParametersIntf::updateFlashMode(cam_flash_mode_t flash_mode)
1110 {
1111     Mutex::Autolock lock(mLock);
1112     CHECK_PARAM_INTF(mImpl);
1113     return mImpl->updateFlashMode(flash_mode);
1114 }
1115 
configureAEBracketing(cam_capture_frame_config_t & frame_config)1116 int32_t QCameraParametersIntf::configureAEBracketing(cam_capture_frame_config_t &frame_config)
1117 {
1118     Mutex::Autolock lock(mLock);
1119     CHECK_PARAM_INTF(mImpl);
1120     return mImpl->configureAEBracketing(frame_config);
1121 }
1122 
configureHDRBracketing(cam_capture_frame_config_t & frame_config)1123 int32_t QCameraParametersIntf::configureHDRBracketing(cam_capture_frame_config_t &frame_config)
1124 {
1125     Mutex::Autolock lock(mLock);
1126     CHECK_PARAM_INTF(mImpl);
1127     return mImpl->configureHDRBracketing(frame_config);
1128 }
1129 
configFrameCapture(bool commitSettings)1130 int32_t QCameraParametersIntf::configFrameCapture(bool commitSettings)
1131 {
1132     Mutex::Autolock lock(mLock);
1133     CHECK_PARAM_INTF(mImpl);
1134     return mImpl->configFrameCapture(commitSettings);
1135 }
1136 
resetFrameCapture(bool commitSettings,bool lowLightEnabled)1137 int32_t QCameraParametersIntf::resetFrameCapture(bool commitSettings, bool lowLightEnabled)
1138 {
1139     Mutex::Autolock lock(mLock);
1140     CHECK_PARAM_INTF(mImpl);
1141     return mImpl->resetFrameCapture(commitSettings,lowLightEnabled);
1142 }
1143 
getStillMoreSettings()1144 cam_still_more_t QCameraParametersIntf::getStillMoreSettings()
1145 {
1146     Mutex::Autolock lock(mLock);
1147     CHECK_PARAM_INTF(mImpl);
1148     return mImpl->getStillMoreSettings();
1149 }
1150 
setStillMoreSettings(cam_still_more_t stillmore_config)1151 void QCameraParametersIntf::setStillMoreSettings(cam_still_more_t stillmore_config)
1152 {
1153     Mutex::Autolock lock(mLock);
1154     CHECK_PARAM_INTF(mImpl);
1155     mImpl->setStillMoreSettings(stillmore_config);
1156 }
1157 
getStillMoreCapability()1158 cam_still_more_t QCameraParametersIntf::getStillMoreCapability()
1159 {
1160     Mutex::Autolock lock(mLock);
1161     CHECK_PARAM_INTF(mImpl);
1162     return mImpl->getStillMoreCapability();
1163 }
1164 
getDynamicImgData()1165 cam_dyn_img_data_t QCameraParametersIntf::getDynamicImgData()
1166 {
1167     Mutex::Autolock lock(mLock);
1168     CHECK_PARAM_INTF(mImpl);
1169     return mImpl->getDynamicImgData();
1170 }
1171 
setDynamicImgData(cam_dyn_img_data_t d)1172 void QCameraParametersIntf::setDynamicImgData(cam_dyn_img_data_t d)
1173 {
1174     Mutex::Autolock lock(mLock);
1175     CHECK_PARAM_INTF(mImpl);
1176     mImpl->setDynamicImgData(d);
1177 }
1178 
getParmZoomLevel()1179 int32_t QCameraParametersIntf::getParmZoomLevel()
1180 {
1181     Mutex::Autolock lock(mLock);
1182     CHECK_PARAM_INTF(mImpl);
1183     return mImpl->getParmZoomLevel();
1184 }
1185 
1186 
getReprocCount()1187 int8_t QCameraParametersIntf::getReprocCount()
1188 {
1189     Mutex::Autolock lock(mLock);
1190     CHECK_PARAM_INTF(mImpl);
1191     return mImpl->getReprocCount();
1192 }
1193 
1194 
getCurPPCount()1195 int8_t QCameraParametersIntf::getCurPPCount()
1196 {
1197     Mutex::Autolock lock(mLock);
1198     CHECK_PARAM_INTF(mImpl);
1199     return mImpl->getCurPPCount();
1200 }
1201 
1202 
setReprocCount()1203 void QCameraParametersIntf::setReprocCount()
1204 {
1205     Mutex::Autolock lock(mLock);
1206     CHECK_PARAM_INTF(mImpl);
1207     mImpl->setReprocCount();
1208 }
1209 
1210 
isPostProcScaling()1211 bool QCameraParametersIntf::isPostProcScaling()
1212 {
1213     Mutex::Autolock lock(mLock);
1214     CHECK_PARAM_INTF(mImpl);
1215     return mImpl->isPostProcScaling();
1216 }
1217 
1218 
isLLNoiseEnabled()1219 bool QCameraParametersIntf::isLLNoiseEnabled()
1220 {
1221     Mutex::Autolock lock(mLock);
1222     CHECK_PARAM_INTF(mImpl);
1223     return mImpl->isLLNoiseEnabled();
1224 }
1225 
1226 
setCurPPCount(int8_t count)1227 void QCameraParametersIntf::setCurPPCount(int8_t count)
1228 {
1229     Mutex::Autolock lock(mLock);
1230     CHECK_PARAM_INTF(mImpl);
1231     mImpl->setCurPPCount(count);
1232 }
1233 
setQuadraCfaMode(uint32_t value,bool initCommit)1234 int32_t QCameraParametersIntf::setQuadraCfaMode(uint32_t value, bool initCommit)
1235 {
1236     Mutex::Autolock lock(mLock);
1237     CHECK_PARAM_INTF(mImpl);
1238     return mImpl->setQuadraCfaMode(value, initCommit);
1239 }
1240 
setToneMapMode(uint32_t value,bool initCommit)1241 int32_t QCameraParametersIntf::setToneMapMode(uint32_t value, bool initCommit)
1242 {
1243     Mutex::Autolock lock(mLock);
1244     CHECK_PARAM_INTF(mImpl);
1245     return mImpl->setToneMapMode(value, initCommit);
1246 }
1247 
setTintless(bool enable)1248 void QCameraParametersIntf::setTintless(bool enable)
1249 {
1250     Mutex::Autolock lock(mLock);
1251     CHECK_PARAM_INTF(mImpl);
1252     mImpl->setTintless(enable);
1253 }
1254 
getLongshotStages()1255 uint8_t QCameraParametersIntf::getLongshotStages()
1256 {
1257     Mutex::Autolock lock(mLock);
1258     CHECK_PARAM_INTF(mImpl);
1259     return mImpl->getLongshotStages();
1260 }
1261 
getBufBatchCount()1262 int8_t  QCameraParametersIntf::getBufBatchCount()
1263 {
1264     Mutex::Autolock lock(mLock);
1265     CHECK_PARAM_INTF(mImpl);
1266     return mImpl->getBufBatchCount();
1267 }
1268 
getVideoBatchSize()1269 int8_t  QCameraParametersIntf::getVideoBatchSize()
1270 {
1271     Mutex::Autolock lock(mLock);
1272     CHECK_PARAM_INTF(mImpl);
1273     return mImpl->getVideoBatchSize();
1274 }
1275 
setManualCaptureMode(QCameraManualCaptureModes value)1276 int32_t QCameraParametersIntf::setManualCaptureMode(
1277         QCameraManualCaptureModes value)
1278 {
1279     Mutex::Autolock lock(mLock);
1280     CHECK_PARAM_INTF(mImpl);
1281     return mImpl->setManualCaptureMode(value);
1282 }
1283 
getManualCaptureMode()1284 QCameraManualCaptureModes QCameraParametersIntf::getManualCaptureMode()
1285 {
1286     Mutex::Autolock lock(mLock);
1287     CHECK_PARAM_INTF(mImpl);
1288     return mImpl->getManualCaptureMode();
1289 }
1290 
getExposureTime()1291 int64_t QCameraParametersIntf::getExposureTime()
1292 {
1293     Mutex::Autolock lock(mLock);
1294     CHECK_PARAM_INTF(mImpl);
1295     return mImpl->getExposureTime();
1296 }
1297 
getCaptureFrameConfig()1298 cam_capture_frame_config_t QCameraParametersIntf::getCaptureFrameConfig()
1299 {
1300     Mutex::Autolock lock(mLock);
1301     CHECK_PARAM_INTF(mImpl);
1302     return mImpl->getCaptureFrameConfig();
1303 }
1304 
setJpegRotation(int rotation)1305 void QCameraParametersIntf::setJpegRotation(int rotation)
1306 {
1307     Mutex::Autolock lock(mLock);
1308     CHECK_PARAM_INTF(mImpl);
1309     mImpl->setJpegRotation(rotation);
1310 }
1311 
getJpegRotation()1312 uint32_t QCameraParametersIntf::getJpegRotation()
1313 {
1314     Mutex::Autolock lock(mLock);
1315     CHECK_PARAM_INTF(mImpl);
1316     return mImpl->getJpegRotation();
1317 }
1318 
setLowLightLevel(cam_low_light_mode_t value)1319 void QCameraParametersIntf::setLowLightLevel(cam_low_light_mode_t value)
1320 {
1321     Mutex::Autolock lock(mLock);
1322     CHECK_PARAM_INTF(mImpl);
1323     mImpl->setLowLightLevel(value);
1324 }
1325 
getLowLightLevel()1326 cam_low_light_mode_t QCameraParametersIntf::getLowLightLevel()
1327 {
1328     CHECK_PARAM_INTF(mImpl);
1329     return mImpl->getLowLightLevel();
1330 }
1331 
getLowLightCapture()1332 bool QCameraParametersIntf::getLowLightCapture()
1333 {
1334     Mutex::Autolock lock(mLock);
1335     CHECK_PARAM_INTF(mImpl);
1336     return mImpl->getLowLightCapture();
1337 }
1338 
getDcrf()1339 bool QCameraParametersIntf::getDcrf()
1340 {
1341     Mutex::Autolock lock(mLock);
1342     CHECK_PARAM_INTF(mImpl);
1343     return mImpl->getDcrf();
1344 }
1345 
setRelatedCamSyncInfo(cam_sync_related_sensors_event_info_t * info)1346 int32_t QCameraParametersIntf::setRelatedCamSyncInfo(
1347 	cam_sync_related_sensors_event_info_t* info)
1348 {
1349     Mutex::Autolock lock(mLock);
1350     CHECK_PARAM_INTF(mImpl);
1351     return mImpl->setRelatedCamSyncInfo(info);
1352 }
1353 
1354 const cam_sync_related_sensors_event_info_t*
getRelatedCamSyncInfo(void)1355 	QCameraParametersIntf::getRelatedCamSyncInfo(void)
1356 {
1357     Mutex::Autolock lock(mLock);
1358     CHECK_PARAM_INTF(mImpl);
1359     return mImpl->getRelatedCamSyncInfo();
1360 }
1361 
setFrameSyncEnabled(bool enable)1362 int32_t QCameraParametersIntf::setFrameSyncEnabled(
1363 	bool enable)
1364 {
1365     Mutex::Autolock lock(mLock);
1366     CHECK_PARAM_INTF(mImpl);
1367     return mImpl->setFrameSyncEnabled(enable);
1368 }
1369 
isFrameSyncEnabled(void)1370 bool QCameraParametersIntf::isFrameSyncEnabled(void)
1371 {
1372     Mutex::Autolock lock(mLock);
1373     CHECK_PARAM_INTF(mImpl);
1374     return mImpl->isFrameSyncEnabled();
1375 }
1376 
getRelatedCamCalibration(cam_related_system_calibration_data_t * calib)1377 int32_t QCameraParametersIntf::getRelatedCamCalibration(
1378 	cam_related_system_calibration_data_t* calib)
1379 {
1380     Mutex::Autolock lock(mLock);
1381     CHECK_PARAM_INTF(mImpl);
1382     return mImpl->getRelatedCamCalibration(calib);
1383 }
1384 
bundleRelatedCameras(bool sync)1385 int32_t QCameraParametersIntf::bundleRelatedCameras(bool sync)
1386 {
1387     Mutex::Autolock lock(mLock);
1388     CHECK_PARAM_INTF(mImpl);
1389     return mImpl->bundleRelatedCameras(sync);
1390 }
1391 
fdModeInVideo()1392 uint8_t QCameraParametersIntf::fdModeInVideo()
1393 {
1394     Mutex::Autolock lock(mLock);
1395     CHECK_PARAM_INTF(mImpl);
1396     return mImpl->fdModeInVideo();
1397 }
1398 
isOEMFeatEnabled()1399 bool QCameraParametersIntf::isOEMFeatEnabled()
1400 {
1401     Mutex::Autolock lock(mLock);
1402     CHECK_PARAM_INTF(mImpl);
1403     return mImpl->isOEMFeatEnabled();
1404 }
1405 
isOEMFeatFrameSkipEnabled()1406 uint8_t QCameraParametersIntf::isOEMFeatFrameSkipEnabled()
1407 {
1408     Mutex::Autolock lock(mLock);
1409     CHECK_PARAM_INTF(mImpl);
1410     return mImpl->isOEMFeatFrameSkipEnabled();
1411 }
1412 
setZslMode(bool value)1413 int32_t QCameraParametersIntf::setZslMode(bool value)
1414 {
1415     Mutex::Autolock lock(mLock);
1416     CHECK_PARAM_INTF(mImpl);
1417     return mImpl->setZslMode(value);
1418 }
1419 
updateZSLModeValue(bool value)1420 int32_t QCameraParametersIntf::updateZSLModeValue(bool value)
1421 {
1422     Mutex::Autolock lock(mLock);
1423     CHECK_PARAM_INTF(mImpl);
1424     return mImpl->updateZSLModeValue(value);
1425 }
1426 
isReprocScaleEnabled()1427 bool QCameraParametersIntf::isReprocScaleEnabled()
1428 {
1429     Mutex::Autolock lock(mLock);
1430     CHECK_PARAM_INTF(mImpl);
1431     return mImpl->isReprocScaleEnabled();
1432 }
1433 
isUnderReprocScaling()1434 bool QCameraParametersIntf::isUnderReprocScaling()
1435 {
1436     Mutex::Autolock lock(mLock);
1437     CHECK_PARAM_INTF(mImpl);
1438     return mImpl->isUnderReprocScaling();
1439 }
1440 
getPicSizeFromAPK(int & width,int & height)1441 int32_t QCameraParametersIntf::getPicSizeFromAPK(int &width, int &height)
1442 {
1443     Mutex::Autolock lock(mLock);
1444     CHECK_PARAM_INTF(mImpl);
1445     return mImpl->getPicSizeFromAPK(width, height);
1446 }
1447 
checkFeatureConcurrency()1448 int32_t QCameraParametersIntf::checkFeatureConcurrency()
1449 {
1450     Mutex::Autolock lock(mLock);
1451     CHECK_PARAM_INTF(mImpl);
1452     return mImpl->checkFeatureConcurrency();
1453 }
1454 
setInstantAEC(uint8_t enable,bool initCommit)1455 int32_t QCameraParametersIntf::setInstantAEC(uint8_t enable, bool initCommit)
1456 {
1457     Mutex::Autolock lock(mLock);
1458     CHECK_PARAM_INTF(mImpl);
1459     return mImpl->setInstantAEC(enable, initCommit);
1460 }
1461 
getAnalysisInfo(bool fdVideoEnabled,cam_feature_mask_t featureMask,cam_analysis_info_t * pAnalysisInfo)1462 int32_t QCameraParametersIntf::getAnalysisInfo(
1463         bool fdVideoEnabled,
1464         cam_feature_mask_t featureMask,
1465         cam_analysis_info_t *pAnalysisInfo)
1466 {
1467     Mutex::Autolock lock(mLock);
1468     CHECK_PARAM_INTF(mImpl);
1469     return mImpl->getAnalysisInfo(fdVideoEnabled, featureMask, pAnalysisInfo);
1470 }
updateDtVc(int32_t * dt,int32_t * vc)1471 int32_t QCameraParametersIntf::updateDtVc(int32_t *dt, int32_t *vc)
1472 {
1473     Mutex::Autolock lock(mLock);
1474     CHECK_PARAM_INTF(mImpl);
1475     return mImpl->updateDtVc(dt, vc);
1476 }
1477 
SetDualCamera(bool value)1478 int32_t QCameraParametersIntf::SetDualCamera(bool value)
1479 {
1480     Mutex::Autolock lock(mLock);
1481     CHECK_PARAM_INTF(mImpl);
1482     return mImpl->SetDualCamera(value);
1483 }
1484 
setCameraControls(int32_t controls)1485 int32_t QCameraParametersIntf::setCameraControls(int32_t controls)
1486 {
1487     Mutex::Autolock lock(mLock);
1488     CHECK_PARAM_INTF(mImpl);
1489     return mImpl->setCameraControls(controls);
1490 }
1491 
setSwitchCamera(uint32_t camMaster)1492 int32_t QCameraParametersIntf::setSwitchCamera(uint32_t camMaster)
1493 {
1494     Mutex::Autolock lock(mLock);
1495     CHECK_PARAM_INTF(mImpl);
1496     return mImpl->setSwitchCamera(camMaster);
1497 }
1498 
setDeferCamera(cam_dual_camera_defer_cmd_t type)1499 int32_t QCameraParametersIntf::setDeferCamera(cam_dual_camera_defer_cmd_t type)
1500 {
1501     Mutex::Autolock lock(mLock);
1502     CHECK_PARAM_INTF(mImpl);
1503     return mImpl->setDeferCamera(type);
1504 }
1505 
setBundledSnapshot(bool value)1506 void QCameraParametersIntf::setBundledSnapshot(bool value)
1507 {
1508     Mutex::Autolock lock(mLock);
1509     CHECK_PARAM_INTF(mImpl);
1510     return mImpl->setBundledSnapshot(value);
1511 }
1512 
getDualLedCalibration()1513 int32_t QCameraParametersIntf::getDualLedCalibration()
1514 {
1515     Mutex::Autolock lock(mLock);
1516     CHECK_PARAM_INTF(mImpl);
1517     return mImpl->getDualLedCalibration();
1518 }
1519 
isLinkPreviewForLiveShot()1520 bool QCameraParametersIntf::isLinkPreviewForLiveShot()
1521 {
1522     Mutex::Autolock lock(mLock);
1523     CHECK_PARAM_INTF(mImpl);
1524     return mImpl->isLinkPreviewForLiveShot();
1525 }
1526 
isDCmAsymmetricSnapMode()1527 bool QCameraParametersIntf::isDCmAsymmetricSnapMode()
1528 {
1529     Mutex::Autolock lock(mLock);
1530     CHECK_PARAM_INTF(mImpl);
1531     return mImpl->isDCmAsymmetricSnapMode();
1532 }
1533 
1534 }; // namespace qcamera
1535