1826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/*
2826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Copyright (c) 2008 The Khronos Group Inc.
3e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin *
4826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Permission is hereby granted, free of charge, to any person obtaining
5826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * a copy of this software and associated documentation files (the
6826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * "Software"), to deal in the Software without restriction, including
7826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * without limitation the rights to use, copy, modify, merge, publish,
8826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * distribute, sublicense, and/or sell copies of the Software, and to
9826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * permit persons to whom the Software is furnished to do so, subject
10826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * to the following conditions:
11826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * The above copyright notice and this permission notice shall be included
12826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * in all copies or substantial portions of the Software.
13e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin *
14826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *
22826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
23826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
24826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_Types.h - OpenMax IL version 1.1.2
25826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  The OMX_Types header file contains the primitive type definitions used by
26826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  the core, the application and the component.  This file may need to be
27e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin *  modified to be used on systems that do not have "char" set to 8 bits,
28826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  "short" set to 16 bits and "long" set to 32 bits.
29826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
30826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
31826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_Types_h
32826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_Types_h
33826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
34826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifdef __cplusplus
35826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevextern "C" {
36826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif /* __cplusplus */
37826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
38826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_API and OMX_APIENTRY are platform specific definitions used
39826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  to declare OMX function prototypes.  They are modified to meet the
40826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  requirements for a particular platform */
41826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifdef __SYMBIAN32__
42826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#   ifdef __OMX_EXPORTS
43826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#       define OMX_API __declspec(dllexport)
44826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#   else
45826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#       ifdef _WIN32
46826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#           define OMX_API __declspec(dllexport)
47826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#       else
48826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#           define OMX_API __declspec(dllimport)
49826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#       endif
50826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#   endif
51826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#else
52826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#   ifdef _WIN32
53826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#      ifdef __OMX_EXPORTS
54826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#          define OMX_API __declspec(dllexport)
55826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#      else
56826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#          define OMX_API __declspec(dllimport)
57826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#      endif
58826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#   else
59826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#      ifdef __OMX_EXPORTS
60826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#          define OMX_API
61826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#      else
62826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#          define OMX_API extern
63826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#      endif
64826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#   endif
65826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
66826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
67826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_APIENTRY
68826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_APIENTRY
69826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
70826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
71826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_IN is used to identify inputs to an OMX function.  This designation
72826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    will also be used in the case of a pointer that points to a parameter
73826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    that is used as an output. */
74826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_IN
75826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_IN
76826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
77826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
78826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_OUT is used to identify outputs from an OMX function.  This
79826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    designation will also be used in the case of a pointer that points
80826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    to a parameter that is used as an input. */
81826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_OUT
82826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_OUT
83826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
84826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
85826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
86826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_INOUT is used to identify parameters that may be either inputs or
87826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    outputs from an OMX function at the same time.  This designation will
88826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    also be used in the case of a pointer that  points to a parameter that
89826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    is used both as an input and an output. */
90826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_INOUT
91826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_INOUT
92826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
93826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
94826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_ALL is used to as a wildcard to select all entities of the same type
95826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  when specifying the index, or referring to a object by an index.  (i.e.
96826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  use OMX_ALL to indicate all N channels). When used as a port index
97826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  for a config or parameter this OMX_ALL denotes that the config or
98826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  parameter applies to the entire component not just one port. */
99826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_ALL 0xFFFFFFFF
100826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
101826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** In the following we define groups that help building doxygen documentation */
102826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
103826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @defgroup core OpenMAX IL core
104826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Functions and structure related to the OMX IL core
105826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
106e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin
107826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** @defgroup comp OpenMAX IL component
108826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Functions and structure related to the OMX IL component
109826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
110e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin
111826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @defgroup rpm Resource and Policy Management
112826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Structures for resource and policy management of components
113826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
114826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
115826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @defgroup buf Buffer Management
116826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Buffer handling functions and structures
117826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
118e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin
119826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @defgroup tun Tunneling
120826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * @ingroup core comp
121826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev * Structures and functions to manage tunnels among component ports
122826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
123e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin
124826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** @defgroup cp Content Pipes
125826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  @ingroup core
126826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
127e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin
128826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev /** @defgroup metadata Metadata handling
129e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin  *
130e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin  */
131826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
132826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_U8 is an 8 bit unsigned quantity that is byte aligned */
133826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef unsigned char OMX_U8;
134826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
135826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_S8 is an 8 bit signed quantity that is byte aligned */
136826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef signed char OMX_S8;
137826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
138826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_U16 is a 16 bit unsigned quantity that is 16 bit word aligned */
139826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef unsigned short OMX_U16;
140826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
141826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_S16 is a 16 bit signed quantity that is 16 bit word aligned */
142826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef signed short OMX_S16;
143826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
144826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_U32 is a 32 bit unsigned quantity that is 32 bit word aligned */
145e4010605f233a213cf0d972397bb33c34c364227Patrick Tjintypedef unsigned int OMX_U32;
146826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
147826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_S32 is a 32 bit signed quantity that is 32 bit word aligned */
148e4010605f233a213cf0d972397bb33c34c364227Patrick Tjintypedef signed int OMX_S32;
149826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
150826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
151826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* Users with compilers that cannot accept the "long long" designation should
152826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev   define the OMX_SKIP64BIT macro.  It should be noted that this may cause
153826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev   some components to fail to compile if the component was written to require
154826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev   64 bit integral types.  However, these components would NOT compile anyway
155826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev   since the compiler does not support the way the component was written.
156826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev*/
157826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_SKIP64BIT
158826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifdef __SYMBIAN32__
159826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */
160826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef unsigned long long OMX_U64;
161826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
162826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */
163826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef signed long long OMX_S64;
164826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
165826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#elif defined(WIN32)
166826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
167826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */
168826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef unsigned __int64  OMX_U64;
169826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
170826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */
171826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef signed   __int64  OMX_S64;
172826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
173826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#else /* WIN32 */
174826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
175826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */
176826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef unsigned long long OMX_U64;
177826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
178826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */
179826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef signed long long OMX_S64;
180826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
181826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif /* WIN32 */
182826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
183826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
184826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
185826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_BOOL type is intended to be used to represent a true or a false
186826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    value when passing parameters to and from the OMX core and components.  The
187826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_BOOL is a 32 bit quantity and is aligned on a 32 bit word boundary.
188826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
189826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_BOOL {
190826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_FALSE = 0,
191826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_TRUE = !OMX_FALSE,
192826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_BOOL_MAX = 0x7FFFFFFF
193826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_BOOL;
194e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin
195f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan#ifdef OMX_ANDROID_COMPILE_AS_32BIT_ON_64BIT_PLATFORMS
196f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan
197f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavantypedef OMX_U32 OMX_PTR;
198f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavantypedef OMX_PTR OMX_STRING;
199f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavantypedef OMX_PTR OMX_BYTE;
200f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan
201f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan#else
202f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan
203826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_PTR type is intended to be used to pass pointers between the OMX
204826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    applications and the OMX Core and components.  This is a 32 bit pointer and
205826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    is aligned on a 32 bit boundary.
206826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
207826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef void* OMX_PTR;
208826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
209826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_STRING type is intended to be used to pass "C" type strings between
210826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    the application and the core and component.  The OMX_STRING type is a 32
211826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    bit pointer to a zero terminated string.  The  pointer is word aligned and
212826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    the string is byte aligned.
213826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
214826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef char* OMX_STRING;
215826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
216826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_BYTE type is intended to be used to pass arrays of bytes such as
217826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    buffers between the application and the component and core.  The OMX_BYTE
218826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    type is a 32 bit pointer to a zero terminated string.  The  pointer is word
219826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    aligned and the string is byte aligned.
220826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
221826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef unsigned char* OMX_BYTE;
222826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
223826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_UUIDTYPE is a very long unique identifier to uniquely identify
224826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    at runtime.  This identifier should be generated by a component in a way
225826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    that guarantees that every instance of the identifier running on the system
226826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    is unique. */
227f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan
228f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan
229f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan#endif
230f3ca23b5bd0c3d78d321ccf5c5af5eb0d461ff1aPraveen Chavan
231826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef unsigned char OMX_UUIDTYPE[128];
232826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
233826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_DIRTYPE enumeration is used to indicate if a port is an input or
234826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    an output port.  This enumeration is common across all component types.
235826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
236826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_DIRTYPE
237826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{
238826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_DirInput,              /**< Port is an input port */
239826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_DirOutput,             /**< Port is an output port */
240826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_DirMax = 0x7FFFFFFF
241826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_DIRTYPE;
242826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
243826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_ENDIANTYPE enumeration is used to indicate the bit ordering
244826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    for numerical data (i.e. big endian, or little endian).
245826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
246826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_ENDIANTYPE
247826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{
248826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_EndianBig, /**< big endian */
249826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_EndianLittle, /**< little endian */
250826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_EndianMax = 0x7FFFFFFF
251826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_ENDIANTYPE;
252826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
253826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
254826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_NUMERICALDATATYPE enumeration is used to indicate if data
255826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    is signed or unsigned
256826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
257826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef enum OMX_NUMERICALDATATYPE
258826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{
259826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_NumericalDataSigned, /**< signed data */
260826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_NumericalDataUnsigned, /**< unsigned data */
261826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_NumercialDataMax = 0x7FFFFFFF
262826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_NUMERICALDATATYPE;
263826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
264826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
265826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** Unsigned bounded value type */
266826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_BU32 {
267826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_U32 nValue; /**< actual value */
268826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_U32 nMin;   /**< minimum for value (i.e. nValue >= nMin) */
269826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_U32 nMax;   /**< maximum for value (i.e. nValue <= nMax) */
270826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_BU32;
271826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
272826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
273826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** Signed bounded value type */
274826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_BS32 {
275826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_S32 nValue; /**< actual value */
276826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_S32 nMin;   /**< minimum for value (i.e. nValue >= nMin) */
277826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_S32 nMax;   /**< maximum for value (i.e. nValue <= nMax) */
278826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_BS32;
279826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
280826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
281826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** Structure representing some time or duration in microseconds. This structure
282826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  must be interpreted as a signed 64 bit value. The quantity is signed to accommodate
283826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  negative deltas and preroll scenarios. The quantity is represented in microseconds
284826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  to accomodate high resolution timestamps (e.g. DVD presentation timestamps based
285826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  on a 90kHz clock) and to allow more accurate and synchronized delivery (e.g.
286e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin  *  individual audio samples delivered at 192 kHz). The quantity is 64 bit to
287826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  accommodate a large dynamic range (signed 32 bit values would allow only for plus
288826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  or minus 35 minutes).
289826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *
290826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  Implementations with limited precision may convert the signed 64 bit value to
291826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  *  a signed 32 bit value internally but risk loss of precision.
292826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev  */
293826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifndef OMX_SKIP64BIT
294826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef OMX_S64 OMX_TICKS;
295826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#else
296826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_TICKS
297826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{
298826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_U32 nLowPart;    /** low bits of the signed 64 bit tick value */
299826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_U32 nHighPart;   /** high bits of the signed 64 bit tick value */
300826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_TICKS;
301826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
302826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#define OMX_TICKS_PER_SECOND 1000000
303826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
304826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** Define the public interface for the OMX Handle.  The core will not use
305826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    this value internally, but the application should only use this value.
306826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
307826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef void* OMX_HANDLETYPE;
308826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
309826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef struct OMX_MARKTYPE
310826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{
311826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_HANDLETYPE hMarkTargetComponent;   /**< The component that will
312826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev                                                generate a mark event upon
313826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev                                                processing the mark. */
314e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin    OMX_PTR pMarkData;   /**< Application specific data associated with
315826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev                              the mark sent on a mark event to disambiguate
316826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev                              this mark from others. */
317826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_MARKTYPE;
318826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
319826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
320826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_NATIVE_DEVICETYPE is used to map a OMX video port to the
321e4010605f233a213cf0d972397bb33c34c364227Patrick Tjin *  platform & operating specific object used to reference the display
322826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  or can be used by a audio port for native audio rendering */
323826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef void* OMX_NATIVE_DEVICETYPE;
324826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
325826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** OMX_NATIVE_WINDOWTYPE is used to map a OMX video port to the
326826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev *  platform & operating specific object used to reference the window */
327826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef void* OMX_NATIVE_WINDOWTYPE;
328826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
329826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/** The OMX_VERSIONTYPE union is used to specify the version for
330826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    a structure or component.  For a component, the version is entirely
331826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    specified by the component vendor.  Components doing the same function
332826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    from different vendors may or may not have the same version.  For
333826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    structures, the version shall be set by the entity that allocates the
334826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    structure.  For structures specified in the OMX 1.1 specification, the
335826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    value of the version shall be set to 1.1.0.0 in all cases.  Access to the
336826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_VERSIONTYPE can be by a single 32 bit access (e.g. by nVersion) or
337826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    by accessing one of the structure elements to, for example, check only
338826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    the Major revision.
339826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev */
340826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchevtypedef union OMX_VERSIONTYPE
341826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev{
342826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    struct
343826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    {
344826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev        OMX_U8 nVersionMajor;   /**< Major version accessor element */
345826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev        OMX_U8 nVersionMinor;   /**< Minor version accessor element */
346826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev        OMX_U8 nRevision;       /**< Revision version accessor element */
347826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev        OMX_U8 nStep;           /**< Step version accessor element */
348826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    } s;
349826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev    OMX_U32 nVersion;           /**< 32 bit value to make accessing the
350826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev                                    version easily done in a single word
351826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev                                    size copy/compare operation */
352826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev} OMX_VERSIONTYPE;
353826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
354826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#ifdef __cplusplus
355826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev}
356826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif /* __cplusplus */
357826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev
358826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev#endif
359826ececcbea342f7a0b92ec61847f1c95d384e05Iliyan Malchev/* File EOF */
360