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_VENC_CONTROLLER_H 17 #define HOS_CAMERA_VENC_CONTROLLER_H 18 19 #include "icontroller.h" 20 #include "ivenc_object.h" 21 #include "device_manager_adapter.h" 22 #include "mpi_adapter.h" 23 24 namespace OHOS { 25 namespace Camera { 26 class VencController : public IController { 27 public: 28 VencController(); 29 explicit VencController(std::string hardwareName); 30 virtual ~VencController(); 31 RetCode Init(); GetStartVencState()32 bool GetStartVencState() 33 { 34 return startVencState_; 35 } StartGetStream()36 RetCode StartGetStream() 37 { 38 return RC_OK; 39 } StopGetStream()40 RetCode StopGetStream() 41 { 42 return RC_OK; 43 } SnapProcess()44 RetCode SnapProcess() 45 { 46 return RC_OK; 47 } 48 RetCode PowerUp(CameraId cameraId); 49 RetCode PowerDown(CameraId cameraId); 50 RetCode StopVenc(); 51 RetCode StartVenc(); 52 RetCode ConfigVenc(); Configure(std::shared_ptr<CameraMetadata> camMeta)53 RetCode Configure(std::shared_ptr<CameraMetadata> camMeta) 54 { 55 (void)camMeta; 56 return RC_OK; 57 } SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)58 void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag) 59 { 60 (void)abilityMetaDataTag; 61 } GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)62 RetCode GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta) 63 { 64 (void)meta; 65 return RC_OK; 66 } GetMetaDataFlag()67 bool GetMetaDataFlag() 68 { 69 return false; 70 } SetMetaDataFlag(bool dataFlag)71 void SetMetaDataFlag(bool dataFlag) 72 { 73 (void)dataFlag; 74 } 75 private: 76 std::mutex startVenclock_; 77 bool startVencState_ = false; 78 std::shared_ptr<IVencObject> vencObject_ = nullptr; 79 }; 80 } // namespace Camera 81 } // namespace OHOS 82 #endif 83