From a5b053bd1b1819448d33e5d1841aa720d869d54a Mon Sep 17 00:00:00 2001 From: Kyle Repinski Date: Fri, 9 Jan 2015 14:00:43 -0600 Subject: camera: Fix minor bug in a tuna workaround & disable a TI workaround we don't need. Signed-off-by: Kyle Repinski --- camera/OMXCameraAdapter/OMXCapabilities.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'camera') 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); } -- cgit v1.1