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_CONTROLLER_H 17 #define HOS_CAMERA_VO_CONTROLLER_H 18 19 #include "icontroller.h" 20 #include "ivo_object.h" 21 #include "device_manager_adapter.h" 22 #include "mpi_adapter.h" 23 24 namespace OHOS { 25 namespace Camera { 26 class VoController : public IController { 27 public: 28 VoController(); 29 explicit VoController(std::string hardwareName); 30 virtual ~VoController(); 31 RetCode Init(); 32 RetCode PowerUp(CameraId cameraId); 33 RetCode PowerDown(CameraId cameraId); 34 RetCode StopVo(); 35 RetCode StartVo(); 36 RetCode ConfigVo(); Configure(std::shared_ptr<CameraMetadata> metadata)37 RetCode Configure(std::shared_ptr<CameraMetadata> metadata) 38 { 39 (void)metadata; 40 return RC_OK; 41 } GetStartVoState()42 bool GetStartVoState() 43 { 44 return startVoState_; 45 } SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)46 void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag) 47 { 48 (void)abilityMetaDataTag; 49 return; 50 } GetAbilityMetaData(std::shared_ptr<CameraMetadata> cameraMeta)51 RetCode GetAbilityMetaData(std::shared_ptr<CameraMetadata> cameraMeta) 52 { 53 (void)cameraMeta; 54 return RC_OK; 55 } GetMetaDataFlag()56 bool GetMetaDataFlag() 57 { 58 return false; 59 } SetMetaDataFlag(bool metaDataFlag)60 void SetMetaDataFlag(bool metaDataFlag) 61 { 62 (void)metaDataFlag; 63 } 64 65 private: 66 std::mutex startVolock_; 67 bool startVoState_ = false; 68 std::shared_ptr<IVoObject> voObject_ = nullptr; 69 }; 70 } // namespace Camera 71 } // namespace OHOS 72 #endif