/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @file Types.h * * @brief Declares data types * used by the Hardware Driver Interfaces (HDIs) of this module. * * @since 4.0 * @version 1.1 */ package ohos.hdi.camera.v1_1; sequenceable ohos.hdi.camera.v1_0.BufferProducerSequenceable; import ohos.hdi.camera.v1_0.Types; /** * @brief Enumerates types of the extended stream information. */ enum ExtendedStreamInfoType { /** * Extended stream information of quick thumbnail. */ EXTENDED_STREAM_INFO_QUICK_THUMBNAIL = 0, }; /** * @brief Defines the extended information of a normal stream. */ struct ExtendedStreamInfo { /** * Type of the extended stream information. */ enum ExtendedStreamInfoType type; /** * Image width. */ int width; /** * Image height. */ int height; /** * Image format. */ int format; /** * Image color space. */ int dataspace; /** * Producer handle provided by the graphics layer for quick thumbnail. */ BufferProducerSequenceable bufferQueue; }; /** * @brief Defines the stream information, which is used to pass configuration parameters during stream creation. */ struct StreamInfo_V1_1 { /** * The last version of stream info */ struct StreamInfo v1_0; /** * Optional extended stream informations. */ struct ExtendedStreamInfo[] extendedStreamInfos; }; /** * @brief Defines the prelaunch configuration, which is used by {@link Prelaunch}. */ struct PrelaunchConfig { /** * Camera ID, which uniquely identifies a camera device. */ String cameraId; /** * Stream infos used in stream prelaunch mode, which can be ignored currently. */ struct StreamInfo_V1_1[] streamInfos_V1_1; /** * Indicates the prelaunch configuration parameters. */ unsigned char[] setting; }; /** * @brief Enumerates stream operation modes. */ enum OperationMode_V1_1 { /** * Normal mode, which supports both photo and video scenes */ NORMAL = 0, /** * Capture mode, which dedicated to photo scene * IF this mode is implemented, then the NORMAL mode should no longer be implemented */ CAPTURE = 1, /** * Video mode, which dedicated to video secne * IF this mode is implemented, then the NORMAL mode should no longer be implemented */ VIDEO = 2, /** * Portrait mode, which dedicated to portrait photo secne */ PORTRAIT = 3, /** * Night mode, which dedicated to night shooting scene */ NIGHT = 4, /** * Professional mode, which dedicated to professional photo scene */ PROFESSIONAL = 5, /** * Slow motion mode, which dedicated to capturing slow motion */ SLOW_MOTION = 6, };