Skip to content

Commit 1b686e2

Browse files
authored
Merge pull request #1 from MRTHAKER/8.1
camera: bring back CAMERA_PARAMETERS_EXTRA
2 parents 7015ab6 + 75b97ec commit 1b686e2

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

camera/CameraParameters.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ const char CameraParameters::FOCUS_MODE_CONTINUOUS_PICTURE[] = "continuous-pictu
173173
const char CameraParameters::LIGHTFX_LOWLIGHT[] = "low-light";
174174
const char CameraParameters::LIGHTFX_HDR[] = "high-dynamic-range";
175175

176+
#ifdef CAMERA_PARAMETERS_EXTRA_C
177+
CAMERA_PARAMETERS_EXTRA_C
178+
#endif
179+
176180
CameraParameters::CameraParameters()
177181
: mMap()
178182
{

camera/include/camera/CameraParameters.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include <utils/KeyedVector.h>
2121
#include <utils/String8.h>
22+
#include <camera/CameraParametersExtra.h>
2223

2324
namespace android {
2425

@@ -683,6 +684,10 @@ class CameraParameters
683684
// High-dynamic range mode
684685
static const char LIGHTFX_HDR[];
685686

687+
#ifdef CAMERA_PARAMETERS_EXTRA_H
688+
CAMERA_PARAMETERS_EXTRA_H
689+
#endif
690+
686691
/**
687692
* Returns the the supported preview formats as an enum given in graphics.h
688693
* corrsponding to the format given in the input string or -1 if no such
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// Overload this file in your device specific config if you need
2+
// to add extra camera parameters.
3+
// A typical file would look like this:
4+
/*
5+
* Copyright (C) 2014 The CyanogenMod Project
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_EXTRA_H
21+
#define ANDROID_HARDWARE_CAMERA_PARAMETERS_EXTRA_H
22+
23+
/*
24+
#define CAMERA_PARAMETERS_EXTRA_C \
25+
const char CameraParameters::KEY_SUPPORTED_BURST_NUM[] = "supported-burst-num"; \
26+
const char CameraParameters::KEY_BURST_NUM[] = "burst-num"; \
27+
const char CameraParameters::KEY_SUPPORTED_HDR_MODES[] = "supported-hdr-modes"; \
28+
const char CameraParameters::KEY_HDR_MODE[] = "hdr-mode"; \
29+
const char CameraParameters::HDR_MODE_OFF[] = "hdr-mode-off"; \
30+
const char CameraParameters::HDR_MODE_HDR[] = "hdr-mode-hdr";
31+
32+
#define CAMERA_PARAMETERS_EXTRA_H \
33+
static const char KEY_SUPPORTED_BURST_NUM[]; \
34+
static const char KEY_BURST_NUM[]; \
35+
static const char KEY_SUPPORTED_HDR_MODES[]; \
36+
static const char KEY_HDR_MODE[]; \
37+
static const char HDR_MODE_OFF[]; \
38+
static const char HDR_MODE_HDR[];
39+
*/
40+
41+
#endif

0 commit comments

Comments
 (0)