1 /* 2 * Copyright (c) 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 16 #ifndef HOS_CAMERA_VO_MANAGER_H 17 #define HOS_CAMERA_VO_MANAGER_H 18 19 #include "imanager.h" 20 #include "device_manager_adapter.h" 21 #include "vo_controller.h" 22 23 namespace OHOS { 24 namespace Camera { 25 class VoManager : public IManager { 26 public: 27 VoManager(); 28 explicit VoManager(ManagerId managerId); 29 virtual ~VoManager(); 30 RetCode CreateController(ControllerId controllerId, std::string hardwareName); 31 std::shared_ptr<IController> GetController(ControllerId controllerId); 32 Configure(std::shared_ptr<CameraMetadata> meta)33 void Configure(std::shared_ptr<CameraMetadata> meta) 34 { 35 vo_->Configure(meta); 36 }; ConfigVo()37 RetCode ConfigVo() 38 { 39 return vo_->ConfigVo(); 40 }; StartVo()41 RetCode StartVo() 42 { 43 return vo_->StartVo(); 44 }; StopVo()45 RetCode StopVo() 46 { 47 return vo_->StopVo(); 48 }; 49 RetCode PowerUp(CameraId cameraId); 50 RetCode PowerDown(CameraId cameraId); SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)51 void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag) 52 { 53 vo_->SetAbilityMetaDataTag(abilityMetaDataTag); 54 }; GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)55 RetCode GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta) 56 { 57 return vo_->GetAbilityMetaData(meta); 58 }; GetMetaDataFlag()59 bool GetMetaDataFlag() 60 { 61 return vo_->GetMetaDataFlag(); 62 }; SetMetaDataFlag(bool metaDataFlag)63 void SetMetaDataFlag(bool metaDataFlag) 64 { 65 vo_->SetMetaDataFlag(metaDataFlag); 66 }; 67 68 private: 69 std::shared_ptr<VoController> vo_ = nullptr; 70 }; 71 } // namespace Camera 72 } // namespace OHOS 73 #endif