OSDN Git Service

Fix format of camera preview FPS range parameter
authorBjoern Johansson <bjoernj@google.com>
Mon, 3 Oct 2016 22:07:36 +0000 (15:07 -0700)
committerBjoern Johansson <bjoernj@google.com>
Wed, 11 Jan 2017 21:03:23 +0000 (13:03 -0800)
The parameter for the preview FPS range contains two integers separated
by a comma. In the existing code the two integers were placed inside
parentheses which matches the list of support preview FPS ranges. It
seems however that this is not valid, the parentheses only exist in the
list of supported ranges so that treating it as a list becomes easier.
Newer versions of the Camera app relies on this parameter having the
correct format as does the getPreviewFpsRange method in the
CameraParameters class.

Test: ran camera CTS tests
Change-Id: If95fb0f2db2116a9c6452ac78da8f5fa077ee602
(cherry picked from commit 887d8c6b8ff6d037cc652fe59f4c160fa6de0d46)

camera/EmulatedCamera.cpp

index 857f40e..8f0a1cd 100755 (executable)
@@ -154,7 +154,7 @@ status_t EmulatedCamera::Initialize()
     mParameters.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATES,
                     "30,24,20,15,10,5");
     mParameters.set(CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE, "(24000,24000)");
-    mParameters.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, "(24000,24000)");
+    mParameters.set(CameraParameters::KEY_PREVIEW_FPS_RANGE, "24000,24000");
     mParameters.setPreviewFrameRate(24);
 
     /* Only PIXEL_FORMAT_YUV420P is accepted by video framework in emulator! */