OpenMAX™ Integration Layer
Application Programming Interface
Specification
Version 1.1.2
Copyright © 2008 The Khronos Group Inc.
September 1, 2008
Document version 1.1.2.0
Copyright © 2005-2008 The Khronos Group Inc. All Rights Reserved.
This specification is protected by copyright laws and contains material proprietary to the
Khronos Group, Inc. It or any components may not be reproduced, republished, distributed,
transmitted, displayed, broadcast, or otherwise exploited in any manner without the express prior
written permission of the Khronos Group. You may use this specification for implementing the
functionality therein, without altering or removing any trademark, copyright or other notice from
the specification, but the receipt or possession of this specification does not convey any rights to
reproduce, disclose, or distribute its contents, or to manufacture, use, or sell anything that it may
describe, in whole or in part.
Khronos Group grants express permission to any current Promoter, Contributor or Adopter
member of Khronos to copy and redistribute UNMODIFIED versions of this specification in any
fashion, provided that NO CHARGE is made for the specification and the latest available update
of the specification for any version of the API is used whenever possible. Such distributed
specification may be reformatted AS LONG AS the contents of the specification are not changed
in any way. The specification may be incorporated into a product that is sold as long as such
product includes significant independent work developed by the seller. A link to the current
version of this specification on the Khronos Group website should be included whenever
possible with specification distributions.
Khronos Group makes no, and expressly disclaims any, representations or warranties, express or
implied, regarding this specification, including, without limitation, any implied warranties of
merchantability or fitness for a particular purpose or non-infringement of any intellectual
property. Khronos Group makes no, and expressly disclaims any, warranties, express or implied,
regarding the correctness, accuracy, completeness, timeliness, and reliability of the specification.
Under no circumstances will the Khronos Group, or any of its Promoters, Contributors or
Members or their respective partners, officers, directors, employees, agents or representatives be
liable for any damages, whether direct, indirect, special or consequential damages for lost
revenues, lost profits, or otherwise, arising from or in connection with these materials.
SAMPLE CODE and EXAMPLES, as identified herein, are expressly depicted herein with a
“grey” watermark and are included for illustrative purposes only and are expressly outside of the
Scope as defined in Attachment A - Khronos Group Intellectual Property (IP) Rights Policy of
the Khronos Group Membership Agreement. A Member or Promoter Member shall have no
obligation to grant any licenses under any Necessary Patent Claims covering SAMPLE CODE
and EXAMPLES.
Khronos and OpenMAX are trademarks of the Khronos Group Inc. Bluetooth is a registered
trademark of the Bluetooth Special Interest Group. RealAudio and RealVideo are registered
trademarks of RealNetworks, Inc. Windows Media is a registered trademark of Microsoft
Corporation.
2
Contents
1 OVERVIEW.....................................................................................................................................................10
1.1 INTRODUCTION..........................................................................................................................................10
1.1.1 About the Khronos Group....................................................................................................................10
1.1.2 A Brief History of OpenMAX...............................................................................................................10
1.2 THE OPENMAX INTEGRATION LAYER......................................................................................................10
1.2.1 Key Features and Benefits ...................................................................................................................10
1.2.2 Design Philosophy...............................................................................................................................11
1.2.3 Software Landscape.............................................................................................................................12
1.2.4 Stakeholders.........................................................................................................................................12
1.2.5 The Interface........................................................................................................................................13
1.3 DEFINITIONS..............................................................................................................................................14
1.4 AUTHORS ..................................................................................................................................................15
1.5 FEATURES NEW TO VERSION 1.1...............................................................................................................15
1.6 BACKWARD COMPATIBILITY.....................................................................................................................16
1.6.1 IL Client 1.0.........................................................................................................................................17
1.6.2 IL Client 1.1.........................................................................................................................................19
2 OPENMAX IL INTRODUCTION AND ARCHITECTURE......................................................................20
2.1 OPENMAX IL DESCRIPTION .....................................................................................................................20
2.1.1 Architectural Overview........................................................................................................................20
2.1.2 Key Vocabulary ...................................................................................................................................22
2.1.3 System Components .............................................................................................................................23
2.1.4 Component States ................................................................................................................................25
2.1.5 Component Architecture......................................................................................................................26
2.1.6 Communication Behavior ....................................................................................................................27
2.1.7 Tunneled Buffer Allocation..................................................................................................................28
2.1.8 Port Reconnection ...............................................................................................................................30
2.1.9 Queues and Flush ................................................................................................................................32
2.1.10 Marking Buffers...................................................................................................................................32
2.1.11 Events and Callbacks...........................................................................................................................33
2.1.12 Buffer Payload.....................................................................................................................................34
2.1.13 Buffer Flags and Timestamps ..............................................................................................................36
2.1.14 Synchronization ...................................................................................................................................36
2.1.15 Rate Control.........................................................................................................................................37
2.1.16 Component Registration ......................................................................................................................37
2.1.17 Resource Management.........................................................................................................................37
2.1.18 Content Pipes.......................................................................................................................................41
2.1.19 File Parsing .........................................................................................................................................42
2.1.20 Video Decoder Error Mapping............................................................................................................42
2.1.21 Buffer Payload Additional Information ...............................................................................................43
2.2 ENDIANNESS .............................................................................................................................................44
3 OPENMAX INTEGRATION LAYER CONTROL API..............................................................................45
3.1 OPENMAX IL TYPES ................................................................................................................................46
3.1.1 Enumerations.......................................................................................................................................46
3.1.2 Structures.............................................................................................................................................58
3.1.3 OMX_PORTDOMAINTYPE................................................................................................................77
3.1.4 OMX_HANDLETYPE..........................................................................................................................78
3.2 OPENMAX IL CORE METHODS/MACROS .................................................................................................78
3.2.1 Return Codes for the Functions...........................................................................................................79
3.2.2 Macros.................................................................................................................................................81
3.2.3 Functions ...........................................................................................................................................104
3.3 OPENMAX IL COMPONENT METHODS AND STRUCTURES ......................................................................111
3
3.3.1 pComponentPrivate ...........................................................................................................................111
3.3.2 pApplicationPrivate...........................................................................................................................111
3.3.3 GetComponentVersion.......................................................................................................................112
3.3.4 SendCommand ...................................................................................................................................112
3.3.5 GetParameter ....................................................................................................................................112
3.3.6 SetParameter .....................................................................................................................................112
3.3.7 GetConfig...........................................................................................................................................113
3.3.8 SetConfig ...........................................................................................................................................113
3.3.9 GetExtensionIndex.............................................................................................................................113
3.3.10 GetState .............................................................................................................................................113
3.3.11 ComponentTunnelRequest .................................................................................................................114
3.3.12 UseBuffer...........................................................................................................................................115
3.3.13 AllocateBuffer....................................................................................................................................115
3.3.14 FreeBuffer..........................................................................................................................................116
3.3.15 EmptyThisBuffer ................................................................................................................................116
3.3.16 FillThisBuffer.....................................................................................................................................116
3.3.17 SetCallbacks ......................................................................................................................................116
3.3.18 ComponentDeinit...............................................................................................................................117
3.3.19 UseEGLImage....................................................................................................................................118
3.4 CALLING SEQUENCES..............................................................................................................................118
3.4.1 Initialization.......................................................................................................................................118
3.4.2 Data Flow..........................................................................................................................................124
3.4.3 De-Initialization.................................................................................................................................127
3.4.4 Port Disablement and Enablement....................................................................................................129
3.4.5 Dynamic Port Reconfiguration..........................................................................................................131
3.4.6 Autodetect Port Reconfiguration .......................................................................................................133
3.4.7 Resource Management.......................................................................................................................135
4 OPENMAX IL DATA API............................................................................................................................140
4.1 AUDIO .....................................................................................................................................................140
4.1.1 Audio Use Case Examples .................................................................................................................140
4.1.2 Special Issues.....................................................................................................................................141
4.1.3 General Enumerations.......................................................................................................................141
4.1.4 Parameter and Configuration Indexes...............................................................................................143
4.1.5 OMX_AUDIO_PORTDEFINITIONTYPE.........................................................................................145
4.1.6 OMX_AUDIO_PARAM_PORTFORMATTYPE ................................................................................146
4.1.7 OMX_AUDIO_PARAM_PCMMODETYPE ......................................................................................147
4.1.8 OMX_AUDIO_PARAM_MP3TYPE ..................................................................................................148
4.1.9 OMX_AUDIO_PARAM_AACPROFILETYPE ..................................................................................150
4.1.10 OMX_AUDIO_PARAM_VORBISTYPE.............................................................................................153
4.1.11 OMX_AUDIO_PARAM_WMATYPE.................................................................................................154
4.1.12 OMX_AUDIO_PARAM_RATYPE.....................................................................................................156
4.1.13 OMX_AUDIO_PARAM_SBCTYPE...................................................................................................157
4.1.14 OMX_AUDIO_PARAM_ADPCMTYPE ............................................................................................158
4.1.15 OMX_AUDIO_PARAM_G723TYPE.................................................................................................159
4.1.16 OMX_AUDIO_PARAM_G726TYPE.................................................................................................160
4.1.17 OMX_AUDIO_PARAM_G729TYPE.................................................................................................161
4.1.18 OMX_AUDIO_PARAM_AMRTYPE..................................................................................................162
4.1.19 OMX_AUDIO_PARAM_GSMFRTYPE.............................................................................................164
4.1.20 OMX_AUDIO_PARAM_GSMEFRTYPE...........................................................................................165
4.1.21 OMX_AUDIO_PARAM_GSMHRTYPE.............................................................................................166
4.1.22 OMX_AUDIO_PARAM_TDMAFRTYPE ..........................................................................................167
4.1.23 OMX_AUDIO_PARAM_TDMAEFRTYPE........................................................................................167
4.1.24 OMX_AUDIO_PARAM_PDCFRTYPE.............................................................................................168
4.1.25 OMX_AUDIO_PARAM_PDCEFRTYPE...........................................................................................169
4.1.26 OMX_AUDIO_PARAM_PDCHRTYPE.............................................................................................170
4
4.1.27 OMX_AUDIO_PARAM_QCELP8TYPE ...........................................................................................171
4.1.28 OMX_AUDIO_PARAM_QCELP13TYPE .........................................................................................172
4.1.29 OMX_AUDIO_PARAM_EVRCTYPE................................................................................................173
4.1.30 OMX_AUDIO_PARAM_SMVTYPE..................................................................................................175
4.1.31 OMX_AUDIO_PARAM_MIDITYPE.................................................................................................176
4.1.32 OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE................................................................177
4.1.33 OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE..............................................................179
4.1.34 OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE .....................................................179
4.1.35 OMX_AUDIO_CONFIG_MIDICONTROLTYPE..............................................................................180
4.1.36 OMX_AUDIO_CONFIG_MIDISTATUSTYPE..................................................................................182
4.1.37 OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE.........................................................................183
4.1.38 OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE...............................................................184
4.1.39 OMX_AUDIO_CONFIG_VOLUMETYPE........................................................................................185
4.1.40 OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE ......................................................................186
4.1.41 OMX_AUDIO_CONFIG_BALANCETYPE.......................................................................................187
4.1.42 OMX_AUDIO_CONFIG_MUTETYPE .............................................................................................187
4.1.43 OMX_AUDIO_CONFIG_CHANNELMUTETYPE............................................................................187
4.1.44 OMX_AUDIO_CONFIG_LOUDNESSTYPE ....................................................................................188
4.1.45 OMX_AUDIO_CONFIG_BASSTYPE ...............................................................................................189
4.1.46 OMX_AUDIO_CONFIG_TREBLETYPE ..........................................................................................189
4.1.47 OMX_AUDIO_CONFIG_EQUALIZERTYPE...................................................................................190
4.1.48 OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE ......................................................................191
4.1.49 OMX_AUDIO_CONFIG_CHORUSTYPE.........................................................................................192
4.1.50 OMX_AUDIO_CONFIG_REVERBERATIONTYPE .........................................................................193
4.1.51 OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE...................................................................194
4.1.52 OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE.......................................................................195
4.2 IMAGE AND VIDEO COMMON ..................................................................................................................196
4.2.1 Uncompressed Data Formats ............................................................................................................196
4.2.2 Minimum Buffer Payload Size for Uncompressed Data ....................................................................200
4.2.3 Buffer Payload Requirements for Uncompressed Data.....................................................................201
4.2.4 Parameter and Configuration Indexes...............................................................................................201
4.2.5 OMX_PARAM_DEBLOCKINGTYPE ...............................................................................................206
4.2.6 OMX_PARAM_INTERLEAVETYPE .................................................................................................207
4.2.7 OMX_PARAM_SENSORMODETYPE...............................................................................................207
4.2.8 OMX_CONFIG_COLORCONVERSIONTYPE .................................................................................208
4.2.9 OMX_CONFIG_SCALEFACTORTYPE............................................................................................209
4.2.10 OMX_CONFIG_IMAGEFILTERTYPE .............................................................................................210
4.2.11 OMX_CONFIG_COLORENHANCEMENTTYPE.............................................................................211
4.2.12 OMX_CONFIG_COLORKEYTYPE ..................................................................................................211
4.2.13 OMX_CONFIG_COLORBLENDTYPE.............................................................................................212
4.2.14 OMX_FRAMESIZETYPE ..................................................................................................................214
4.2.15 OMX_CONFIG_ROTATIONTYPE....................................................................................................214
4.2.16 OMX_CONFIG_MIRRORTYPE........................................................................................................214
4.2.17 OMX_CONFIG_POINTTYPE...........................................................................................................215
4.2.18 OMX_CONFIG_RECTTYPE.............................................................................................................216
4.2.19 OMX_CONFIG_FRAMESTABTYPE ................................................................................................216
4.2.20 OMX_CONFIG_WHITEBALCONTROLTYPE .................................................................................217
4.2.21 OMX_CONFIG_EXPOSURECONTROLTYPE.................................................................................218
4.2.22 OMX_CONFIG_CONTRASTTYPE ...................................................................................................219
4.2.23 OMX_CONFIG_BRIGHTNESSTYPE ...............................................................................................219
4.2.24 OMX_CONFIG_BACKLIGHTTYPE.................................................................................................220
4.2.25 OMX_CONFIG_GAMMATYPE ........................................................................................................220
4.2.26 OMX_CONFIG_SATURATIONTYPE ...............................................................................................221
4.2.27 OMX_CONFIG_LIGHTNESSTYPE..................................................................................................221
4.2.28 OMX_CONFIG_PLANEBLENDTYPE..............................................................................................222
4.2.29 OMX_CONFIG_DITHERTYPE ........................................................................................................223
5