summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-01-09 14:00:43 -0600
committerZiyan <jaraidaniel@gmail.com>2015-04-11 20:24:53 +0200
commita5b053bd1b1819448d33e5d1841aa720d869d54a (patch)
treedacdcf803cc934104f831164db67a97bef58f9c0 /camera/OMXCameraAdapter
parent7f29150ed8157f641d45deb17603f37be5c35289 (diff)
downloaddevice_samsung_tuna-a5b053bd1b1819448d33e5d1841aa720d869d54a.zip
device_samsung_tuna-a5b053bd1b1819448d33e5d1841aa720d869d54a.tar.gz
device_samsung_tuna-a5b053bd1b1819448d33e5d1841aa720d869d54a.tar.bz2
camera: Fix minor bug in a tuna workaround & disable a TI workaround we don't need.
Signed-off-by: Kyle Repinski <repinski23@gmail.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r--camera/OMXCameraAdapter/OMXCapabilities.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapabilities.cpp b/camera/OMXCameraAdapter/OMXCapabilities.cpp
index ba185e8..8ac46fa 100644
--- a/camera/OMXCameraAdapter/OMXCapabilities.cpp
+++ b/camera/OMXCameraAdapter/OMXCapabilities.cpp
@@ -976,7 +976,9 @@ status_t OMXCameraAdapter::insertImageFormats(CameraProperties::Properties* para
if ( NO_ERROR == ret ) {
#ifdef OMAP_TUNA
//jpeg is not supported in (our) OMX capabilies
- strncat(supported, PARAM_SEP, MAX_PROP_VALUE_LENGTH - 1);
+ if (supported[0] != '\0') {
+ strncat(supported, PARAM_SEP, 1);
+ }
strncat(supported, android::CameraParameters::PIXEL_FORMAT_JPEG, MAX_PROP_VALUE_LENGTH - 1);
#endif
params->set(CameraProperties::SUPPORTED_PICTURE_FORMATS, supported);
@@ -1010,11 +1012,14 @@ status_t OMXCameraAdapter::insertPreviewFormats(CameraProperties::Properties* pa
if ( NO_ERROR == ret ) {
// need to advertise we support YV12 format
+ // tuna advertises this already though
+#ifndef OMAP_TUNA
// We will program preview port with NV21 when we see application set YV12
if (supported[0] != '\0') {
strncat(supported, PARAM_SEP, 1);
}
strncat(supported, android::CameraParameters::PIXEL_FORMAT_YUV420P, MAX_PROP_VALUE_LENGTH - 1);
+#endif
params->set(CameraProperties::SUPPORTED_PREVIEW_FORMATS, supported);
}