Jiho Chang | e26c154 | 2012-04-02 18:32:24 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef Exynos_OMX_PLUGIN |
| 18 | |
| 19 | #define Exynos_OMX_PLUGIN |
| 20 | |
Dima Zavin | 4c16017 | 2012-04-03 00:52:31 -0700 | [diff] [blame] | 21 | #include <media/hardware/OMXPluginBase.h> |
Jiho Chang | e26c154 | 2012-04-02 18:32:24 -0700 | [diff] [blame] | 22 | |
| 23 | namespace android { |
| 24 | |
| 25 | struct ExynosOMXPlugin : public OMXPluginBase { |
| 26 | ExynosOMXPlugin(); |
| 27 | virtual ~ExynosOMXPlugin(); |
| 28 | |
| 29 | virtual OMX_ERRORTYPE makeComponentInstance( |
| 30 | const char *name, |
| 31 | const OMX_CALLBACKTYPE *callbacks, |
| 32 | OMX_PTR appData, |
| 33 | OMX_COMPONENTTYPE **component); |
| 34 | |
| 35 | virtual OMX_ERRORTYPE destroyComponentInstance( |
| 36 | OMX_COMPONENTTYPE *component); |
| 37 | |
| 38 | virtual OMX_ERRORTYPE enumerateComponents( |
| 39 | OMX_STRING name, |
| 40 | size_t size, |
| 41 | OMX_U32 index); |
| 42 | |
| 43 | virtual OMX_ERRORTYPE getRolesOfComponent( |
| 44 | const char *name, |
| 45 | Vector<String8> *roles); |
| 46 | |
| 47 | private: |
| 48 | void *mLibHandle; |
| 49 | |
| 50 | typedef OMX_ERRORTYPE (*InitFunc)(); |
| 51 | typedef OMX_ERRORTYPE (*DeinitFunc)(); |
| 52 | typedef OMX_ERRORTYPE (*ComponentNameEnumFunc)( |
| 53 | OMX_STRING, OMX_U32, OMX_U32); |
| 54 | |
| 55 | typedef OMX_ERRORTYPE (*GetHandleFunc)( |
| 56 | OMX_HANDLETYPE *, OMX_STRING, OMX_PTR, OMX_CALLBACKTYPE *); |
| 57 | |
| 58 | typedef OMX_ERRORTYPE (*FreeHandleFunc)(OMX_HANDLETYPE *); |
| 59 | |
| 60 | typedef OMX_ERRORTYPE (*GetRolesOfComponentFunc)( |
| 61 | OMX_STRING, OMX_U32 *, OMX_U8 **); |
| 62 | |
| 63 | InitFunc mInit; |
| 64 | DeinitFunc mDeinit; |
| 65 | ComponentNameEnumFunc mComponentNameEnum; |
| 66 | GetHandleFunc mGetHandle; |
| 67 | FreeHandleFunc mFreeHandle; |
| 68 | GetRolesOfComponentFunc mGetRolesOfComponentHandle; |
| 69 | |
| 70 | ExynosOMXPlugin(const ExynosOMXPlugin &); |
| 71 | ExynosOMXPlugin &operator=(const ExynosOMXPlugin &); |
| 72 | }; |
| 73 | |
| 74 | } // namespace android |
| 75 | |
| 76 | #endif // Exynos_OMX_PLUGIN |