summaryrefslogtreecommitdiff
path: root/msmcobalt/mm-core/src/common/omx_core_cmp.h
blob: b3c9df5481e717ce43c246d19d1d35bd29999b22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
/*--------------------------------------------------------------------------
Copyright (c) 2009, The Linux Foundation. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of The Linux Foundation nor
      the names of its contributors may be used to endorse or promote
      products derived from this software without specific prior written
      permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------*/
/*============================================================================
                            O p e n M A X   w r a p p e r s
                             O p e n  M A X   C o r e

 OpenMAX Core Macros interface.

============================================================================*/

//////////////////////////////////////////////////////////////////////////////
//                             Include Files
//////////////////////////////////////////////////////////////////////////////
#ifndef OMX_CORE_CMP_H
#define OMX_CORE_CMP_H



#ifdef __cplusplus
extern "C" {
#endif


void * qc_omx_create_component_wrapper(OMX_PTR obj_ptr);


OMX_ERRORTYPE
qc_omx_component_init(OMX_IN OMX_HANDLETYPE hComp, OMX_IN OMX_STRING componentName);


OMX_ERRORTYPE
qc_omx_component_get_version(OMX_IN OMX_HANDLETYPE               hComp,
                             OMX_OUT OMX_STRING          componentName,
                             OMX_OUT OMX_VERSIONTYPE* componentVersion,
                             OMX_OUT OMX_VERSIONTYPE*      specVersion,
                             OMX_OUT OMX_UUIDTYPE*       componentUUID);

OMX_ERRORTYPE
qc_omx_component_send_command(OMX_IN OMX_HANDLETYPE hComp,
                              OMX_IN OMX_COMMANDTYPE  cmd,
                              OMX_IN OMX_U32       param1,
                              OMX_IN OMX_PTR      cmdData);

OMX_ERRORTYPE
qc_omx_component_get_parameter(OMX_IN OMX_HANDLETYPE     hComp,
                               OMX_IN OMX_INDEXTYPE paramIndex,
                               OMX_INOUT OMX_PTR     paramData);

OMX_ERRORTYPE
qc_omx_component_set_parameter(OMX_IN OMX_HANDLETYPE     hComp,
                               OMX_IN OMX_INDEXTYPE paramIndex,
                               OMX_IN OMX_PTR        paramData);

OMX_ERRORTYPE
qc_omx_component_get_config(OMX_IN OMX_HANDLETYPE      hComp,
          OMX_IN OMX_INDEXTYPE configIndex,
          OMX_INOUT OMX_PTR     configData);

OMX_ERRORTYPE
qc_omx_component_set_config(OMX_IN OMX_HANDLETYPE      hComp,
                            OMX_IN OMX_INDEXTYPE configIndex,
                            OMX_IN OMX_PTR        configData);

OMX_ERRORTYPE
qc_omx_component_get_extension_index(OMX_IN OMX_HANDLETYPE      hComp,
                                     OMX_IN OMX_STRING      paramName,
                                     OMX_OUT OMX_INDEXTYPE* indexType);

OMX_ERRORTYPE
qc_omx_component_get_state(OMX_IN OMX_HANDLETYPE  hComp,
                           OMX_OUT OMX_STATETYPE* state);

OMX_ERRORTYPE
qc_omx_component_tunnel_request(OMX_IN OMX_HANDLETYPE                hComp,
                                OMX_IN OMX_U32                        port,
                                OMX_IN OMX_HANDLETYPE        peerComponent,
                                OMX_IN OMX_U32                    peerPort,
                                OMX_INOUT OMX_TUNNELSETUPTYPE* tunnelSetup);

OMX_ERRORTYPE
qc_omx_component_use_buffer(OMX_IN OMX_HANDLETYPE                hComp,
                            OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr,
                            OMX_IN OMX_U32                        port,
                            OMX_IN OMX_PTR                     appData,
                            OMX_IN OMX_U32                       bytes,
                            OMX_IN OMX_U8*                      buffer);


// qc_omx_component_allocate_buffer  -- API Call
OMX_ERRORTYPE
qc_omx_component_allocate_buffer(OMX_IN OMX_HANDLETYPE                hComp,
                                 OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr,
                                 OMX_IN OMX_U32                        port,
                                 OMX_IN OMX_PTR                     appData,
                                 OMX_IN OMX_U32                       bytes);

OMX_ERRORTYPE
qc_omx_component_free_buffer(OMX_IN OMX_HANDLETYPE         hComp,
                             OMX_IN OMX_U32                 port,
                             OMX_IN OMX_BUFFERHEADERTYPE* buffer);

OMX_ERRORTYPE
qc_omx_component_empty_this_buffer(OMX_IN OMX_HANDLETYPE         hComp,
                                   OMX_IN OMX_BUFFERHEADERTYPE* buffer);

OMX_ERRORTYPE
qc_omx_component_fill_this_buffer(OMX_IN OMX_HANDLETYPE         hComp,
                                  OMX_IN OMX_BUFFERHEADERTYPE* buffer);

OMX_ERRORTYPE
qc_omx_component_set_callbacks(OMX_IN OMX_HANDLETYPE        hComp,
                               OMX_IN OMX_CALLBACKTYPE* callbacks,
                               OMX_IN OMX_PTR             appData);

OMX_ERRORTYPE
qc_omx_component_deinit(OMX_IN OMX_HANDLETYPE hComp);

OMX_ERRORTYPE
qc_omx_component_use_EGL_image(OMX_IN OMX_HANDLETYPE                hComp,
                               OMX_INOUT OMX_BUFFERHEADERTYPE** bufferHdr,
                               OMX_IN OMX_U32                        port,
                               OMX_IN OMX_PTR                     appData,
                               OMX_IN void*                      eglImage);

OMX_ERRORTYPE
qc_omx_component_role_enum(OMX_IN OMX_HANDLETYPE hComp,
                           OMX_OUT OMX_U8*        role,
                           OMX_IN OMX_U32        index);

#ifdef __cplusplus
}
#endif

#endif