• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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
16package OHOS.CameraStandard;
17
18enum RestoreParamTypeOhos {
19    NO_NEED_RESTORE_PARAM_OHOS = 0,
20    PERSISTENT_DEFAULT_PARAM_OHOS = 1,
21    TRANSIENT_ACTIVE_PARAM_OHOS = 2,
22};
23
24struct EffectParam {
25    int skinSmoothLevel;
26    int faceSlender;
27    int skinTone;
28};
29
30enum PolicyType{
31    EDM = 0,
32    PRIVACY = 1,
33};
34
35enum CaptureSessionState {
36    SESSION_INIT = 0,
37    SESSION_CONFIG_INPROGRESS = 1,
38    SESSION_CONFIG_COMMITTED = 2,
39    SESSION_RELEASED = 3,
40    SESSION_STARTED = 4,
41    SESSION_STATE_MAX = 5
42};
43
44enum MetadataObjectType {
45    INVALID = -1,
46    FACE = 0,
47    HUMAN_BODY = 1,
48    CAT_FACE = 2,
49    CAT_BODY = 3,
50    DOG_FACE = 4,
51    DOG_BODY = 5,
52    SALIENT_DETECTION = 6,
53    BAR_CODE_DETECTION = 7,
54    BASE_FACE_DETECTION = 8,
55    BASE_TRACKING_REGION = 9,
56    MAX_VALUE = BASE_TRACKING_REGION
57};
58
59enum SketchStatus {
60    STOPED = 0,
61    STARTED = 1,
62    STOPPING = 2,
63    STARTING = 3
64};
65
66struct SketchStatusData{
67    SketchStatus status;
68    float sketchRatio;
69    float offsetx;
70    float offsety;
71};
72
73struct CaptureEndedInfoExt {
74    int streamId;
75    int frameCount;
76    boolean isDeferredVideoEnhancementAvailable;
77    String videoId;
78};
79
80enum StreamType {
81    CAPTURE = 1,
82    REPEAT,
83    METADATA,
84    DEPTH,
85};
86
87enum TorchStatus {
88    TORCH_STATUS_OFF = 0,
89    TORCH_STATUS_ON,
90    TORCH_STATUS_UNAVAILABLE
91};
92
93enum CallbackInvoker {
94    CAMERA_HOST = 1,
95    APPLICATION,
96};
97
98enum FoldStatus {
99    UNKNOWN_FOLD = 0,
100    EXPAND,
101    FOLDED,
102    HALF_FOLD
103};
104
105enum PressureStatus {
106    SYSTEM_PRESSURE_NORMAL = 0,
107    SYSTEM_PRESSURE_MILD,
108    SYSTEM_PRESSURE_SEVERE,
109    SYSTEM_PRESSURE_CRITICAL,
110    SYSTEM_PRESSURE_SHUTDOWN
111};
112
113enum ControlCenterEffectType {
114    BEAUTY = 0,
115    PORTRAIT
116};
117
118struct ControlCenterStatusInfo {
119    ControlCenterEffectType effectType;
120    boolean isActive;
121};
122
123enum OutputType {
124    PREVIEW = 0,
125    PHOTO = 1,
126    VIDEO = 2,
127    MOVING_PHOTO = 3,
128};
129
130struct OutputInfo {
131    OutputType type;
132    int minfps;
133    int maxfps;
134    int width;
135    int height;
136};
137
138struct ZoomInfo {
139    float zoomValue;
140    int equivalentFocus;
141    boolean focusStatus;
142    int focusMode;
143    int videoStabilizationMode;
144};
145
146struct CaptureSessionInfo {
147    int sessionId;
148    int callerTokenId;
149    String cameraId;
150    int position;
151    int sessionMode;
152    OutputInfo[] outputInfos;
153    int colorSpace;
154    ZoomInfo zoomInfo;
155    boolean sessionStatus;
156};