• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-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 #ifndef I_OMX_COMPONENT_MANAGER_H
16 #define I_OMX_COMPONENT_MANAGER_H
17 
18 #include <iostream>
19 #include <vector>
20 #include "OMX_Component.h"
21 
22 namespace OHOS {
23 namespace Media {
24     namespace OMX {
25         class IOMXComponentMgr {
26         public:
IOMXComponentMgr()27             IOMXComponentMgr() {}
~IOMXComponentMgr()28             virtual ~IOMXComponentMgr() {}
29             IOMXComponentMgr(const IOMXComponentMgr&) = delete;
30             IOMXComponentMgr& operator=(const IOMXComponentMgr&) = delete;
31 
32             virtual OMX_ERRORTYPE
33             CreateComponentInstance(const OMX_STRING        componentName,
34                                     const OMX_CALLBACKTYPE* callbacks,
35                                     OMX_PTR                 appData,
36                                     OMX_COMPONENTTYPE**     component) = 0;
37 
38             virtual OMX_ERRORTYPE
39             DeleteComponentInstance(OMX_COMPONENTTYPE* component) = 0;
40 
41             virtual OMX_ERRORTYPE
42             EnumerateComponentsByIndex(OMX_U32    index,
43                                        OMX_STRING componentName,
44                                        size_t     componentNameSize) = 0;
45 
46             virtual OMX_ERRORTYPE
47             GetRolesForComponent(const OMX_STRING          componentName,
48                                  std::vector<std::string>* vRoles) = 0;
49         };
50     }  // namespace OMX
51 }  // namespace Media
52 }  // namespace OHOS
53 
54 #endif