• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 #ifndef OHOS_META_DATA_H
16 #define OHOS_META_DATA_H
17 
18 #include "stdint.h"
19 
20 #ifdef __cplusplus
21 #if __cplusplus
22 extern "C" {
23 #endif
24 #endif /* End of #ifdef __cplusplus */
25 
26 typedef struct {
27     int32_t x;
28     int32_t y;
29     int32_t w;
30     int32_t h;
31 } CameraRect;
32 
33 typedef struct {
34     uint32_t width;
35     uint32_t height;
36 } CameraPicSize;
37 
38 typedef enum {
39     /* Frame rate */
40     CAM_FRAME_FPS = 0,
41     /* Auto exposure mode */
42     CAM_AE_MODE,
43     /* Auto exposure time */
44     CAM_AE_EXPO_TIME,
45     /* Auto exposure compensation value */
46     CAM_AE_COMPENSATION,
47     /* Auto exposure lock */
48     CAM_AE_LOCK,
49     /* Auto exposure region */
50     CAM_AE_REGIONS,
51     /* White balance mode */
52     CAM_AWB_MODE,
53     /* White balance lock */
54     CAM_AWB_LOCK,
55     /* White balance region */
56     CAM_AWB_REGION,
57     /* Video stabilization feature */
58     CAM_VIDEO_STABILIZATION_NABLE,
59     /* Image luminance */
60     CAM_IMAGE_LUMA,
61     /* Image contrast */
62     CAM_IMAGE_CONTRAST,
63     /* Image hue */
64     CAM_IMAGE_HUE,
65     /* Image saturation */
66     CAM_IMAGE_SATURATION,
67     /* Hot pixel correction */
68     CAM_HOT_PIXEL_ENABLE,
69     /* Level of hot pixel correction */
70     CAM_HOT_PIXEL_LEVEL,
71     /* Image denoising mode */
72     CAM_IMAGE_DENOISE_MODE,
73     /* Image denoising level */
74     CAM_IMAGE_DENOISE_LEVEL,
75     /* Image mirror flip */
76     CAM_IMAGE_INVERT_MODE,
77     /* Image CROP_RECT */
78     CAM_IMAGE_CROP_RECT,
79     /* Only valid when frameConfigType is callback*/
80     CAM_IMAGE_FORMAT,
81     /* Auto foucue mode */
82     CAM_AF_MODE,
83     /* Image denoising level */
84     PARAM_KEY_SIZE,
85     PARAM_KEY_IMAGE_ENCODE_QFACTOR
86 } CameraFuncKey;
87 
88 /**
89  @brief Enumerates parameters for image rotation and mirroring.
90  */
91 typedef enum {
92     CAM_CENTER_MIRROR = 0,     /**< Central mirroring */
93     CAM_HORIZONTAL_MIRROR = 1, /**< Horizontal mirroring */
94     CAM_VETICALLY_MIRROR = 2,  /**< Vertical mirroring */
95     CAM_ROTATION_90 = 3,       /**< 90-degree rotation */
96     CAM_ROTATION_180 = 4,      /**< 180-degree rotation  */
97 } CameraInvertMode;
98 
99 #define ENCODER_TYPE 0
100 typedef enum {
101     CAM_FORMAT_YVU420 = 0,
102     CAM_FORMAT_JPEG,
103     CAM_FORMAT_H264,
104     CAM_FORMAT_H265,
105     CAM_FORMAT_BUTT
106 } CameraEncodeFormat;
107 
108 typedef enum {
109     CAM_IMAGE_YUV420,
110     CAM_IMAGE_RAW12
111 } CameraImageFormat;
112 
113 typedef enum {
114     AF_MODE_CONTINUOUS,
115     AF_MODE_CLOSE
116 } AfMode;
117 
118 typedef enum {
119     AE_MODE_OPEN,
120     AE_MODE_CLOSE
121 } AeMode;
122 
123 #ifdef __cplusplus
124 #if __cplusplus
125 }
126 #endif
127 #endif /* End of #ifdef __cplusplus */
128 #endif // OHOS_META_DATA_H