2 * Copyright (C) 2015 The CyanogenMod 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 FFMPEG_OMX_PLUGIN_H_
19 #define FFMPEG_OMX_PLUGIN_H_
21 #include <media/stagefright/foundation/ABase.h>
22 #include <OMXPluginBase.h>
24 #include <OMX_AudioExt.h>
25 #include <OMX_IndexExt.h>
28 #include "libavformat/avformat.h"
29 #include "libavcodec/avcodec.h"
31 #include <OMX_FFMPEG_Extn.h>
35 struct FFmpegOMXPlugin : public OMXPluginBase {
38 virtual OMX_ERRORTYPE makeComponentInstance(
40 const OMX_CALLBACKTYPE *callbacks,
42 OMX_COMPONENTTYPE **component);
44 virtual OMX_ERRORTYPE destroyComponentInstance(
45 OMX_COMPONENTTYPE *component);
47 virtual OMX_ERRORTYPE enumerateComponents(
52 virtual OMX_ERRORTYPE getRolesOfComponent(
54 Vector<String8> *roles);
58 typedef OMX_ERRORTYPE (*ComponentNameEnumFunc)(
59 OMX_STRING, OMX_U32, OMX_U32);
61 typedef OMX_ERRORTYPE (*GetHandleFunc)(
62 OMX_HANDLETYPE *, OMX_STRING, OMX_PTR, OMX_CALLBACKTYPE *);
64 typedef OMX_ERRORTYPE (*FreeHandleFunc)(OMX_HANDLETYPE *);
66 typedef OMX_ERRORTYPE (*GetRolesOfComponentFunc)(
67 OMX_STRING, OMX_U32 *, OMX_U8 **);
69 DISALLOW_EVIL_CONSTRUCTORS(FFmpegOMXPlugin);
72 } // namespace android
74 #endif // SOFT_OMX_PLUGIN_H_