• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_VPSS_MANAGER_H
17 #define HOS_CAMERA_VPSS_MANAGER_H
18 
19 #include "imanager.h"
20 #include "device_manager_adapter.h"
21 #include "vpss_controller.h"
22 
23 namespace OHOS {
24 namespace Camera {
25 class VpssManager : public IManager {
26 public:
27     VpssManager();
28     explicit VpssManager(ManagerId managerId);
29     virtual ~VpssManager();
30     RetCode CreateController(ControllerId controllerId, std::string hardwareName);
31     std::shared_ptr<IController> GetController(ControllerId controllerId);
Configure(std::shared_ptr<CameraMetadata> meta)32     void Configure(std::shared_ptr<CameraMetadata> meta)
33     {
34         vpss_->Configure(meta);
35     };
ConfigVpss()36     RetCode ConfigVpss()
37     {
38         return vpss_->ConfigVpss();
39     };
StartVpss()40     RetCode StartVpss()
41     {
42         return vpss_->ConfigVpss();
43     };
StopVpss()44     RetCode StopVpss()
45     {
46         return vpss_->ConfigVpss();
47     };
48     RetCode PowerUp(CameraId cameraId);
49     RetCode PowerDown(CameraId cameraId);
SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)50     void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)
51     {
52         vpss_->SetAbilityMetaDataTag(abilityMetaDataTag);
53     };
GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)54     RetCode GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)
55     {
56         return vpss_->GetAbilityMetaData(meta);
57     };
GetMetaDataFlag()58     bool GetMetaDataFlag()
59     {
60         return vpss_->GetMetaDataFlag();
61     };
SetMetaDataFlag(bool metaDataFlag)62     void SetMetaDataFlag(bool metaDataFlag)
63     {
64         vpss_->SetMetaDataFlag(metaDataFlag);
65     };
66 
67 private:
68     std::shared_ptr<VpssController> vpss_ = nullptr;
69 };
70 } // namespace Camera
71 } // namespace OHOS
72 #endif