1/*--------------------------------------------------------------------------
2Copyright (c) 2009, The Linux Foundation. All rights reserved.
3
4Redistribution and use in source and binary forms, with or without
5modification, are permitted provided that the following conditions are met:
6    * Redistributions of source code must retain the above copyright
7      notice, this list of conditions and the following disclaimer.
8    * Redistributions in binary form must reproduce the above copyright
9      notice, this list of conditions and the following disclaimer in the
10      documentation and/or other materials provided with the distribution.
11    * Neither the name of The Linux Foundation nor
12      the names of its contributors may be used to endorse or promote
13      products derived from this software without specific prior written
14      permission.
15
16THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
20CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
22PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
23OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
25OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27--------------------------------------------------------------------------*/
28/*============================================================================
29                            O p e n M A X   w r a p p e r s
30                             O p e n  M A X   C o r e
31
32 OpenMAX Core Macros interface.
33
34============================================================================*/
35
36//////////////////////////////////////////////////////////////////////////////
37//                             Include Files
38//////////////////////////////////////////////////////////////////////////////
39#ifndef OMX_CORE_CMP_H
40#define OMX_CORE_CMP_H
41
42
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48
49void * qc_omx_create_component_wrapper(OMX_PTR obj_ptr);
50
51
52OMX_ERRORTYPE
53qc_omx_component_init(OMX_IN OMX_HANDLETYPE hComp, OMX_IN OMX_STRING componentName);
54
55
56OMX_ERRORTYPE
57qc_omx_component_get_version(OMX_IN OMX_HANDLETYPE               hComp,
58                             OMX_OUT OMX_STRING          componentName,
59                             OMX_OUT OMX_VERSIONTYPE* componentVersion,
60                             OMX_OUT OMX_VERSIONTYPE*      specVersion,
61                             OMX_OUT OMX_UUIDTYPE*       componentUUID);
62
63OMX_ERRORTYPE
64qc_omx_component_send_command(OMX_IN OMX_HANDLETYPE hComp,
65                              OMX_IN OMX_COMMANDTYPE  cmd,
66                              OMX_IN OMX_U32       param1,
67                              OMX_IN OMX_PTR      cmdData);
68
69OMX_ERRORTYPE
70qc_omx_component_get_parameter(OMX_IN OMX_HANDLETYPE     hComp,
71                               OMX_IN OMX_INDEXTYPE paramIndex,
72                               OMX_INOUT OMX_PTR     paramData);
73
74OMX_ERRORTYPE
75qc_omx_component_set_parameter(OMX_IN OMX_HANDLETYPE     hComp,
76                               OMX_IN OMX_INDEXTYPE paramIndex,
77                               OMX_IN OMX_PTR        paramData);
78
79OMX_ERRORTYPE
80qc_omx_component_get_config(OMX_IN OMX_HANDLETYPE      hComp,
81          OMX_IN OMX_INDEXTYPE configIndex,
82          OMX_INOUT OMX_PTR     configData);
83
84OMX_ERRORTYPE
85qc_omx_component_set_config(OMX_IN OMX_HANDLETYPE      hComp,
86                            OMX_IN OMX_INDEXTYPE configIndex,
87                            OMX_IN OMX_PTR        configData);
88
89OMX_ERRORTYPE
90qc_omx_component_get_extension_index(OMX_IN OMX_HANDLETYPE      hComp,
91                                     OMX_IN OMX_STRING      paramName,
92                                     OMX_OUT OMX_INDEXTYPE* indexType);
93
94OMX_ERRORTYPE
95qc_omx_component_get_state(OMX_IN OMX_HANDLETYPE  hComp,
96                           OMX_OUT OMX_STATETYPE* state);
97
98OMX_ERRORTYPE
99qc_omx_component_tunnel_request(OMX_IN OMX_HANDLETYPE                hComp,
100                                OMX_IN OMX_U32                        port,
101                                OMX_IN OMX_HANDLETYPE        peerComponent,
102                                OMX_IN OMX_U32                    peerPort,
103                                OMX_INOUT OMX_TUNNELSETUPTYPE* tunnelSetup);
104
105OMX_ERRORTYPE
106qc_omx_component_use_buffer(OMX_IN OMX_HANDLETYPE                hComp,
107                            OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr,
108                            OMX_IN OMX_U32                        port,
109                            OMX_IN OMX_PTR                     appData,
110                            OMX_IN OMX_U32                       bytes,
111                            OMX_IN OMX_U8*                      buffer);
112
113
114// qc_omx_component_allocate_buffer  -- API Call
115OMX_ERRORTYPE
116qc_omx_component_allocate_buffer(OMX_IN OMX_HANDLETYPE                hComp,
117                                 OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr,
118                                 OMX_IN OMX_U32                        port,
119                                 OMX_IN OMX_PTR                     appData,
120                                 OMX_IN OMX_U32                       bytes);
121
122OMX_ERRORTYPE
123qc_omx_component_free_buffer(OMX_IN OMX_HANDLETYPE         hComp,
124                             OMX_IN OMX_U32                 port,
125                             OMX_IN OMX_BUFFERHEADERTYPE* buffer);
126
127OMX_ERRORTYPE
128qc_omx_component_empty_this_buffer(OMX_IN OMX_HANDLETYPE         hComp,
129                                   OMX_IN OMX_BUFFERHEADERTYPE* buffer);
130
131OMX_ERRORTYPE
132qc_omx_component_fill_this_buffer(OMX_IN OMX_HANDLETYPE         hComp,
133                                  OMX_IN OMX_BUFFERHEADERTYPE* buffer);
134
135OMX_ERRORTYPE
136qc_omx_component_set_callbacks(OMX_IN OMX_HANDLETYPE        hComp,
137                               OMX_IN OMX_CALLBACKTYPE* callbacks,
138                               OMX_IN OMX_PTR             appData);
139
140OMX_ERRORTYPE
141qc_omx_component_deinit(OMX_IN OMX_HANDLETYPE hComp);
142
143OMX_ERRORTYPE
144qc_omx_component_use_EGL_image(OMX_IN OMX_HANDLETYPE                hComp,
145                               OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr,
146                               OMX_IN OMX_U32                        port,
147                               OMX_IN OMX_PTR                     appData,
148                               OMX_IN void*                      eglImage);
149
150OMX_ERRORTYPE
151qc_omx_component_role_enum(OMX_IN OMX_HANDLETYPE hComp,
152                           OMX_OUT OMX_U8*        role,
153                           OMX_IN OMX_U32        index);
154
155#ifdef __cplusplus
156}
157#endif
158
159#endif
160
161