• 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_VENC_MANAGER_H
17 #define HOS_CAMERA_VENC_MANAGER_H
18 
19 #include "imanager.h"
20 #include "device_manager_adapter.h"
21 #include "venc_controller.h"
22 
23 namespace OHOS {
24 namespace Camera {
25 class VencManager : public IManager {
26 public:
27     VencManager();
28     explicit VencManager(ManagerId managerId);
29     virtual ~VencManager();
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         venc_->Configure(meta);
36     };
ConfigVenc()37     RetCode ConfigVenc()
38     {
39         return venc_->ConfigVenc();
40     };
StartVenc()41     RetCode StartVenc()
42     {
43         return venc_->StartVenc();
44     };
StopVenc()45     RetCode StopVenc()
46     {
47         return venc_->StopVenc();
48     };
StartGetStream(int32_t s32Cnt)49     RetCode StartGetStream(int32_t s32Cnt)
50     {
51         (void)s32Cnt;
52         return RC_OK;
53     };
StopGetStream()54     RetCode StopGetStream()
55     {
56         return RC_OK;
57     };
SnapProcess(int32_t SnapCnt,bool bSaveJpg,bool bSaveThm)58     RetCode SnapProcess(int32_t SnapCnt, bool bSaveJpg, bool bSaveThm)
59     {
60         (void)SnapCnt;
61         (void)bSaveJpg;
62         (void)bSaveThm;
63         return RC_OK;
64     };
65     RetCode PowerUp(CameraId cameraId);
66     RetCode PowerDown(CameraId cameraId);
SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)67     void SetAbilityMetaDataTag(std::vector<int32_t> abilityMetaDataTag)
68     {
69         venc_->SetAbilityMetaDataTag(abilityMetaDataTag);
70     };
GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)71     RetCode GetAbilityMetaData(std::shared_ptr<CameraMetadata> meta)
72     {
73         return venc_->GetAbilityMetaData(meta);
74     };
GetMetaDataFlag()75     bool GetMetaDataFlag()
76     {
77         return venc_->GetMetaDataFlag();
78     };
SetMetaDataFlag(bool metaDataFlag)79     void SetMetaDataFlag(bool metaDataFlag)
80     {
81         venc_->SetMetaDataFlag(metaDataFlag);
82     };
83 
84 private:
85     std::shared_ptr<VencController> venc_ = nullptr;
86 };
87 } // namespace Camera
88 } // namespace OHOS
89 #endif