1 /* 2 * Copyright (c) 2021-2022 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 _ISYS_OBJECT_H 17 #define _ISYS_OBJECT_H 18 19 #include "ibuffer.h" 20 #include "mpi_adapter.h" 21 #include "camera_metadata_info.h" 22 23 namespace OHOS { 24 namespace Camera { 25 class ISysObject { 26 public: 27 static std::shared_ptr<ISysObject> CreateSysObject(); ~ISysObject()28 virtual ~ISysObject() {}; 29 virtual void StartSys() = 0; 30 virtual void UnInitSys() = 0; 31 virtual void SetCallback(BufCallback cb) = 0; 32 virtual void SetDevStatusCallback(DeviceStatusCb cb) = 0; 33 virtual void VpssBindVenc(int32_t vpssChn, int32_t vencChn) = 0; 34 virtual void VpssUnBindVenc(int32_t vpssChn, int32_t vencChn) = 0; 35 virtual void ViBindVpss(int32_t viPipe, int32_t viChn, int32_t vpssGrp, int32_t vpssChn = 0) = 0; 36 virtual void VpssBindVo(int32_t vpssGrp, int32_t vpssChn, int32_t voLayer, int32_t voChn) = 0; 37 virtual void ViUnBindVpss(int32_t viPipe, int32_t viChn, int32_t vpssGrp, int32_t vpssChn = 0) = 0; 38 virtual void VpssUnBindVo(int32_t vpssGrp, int32_t vpssChn, int32_t voLayer, int32_t voChn) = 0; 39 virtual RetCode StopSys() = 0; 40 virtual RetCode InitSys() = 0; 41 virtual RetCode Flush(int32_t streamId) = 0; 42 virtual RetCode Prepare() = 0; 43 virtual RetCode RequestBuffer(std::shared_ptr<FrameSpec> &frameSpec) = 0; 44 virtual RetCode PreConfig(const std::shared_ptr<Camera::CameraMetadata>& meta, 45 const std::vector<DeviceStreamSetting>& settings) = 0; 46 virtual RetCode StartRecvFrame(int32_t streamId) = 0; 47 virtual RetCode StopRecvFrame(int32_t streamId) = 0; 48 }; 49 } // namespace Camera 50 } // namespace OHOS 51 #endif 52