2 * Copyright (C) 2009 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef QCOM_OMX_PLUGIN_H_
19 #define QCOM_OMX_PLUGIN_H_
21 #include <media/stagefright/OMXPluginBase.h>
25 struct QComOMXPlugin : public OMXPluginBase {
27 virtual ~QComOMXPlugin();
29 virtual OMX_ERRORTYPE makeComponentInstance(
31 const OMX_CALLBACKTYPE *callbacks,
33 OMX_COMPONENTTYPE **component);
35 virtual OMX_ERRORTYPE destroyComponentInstance(
36 OMX_COMPONENTTYPE *component);
38 virtual OMX_ERRORTYPE enumerateComponents(
43 virtual OMX_ERRORTYPE getRolesOfComponent(
45 Vector<String8> *roles);
50 typedef OMX_ERRORTYPE (*InitFunc)();
51 typedef OMX_ERRORTYPE (*DeinitFunc)();
52 typedef OMX_ERRORTYPE (*ComponentNameEnumFunc)(
53 OMX_STRING, OMX_U32, OMX_U32);
55 typedef OMX_ERRORTYPE (*GetHandleFunc)(
56 OMX_HANDLETYPE *, OMX_STRING, OMX_PTR, OMX_CALLBACKTYPE *);
58 typedef OMX_ERRORTYPE (*FreeHandleFunc)(OMX_HANDLETYPE *);
60 typedef OMX_ERRORTYPE (*GetRolesOfComponentFunc)(
61 OMX_STRING, OMX_U32 *, OMX_U8 **);
65 ComponentNameEnumFunc mComponentNameEnum;
66 GetHandleFunc mGetHandle;
67 FreeHandleFunc mFreeHandle;
68 GetRolesOfComponentFunc mGetRolesOfComponentHandle;
70 QComOMXPlugin(const QComOMXPlugin &);
71 QComOMXPlugin &operator=(const QComOMXPlugin &);
74 } // namespace android
76 #endif // QCOM_OMX_PLUGIN_H_