ExynosCamera2.h revision 5c88d1f2e176e716cd51df32c6835ec3b89b20e1
1/*
2**
3** Copyright 2008, The Android Open Source Project
4** Copyright 2012, Samsung Electronics Co. LTD
5**
6** Licensed under the Apache License, Version 2.0 (the "License");
7** you may not use this file except in compliance with the License.
8** You may obtain a copy of the License at
9**
10**     http://www.apache.org/licenses/LICENSE-2.0
11**
12** Unless required by applicable law or agreed to in writing, software
13** distributed under the License is distributed on an "AS IS" BASIS,
14** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15** See the License for the specific language governing permissions and
16** limitations under the License.
17*/
18
19/*!
20 * \file      ExynosCamera2.h
21 * \brief     header file for static information of camera2
22 * \author    Sungjoong Kang(sj3.kang@samsung.com)
23 * \date      2012/08/06
24 *
25 * <b>Revision History: </b>
26 * - 2012/08/06 : Sungjoong Kang(sj3.kang@samsung.com) \n
27 *   Initial Release
28 *
29 */
30
31#include <hardware/camera2.h>
32#include <camera/Camera.h>
33#include <camera/CameraParameters.h>
34#include "exynos_format.h"
35
36//#define VDIS_ENABLE
37
38namespace android {
39
40struct ExynosCamera2Info
41{
42public:
43    int32_t     sensorW;
44    int32_t     sensorH;
45    int32_t     sensorRawW;
46    int32_t     sensorRawH;
47    int         numScalerResolution;
48    const int32_t     *scalerResolutions;
49    int         numJpegResolution;
50    const int32_t     *jpegResolutions;
51    float       minFocusDistance;
52    float       focalLength;
53    float       aperture;
54    float       fnumber;
55
56    /* FD information */
57    int32_t    maxFaceCount;
58};
59
60struct ExynosCamera2InfoS5K4E5 : public ExynosCamera2Info
61{
62public:
63    ExynosCamera2InfoS5K4E5();
64	~ExynosCamera2InfoS5K4E5();
65};
66
67struct ExynosCamera2InfoS5K6A3 : public ExynosCamera2Info
68{
69public:
70    ExynosCamera2InfoS5K6A3();
71	~ExynosCamera2InfoS5K6A3();
72};
73
74class ExynosCamera2 {
75public:
76    ExynosCamera2(int cameraId);
77    ~ExynosCamera2();
78
79    ExynosCamera2Info  *m_curCameraInfo;
80
81    int32_t getSensorW();
82    int32_t getSensorH();
83    int32_t getSensorRawW();
84    int32_t getSensorRawH();
85
86    bool isSupportedResolution(int width, int height);
87    bool isSupportedJpegResolution(int width, int height);
88
89    status_t constructStaticInfo(camera_metadata_t **info,
90        int cameraId, bool sizeRequest);
91
92    status_t constructDefaultRequest(int request_template,
93        camera_metadata_t **request, bool sizeRequest);
94    int     m_cameraId;
95};
96}
97