blob: eccecaa9036f771a7195f6fdb286de2789388b73 [file] [log] [blame]
Kunter Gultekin203f89a2013-02-06 18:03:47 +02001/*
2 * Copyright (c) 2010 The Khronos Group Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject
10 * to the following conditions:
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
24/** @file OMX_IndexExt.h - OpenMax IL version 1.1.2
25 * The OMX_IndexExt header file contains extensions to the definitions
26 * for both applications and components .
27 */
28
29#ifndef OMX_IndexExt_h
30#define OMX_IndexExt_h
31
32#ifdef __cplusplus
33extern "C" {
34#endif /* __cplusplus */
35
36/* Each OMX header shall include all required header files to allow the
37 * header to compile without errors. The includes below are required
38 * for this header file to compile successfully
39 */
40#include <OMX_Index.h>
41
42
43/** Khronos standard extension indices.
44
45This enum lists the current Khronos extension indices to OpenMAX IL.
46*/
47typedef enum OMX_INDEXEXTTYPE {
48
49 /* Component parameters and configurations */
50 OMX_IndexExtComponentStartUnused = OMX_IndexKhronosExtensions + 0x00100000,
51 OMX_IndexConfigCallbackRequest, /**< reference: OMX_CONFIG_CALLBACKREQUESTTYPE */
52 OMX_IndexConfigCommitMode, /**< reference: OMX_CONFIG_COMMITMODETYPE */
53 OMX_IndexConfigCommit, /**< reference: OMX_CONFIG_COMMITTYPE */
Lajos Molnar1aeef212017-03-17 07:49:45 -070054 OMX_IndexConfigAndroidVendorExtension, /**< reference: OMX_CONFIG_VENDOR_EXTENSIONTYPE */
Kunter Gultekin203f89a2013-02-06 18:03:47 +020055
56 /* Port parameters and configurations */
57 OMX_IndexExtPortStartUnused = OMX_IndexKhronosExtensions + 0x00200000,
58
59 /* Audio parameters and configurations */
60 OMX_IndexExtAudioStartUnused = OMX_IndexKhronosExtensions + 0x00400000,
Changwan Ryuc9a8a342013-10-28 11:32:47 +090061 OMX_IndexParamAudioAndroidAc3, /**< reference: OMX_AUDIO_PARAM_ANDROID_AC3TYPE */
Vignesh Venkatasubramanian1a8b0ed2014-02-03 14:21:31 -080062 OMX_IndexParamAudioAndroidOpus, /**< reference: OMX_AUDIO_PARAM_ANDROID_OPUSTYPE */
Jean-Michel Trivie91cd212014-08-01 22:20:17 -070063 OMX_IndexParamAudioAndroidAacPresentation, /**< reference: OMX_AUDIO_PARAM_ANDROID_AACPRESENTATIONTYPE */
Rachad806f23d2014-12-23 16:04:59 -080064 OMX_IndexParamAudioAndroidEac3, /**< reference: OMX_AUDIO_PARAM_ANDROID_EAC3TYPE */
Wonsik Kim5761a9a2016-01-25 21:22:17 -080065 OMX_IndexParamAudioProfileQuerySupported, /**< reference: OMX_AUDIO_PARAM_ANDROID_PROFILETYPE */
Chong Zhang69eaed32016-10-12 17:09:48 -070066 OMX_IndexExtAudioEndUnused,
Kunter Gultekin203f89a2013-02-06 18:03:47 +020067
68 /* Image parameters and configurations */
69 OMX_IndexExtImageStartUnused = OMX_IndexKhronosExtensions + 0x00500000,
70
71 /* Video parameters and configurations */
72 OMX_IndexExtVideoStartUnused = OMX_IndexKhronosExtensions + 0x00600000,
73 OMX_IndexParamNalStreamFormatSupported, /**< reference: OMX_NALSTREAMFORMATTYPE */
74 OMX_IndexParamNalStreamFormat, /**< reference: OMX_NALSTREAMFORMATTYPE */
75 OMX_IndexParamNalStreamFormatSelect, /**< reference: OMX_NALSTREAMFORMATTYPE */
76 OMX_IndexParamVideoVp8, /**< reference: OMX_VIDEO_PARAM_VP8TYPE */
77 OMX_IndexConfigVideoVp8ReferenceFrame, /**< reference: OMX_VIDEO_VP8REFERENCEFRAMETYPE */
78 OMX_IndexConfigVideoVp8ReferenceFrameType, /**< reference: OMX_VIDEO_VP8REFERENCEFRAMEINFOTYPE */
Alex Glaznev5b155b82014-04-07 11:09:56 -070079 OMX_IndexParamVideoAndroidVp8Encoder, /**< reference: OMX_VIDEO_PARAM_ANDROID_VP8ENCODERTYPE */
Rachad184077d2014-05-01 18:42:43 -070080 OMX_IndexParamVideoHevc, /**< reference: OMX_VIDEO_PARAM_HEVCTYPE */
81 OMX_IndexParamSliceSegments, /**< reference: OMX_VIDEO_SLICESEGMENTSTYPE */
Hangyu Kuangdbadc842016-01-28 09:51:14 -080082 OMX_IndexConfigAndroidIntraRefresh, /**< reference: OMX_VIDEO_CONFIG_ANDROID_INTRAREFRESHTYPE */
Praveen Chavan3717b162016-03-25 01:17:32 -070083 OMX_IndexParamAndroidVideoTemporalLayering, /**< reference: OMX_VIDEO_PARAM_ANDROID_TEMPORALLAYERINGTYPE */
84 OMX_IndexConfigAndroidVideoTemporalLayering, /**< reference: OMX_VIDEO_CONFIG_ANDROID_TEMPORALLAYERINGTYPE */
Chong Zhang69eaed32016-10-12 17:09:48 -070085 OMX_IndexParamMaxFrameDurationForBitrateControl,/**< reference: OMX_PARAM_U32TYPE */
Vignesh Venkatasubramanian79d98e22016-11-28 16:05:03 -080086 OMX_IndexParamVideoVp9, /**< reference: OMX_VIDEO_PARAM_VP9TYPE */
87 OMX_IndexParamVideoAndroidVp9Encoder, /**< reference: OMX_VIDEO_PARAM_ANDROID_VP9ENCODERTYPE */
Chong Zhang69eaed32016-10-12 17:09:48 -070088 OMX_IndexExtVideoEndUnused,
Kunter Gultekin203f89a2013-02-06 18:03:47 +020089
90 /* Image & Video common configurations */
91 OMX_IndexExtCommonStartUnused = OMX_IndexKhronosExtensions + 0x00700000,
92
93 /* Other configurations */
94 OMX_IndexExtOtherStartUnused = OMX_IndexKhronosExtensions + 0x00800000,
Lajos Molnar76d4c5c2014-11-06 10:47:41 -080095 OMX_IndexConfigAutoFramerateConversion, /**< reference: OMX_CONFIG_BOOLEANTYPE */
Ronghua Wu49bf8f72015-03-09 16:27:55 -070096 OMX_IndexConfigPriority, /**< reference: OMX_PARAM_U32TYPE */
Ronghua Wua39c2052015-04-06 14:03:40 -070097 OMX_IndexConfigOperatingRate, /**< reference: OMX_PARAM_U32TYPE in Q16 format for video and in Hz for audio */
Lajos Molnar1017a1e2015-06-25 16:57:17 -070098 OMX_IndexParamConsumerUsageBits, /**< reference: OMX_PARAM_U32TYPE */
Chong Zhang69eaed32016-10-12 17:09:48 -070099 OMX_IndexExtOtherEndUnused,
Kunter Gultekin203f89a2013-02-06 18:03:47 +0200100
101 /* Time configurations */
102 OMX_IndexExtTimeStartUnused = OMX_IndexKhronosExtensions + 0x00900000,
103
104 OMX_IndexExtMax = 0x7FFFFFFF
105} OMX_INDEXEXTTYPE;
106
Lajos Molnar1aeef212017-03-17 07:49:45 -0700107#define OMX_MAX_STRINGVALUE_SIZE OMX_MAX_STRINGNAME_SIZE
108#define OMX_MAX_ANDROID_VENDOR_PARAMCOUNT 32
109
110typedef enum OMX_ANDROID_VENDOR_VALUETYPE {
111 OMX_AndroidVendorValueInt32 = 0, /*<< int32_t value */
112 OMX_AndroidVendorValueInt64, /*<< int64_t value */
113 OMX_AndroidVendorValueString, /*<< string value */
114 OMX_AndroidVendorValueEndUnused,
115} OMX_ANDROID_VENDOR_VALUETYPE;
116
117/**
118 * Structure describing a single value of an Android vendor extension.
119 *
120 * STRUCTURE MEMBERS:
121 * cKey : parameter value name.
122 * eValueType : parameter value type
123 * bSet : if false, the parameter is not set (for OMX_GetConfig) or is unset (OMX_SetConfig)
124 * if true, the parameter is set to the corresponding value below
125 * nInt64 : int64 value
126 * cString : string value
127 */
128typedef struct OMX_CONFIG_ANDROID_VENDOR_PARAMTYPE {
129 OMX_U8 cKey[OMX_MAX_STRINGNAME_SIZE];
130 OMX_ANDROID_VENDOR_VALUETYPE eValueType;
131 OMX_BOOL bSet;
132 union {
133 OMX_S32 nInt32;
134 OMX_S64 nInt64;
135 OMX_U8 cString[OMX_MAX_STRINGVALUE_SIZE];
136 };
137} OMX_CONFIG_ANDROID_VENDOR_PARAMTYPE;
138
139/**
140 * OMX_CONFIG_ANDROID_VENDOR_EXTENSIONTYPE is the structure for an Android vendor extension
141 * supported by the component. This structure enumerates the various extension parameters and their
142 * values.
143 *
144 * Android vendor extensions have a name and one or more parameter values - each with a string key -
145 * that are set together. The values are exposed to Android applications via a string key that is
146 * the concatenation of 'vendor', the extension name and the parameter key, each separated by dot
147 * (.), with any trailing '.value' suffix(es) removed (though optionally allowed).
148 *
149 * Extension names and parameter keys are subject to the following rules:
150 * - Each SHALL contain a set of lowercase alphanumeric (underscore allowed) tags separated by
151 * dot (.) or dash (-).
152 * - The first character of the first tag, and any tag following a dot SHALL not start with a
153 * digit.
154 * - Tags 'value', 'vendor', 'omx' and 'android' (even if trailed and/or followed by any number
155 * of underscores) are prohibited in the extension name.
156 * - Tags 'vendor', 'omx' and 'android' (even if trailed and/or followed by any number
157 * of underscores) are prohibited in parameter keys.
158 * - The tag 'value' (even if trailed and/or followed by any number
159 * of underscores) is prohibited in parameter keys with the following exception:
160 * the parameter key may be exactly 'value'
161 * - The parameter key for extensions with a single parameter value SHALL be 'value'
162 * - No two extensions SHALL have the same name
163 * - No extension's name SHALL start with another extension's NAME followed by a dot (.)
164 * - No two parameters of an extension SHALL have the same key
165 *
166 * This config can be used with both OMX_GetConfig and OMX_SetConfig. In the OMX_GetConfig
167 * case, the caller specifies nIndex and nParamSizeUsed. The component fills in cName,
168 * eDir and nParamCount. Additionally, if nParamSizeUsed is not less than nParamCount, the
169 * component fills out the parameter values (nParam) with the current values for each parameter
170 * of the vendor extension.
171 *
172 * The value of nIndex goes from 0 to N-1, where N is the number of Android vendor extensions
173 * supported by the component. The component does not need to report N as the caller can determine
174 * N by enumerating all extensions supported by the component. The component may not support any
175 * extensions. If there are no more extensions, OMX_GetParameter returns OMX_ErrorNoMore. The
176 * component supplies extensions in the order it wants clients to set them.
177 *
178 * The component SHALL return OMX_ErrorNone for all cases where nIndex is less than N (specifically
179 * even in the case of where nParamCount is greater than nParamSizeUsed).
180 *
181 * In the OMX_SetConfig case the field nIndex is ignored. If the component supports an Android
182 * vendor extension with the name in cName, it SHALL configure the parameter values for that
183 * extension according to the parameters in nParam. nParamCount is the number of valid parameters
184 * in the nParam array, and nParamSizeUsed is the size of the nParam array. (nParamSizeUsed
185 * SHALL be at least nParamCount) Parameters that are part of a vendor extension but are not
186 * in the nParam array are assumed to be unset (this is different from not changed).
187 * All parameter values SHALL have distinct keys in nParam (the component can assume that this
188 * is the case. Otherwise, the actual value for the parameters that are multiply defined can
189 * be any of the set values.)
190 *
191 * Return values in case of OMX_SetConfig:
192 * OMX_ErrorUnsupportedIndex: the component does not support the extension specified by cName
193 * OMX_ErrorUnsupportedSetting: the component does not support some or any of the parameters
194 * (names) specified in nParam
195 * OMX_ErrorBadParameter: the parameter is invalid (e.g. nParamCount is greater than
196 * nParamSizeUsed, or some parameter value has invalid type)
197 *
198 * STRUCTURE MEMBERS:
199 * nSize : size of the structure in bytes
200 * nVersion : OMX specification version information
201 * cName : name of vendor extension
202 * nParamCount : the number of parameter values that are part of this vendor extension
203 * nParamSizeUsed : the size of nParam
204 * (must be at least 1 and at most OMX_MAX_ANDROID_VENDOR_PARAMCOUNT)
205 * param : the parameter values
206 */
207typedef struct OMX_CONFIG_ANDROID_VENDOR_EXTENSIONTYPE {
208 OMX_U32 nSize;
209 OMX_VERSIONTYPE nVersion;
210 OMX_U32 nIndex;
211 OMX_U8 cName[OMX_MAX_STRINGNAME_SIZE];
212 OMX_DIRTYPE eDir;
213 OMX_U32 nParamCount;
214 OMX_U32 nParamSizeUsed;
215 OMX_CONFIG_ANDROID_VENDOR_PARAMTYPE param[1];
216} OMX_CONFIG_ANDROID_VENDOR_EXTENSIONTYPE;
217
Kunter Gultekin203f89a2013-02-06 18:03:47 +0200218#ifdef __cplusplus
219}
220#endif /* __cplusplus */
221
222#endif /* OMX_IndexExt_h */
223/* File EOF */