1 /* 2 * Copyright (c) 2022 Shenzhen Kaihong DID 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 I_COMPONENT_MGR_H 17 #define I_COMPONENT_MGR_H 18 #include <OMX_Component.h> 19 #include <iostream> 20 #include <vector> 21 22 namespace OHOS { 23 namespace Codec { 24 namespace Omx { 25 class IComponentMgr { 26 public: IComponentMgr()27 IComponentMgr() 28 {} ~IComponentMgr()29 virtual ~IComponentMgr() 30 {} 31 IComponentMgr(const IComponentMgr &) = delete; 32 IComponentMgr &operator=(const IComponentMgr &) = delete; 33 34 virtual int32_t CreateComponentInstance(const char *componentName, const OMX_CALLBACKTYPE *callbacks, 35 void *appData, OMX_COMPONENTTYPE **component) = 0; 36 37 virtual int32_t DeleteComponentInstance(OMX_COMPONENTTYPE *component) = 0; 38 39 virtual int32_t GetRolesForComponent(const char *componentName, std::vector<std::string> *vRoles) = 0; 40 41 virtual int32_t GetCoreOfComponent(CodecOMXCore* &core, const std::string compName) = 0; 42 }; 43 } // namespace Omx 44 } // namespace Codec 45 } // namespace OHOS 46 47 #endif