1 /* 2 * Copyright (c) 2021-2023 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 16 #ifndef CAMERA_FRAMEWORK_PRELAUNCH_CONFIG_H 17 #define CAMERA_FRAMEWORK_PRELAUNCH_CONFIG_H 18 19 #include "input/camera_device.h" 20 21 namespace OHOS { 22 namespace CameraStandard { 23 enum RestoreParamType { 24 NO_NEED_RESTORE_PARAM = 0, 25 PERSISTENT_DEFAULT_PARAM = 1, 26 TRANSIENT_ACTIVE_PARAM = 2, 27 }; 28 29 struct SettingParam { 30 int skinSmoothLevel; 31 int faceSlender; 32 int skinTone; 33 }; 34 35 class PrelaunchConfig : public RefBase { 36 public: 37 PrelaunchConfig(sptr<CameraDevice> cameraDevice); 38 39 PrelaunchConfig() = default; 40 41 virtual ~PrelaunchConfig() = default; 42 43 /** 44 * @brief Get CameraDevice of the PrelaunchConfig. 45 * 46 * @return cameraDevice. 47 */ 48 sptr<CameraDevice> GetCameraDevice(); 49 50 RestoreParamType GetRestoreParamType(); 51 52 int GetActiveTime(); 53 54 SettingParam GetSettingParam(); 55 56 sptr<CameraDevice> cameraDevice_ = nullptr; 57 58 SettingParam settingParam = {0, 0}; 59 60 int activeTime = 0; 61 62 RestoreParamType restoreParamType = RestoreParamType::NO_NEED_RESTORE_PARAM; 63 }; 64 } 65 } 66 #endif // CAMERA_FRAMEWORK_PRELAUNCH_CONFIG_H 67