diff options
author | Kyle Repinski <repinski23@gmail.com> | 2015-01-09 13:02:09 -0600 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2015-04-11 20:24:53 +0200 |
commit | 55d21caa69a85f1e9b909ed699282b041a2bcec5 (patch) | |
tree | bf9b74c9b1fcde8c11c49b865bb94ec8dea8e9d1 /camera/OMXCameraAdapter | |
parent | 48d5c7c1d27835ae882ade0bb92a14e7874f5558 (diff) | |
download | device_samsung_tuna-55d21caa69a85f1e9b909ed699282b041a2bcec5.zip device_samsung_tuna-55d21caa69a85f1e9b909ed699282b041a2bcec5.tar.gz device_samsung_tuna-55d21caa69a85f1e9b909ed699282b041a2bcec5.tar.bz2 |
camera: Fix compiler warnings, remove some S3D stuff.
Signed-off-by: Kyle Repinski <repinski23@gmail.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r-- | camera/OMXCameraAdapter/OMXAlgo.cpp | 2 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCameraAdapter.cpp | 4 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapabilities.cpp | 10 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapture.cpp | 8 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXExif.cpp | 6 | ||||
-rw-r--r-- | camera/OMXCameraAdapter/OMXZoom.cpp | 2 |
6 files changed, 23 insertions, 9 deletions
diff --git a/camera/OMXCameraAdapter/OMXAlgo.cpp b/camera/OMXCameraAdapter/OMXAlgo.cpp index 84090e9..2188590 100644 --- a/camera/OMXCameraAdapter/OMXAlgo.cpp +++ b/camera/OMXCameraAdapter/OMXAlgo.cpp @@ -80,9 +80,11 @@ status_t OMXCameraAdapter::setParametersAlgo(const android::CameraParameters &pa mCapabilitiesOpMode = MODE_HIGH_QUALITY; } +#ifndef OMAP_TUNA if ( mSensorIndex == 2 ) { mCapabilitiesOpMode = MODE_STEREO; } +#endif if ( mCapMode != capMode ) { mCapMode = capMode; diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp index c97ce61..61d1aae 100644 --- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp +++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp @@ -4471,6 +4471,7 @@ public: } status_t err = NO_ERROR; +#ifndef OMAP_TUNA if ( sensorId == 2 ) { CAMHAL_LOGD("Camera mode: STEREO"); properties->setMode(MODE_STEREO); @@ -4478,6 +4479,7 @@ public: sensorId, properties); } else { +#endif CAMHAL_LOGD("Camera MONO"); CAMHAL_LOGD("Camera mode: HQ "); @@ -4522,12 +4524,12 @@ public: err = fetchCapabiltiesForMode(OMX_TI_CPCam, sensorId, properties); -#endif if ( NO_ERROR != err ) { return err; } } +#endif return err; } diff --git a/camera/OMXCameraAdapter/OMXCapabilities.cpp b/camera/OMXCameraAdapter/OMXCapabilities.cpp index b339768..ba185e8 100644 --- a/camera/OMXCameraAdapter/OMXCapabilities.cpp +++ b/camera/OMXCameraAdapter/OMXCapabilities.cpp @@ -1817,6 +1817,7 @@ status_t OMXCameraAdapter::insertCaptureModes(CameraProperties::Properties* para return ret; } +#ifndef OMAP_TUNA status_t OMXCameraAdapter::insertLayout(CameraProperties::Properties* params, OMX_TI_CAPTYPE &caps) { status_t ret = NO_ERROR; @@ -1858,6 +1859,7 @@ status_t OMXCameraAdapter::insertLayout(CameraProperties::Properties* params, OM return ret; } +#endif status_t OMXCameraAdapter::insertVideoSnapshotSupported(CameraProperties::Properties* params, OMX_TI_CAPTYPE &caps) { @@ -1939,6 +1941,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, LOG_FUNCTION_NAME; +#ifndef OMAP_TUNA /* If default is supported - set it, else - set first supported */ if (strstr(params->get(CameraProperties::S3D_PRV_FRAME_LAYOUT_VALUES), DEFAULT_S3D_PREVIEW_LAYOUT)) { strncpy(temp, DEFAULT_S3D_PREVIEW_LAYOUT, MAX_PROP_VALUE_LENGTH - 1); @@ -1950,6 +1953,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, } } params->set(CameraProperties::S3D_PRV_FRAME_LAYOUT, temp); +#endif if (!strcmp(TICameraParameters::S3D_TB_FULL, temp)) { params->set(CameraProperties::SUPPORTED_PREVIEW_SIZES, params->get(CameraProperties::SUPPORTED_PREVIEW_TOPBOTTOM_SIZES)); @@ -1960,6 +1964,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, params->set(CameraProperties::SUPPORTED_PREVIEW_SIZES, params->get(CameraProperties::SUPPORTED_PREVIEW_SUBSAMPLED_SIZES)); } +#ifndef OMAP_TUNA /* If default is supported - set it, else - set first supported */ if (strstr(params->get(CameraProperties::S3D_CAP_FRAME_LAYOUT_VALUES), DEFAULT_S3D_PICTURE_LAYOUT)) { strncpy(temp, DEFAULT_S3D_PICTURE_LAYOUT, MAX_PROP_VALUE_LENGTH - 1); @@ -1971,6 +1976,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, } } params->set(CameraProperties::S3D_CAP_FRAME_LAYOUT, temp); +#endif if (!strcmp(TICameraParameters::S3D_TB_FULL, temp)) { params->set(CameraProperties::SUPPORTED_PICTURE_SIZES, params->get(CameraProperties::SUPPORTED_PICTURE_TOPBOTTOM_SIZES)); @@ -2007,6 +2013,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, params->set(CameraProperties::JPEG_THUMBNAIL_SIZE, DEFAULT_THUMBNAIL_SIZE); params->set(CameraProperties::PICTURE_FORMAT, DEFAULT_PICTURE_FORMAT); +#ifndef OMAP_TUNA if (!strcmp(params->get(CameraProperties::S3D_CAP_FRAME_LAYOUT), TICameraParameters::S3D_TB_FULL)) { params->set(CameraProperties::PICTURE_SIZE, DEFAULT_PICTURE_TB_SIZE); @@ -2026,6 +2033,7 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, } else { params->set(CameraProperties::PREVIEW_SIZE, DEFAULT_PREVIEW_SIZE); } +#endif params->set(CameraProperties::PREVIEW_FORMAT, DEFAULT_PREVIEW_FORMAT); @@ -2218,9 +2226,11 @@ status_t OMXCameraAdapter::insertCapabilities(CameraProperties::Properties* para ret = insertCaptureModes(params, caps); } +#ifndef OMAP_TUNA if ( NO_ERROR == ret) { ret = insertLayout(params, caps); } +#endif if ( NO_ERROR == ret) { ret = insertVideoSnapshotSupported(params, caps); diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp index 28a0ab1..b13572f 100644 --- a/camera/OMXCameraAdapter/OMXCapture.cpp +++ b/camera/OMXCameraAdapter/OMXCapture.cpp @@ -287,7 +287,7 @@ status_t OMXCameraAdapter::setParametersCapture(const android::CameraParameters varint = params.getInt(android::CameraParameters::KEY_JPEG_QUALITY); if ( varint >= MIN_JPEG_QUALITY && varint <= MAX_JPEG_QUALITY ) { - if (varint != mPictureQuality) { + if ((unsigned int)varint != mPictureQuality) { mPendingCaptureSettings |= SetQuality; mPictureQuality = varint; } @@ -302,7 +302,7 @@ status_t OMXCameraAdapter::setParametersCapture(const android::CameraParameters varint = params.getInt(android::CameraParameters::KEY_JPEG_THUMBNAIL_WIDTH); if ( varint >= 0 ) { - if (varint != mThumbWidth) { + if ((unsigned int)varint != mThumbWidth) { mPendingCaptureSettings |= SetThumb; mThumbWidth = varint; } @@ -317,7 +317,7 @@ status_t OMXCameraAdapter::setParametersCapture(const android::CameraParameters varint = params.getInt(android::CameraParameters::KEY_JPEG_THUMBNAIL_HEIGHT); if ( varint >= 0 ) { - if (varint != mThumbHeight) { + if ((unsigned int)varint != mThumbHeight) { mPendingCaptureSettings |= SetThumb; mThumbHeight = varint; } @@ -332,7 +332,7 @@ status_t OMXCameraAdapter::setParametersCapture(const android::CameraParameters varint = params.getInt(android::CameraParameters::KEY_JPEG_THUMBNAIL_QUALITY); if ( varint >= MIN_JPEG_QUALITY && varint <= MAX_JPEG_QUALITY ) { - if (varint != mThumbQuality) { + if ((unsigned int)varint != mThumbQuality) { mPendingCaptureSettings |= SetThumb; mThumbQuality = varint; } diff --git a/camera/OMXCameraAdapter/OMXExif.cpp b/camera/OMXCameraAdapter/OMXExif.cpp index cbf7c1c..bf475e8 100644 --- a/camera/OMXCameraAdapter/OMXExif.cpp +++ b/camera/OMXCameraAdapter/OMXExif.cpp @@ -238,7 +238,7 @@ status_t OMXCameraAdapter::setupEXIF() struct tm *pTime; OMXCameraPortParameters * capData = NULL; MemoryManager memMgr; - CameraBuffer *memmgr_buf_array; + CameraBuffer *memmgr_buf_array = NULL; int buf_size = 0; LOG_FUNCTION_NAME; @@ -567,13 +567,13 @@ status_t OMXCameraAdapter::setupEXIF_libjpeg(ExifElementsTable* exifTable, if ((NO_ERROR == ret)) { char temp_value[5]; - snprintf(temp_value, sizeof(temp_value)/sizeof(char), "%lu", capData->mWidth); + snprintf(temp_value, sizeof(temp_value)/sizeof(char), "%u", capData->mWidth); ret = exifTable->insertElement(TAG_IMAGE_WIDTH, temp_value); } if ((NO_ERROR == ret)) { char temp_value[5]; - snprintf(temp_value, sizeof(temp_value)/sizeof(char), "%lu", capData->mHeight); + snprintf(temp_value, sizeof(temp_value)/sizeof(char), "%u", capData->mHeight); ret = exifTable->insertElement(TAG_IMAGE_LENGTH, temp_value); } diff --git a/camera/OMXCameraAdapter/OMXZoom.cpp b/camera/OMXCameraAdapter/OMXZoom.cpp index e39a3b0..11c8f75 100644 --- a/camera/OMXCameraAdapter/OMXZoom.cpp +++ b/camera/OMXCameraAdapter/OMXZoom.cpp @@ -98,7 +98,7 @@ status_t OMXCameraAdapter::doZoom(int index) ret = -EINVAL; } - if (mPreviousZoomIndx == index ) + if (mPreviousZoomIndx == (unsigned int)index ) { return NO_ERROR; } |