blob: 8b270e8b344f19dcb693c28bed326bdc8dba7c35
1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | <!-- Copyright (C) 2012 The Android Open Source Project |
3 | |
4 | Licensed under the Apache License, Version 2.0 (the "License"); |
5 | you may not use this file except in compliance with the License. |
6 | You may obtain a copy of the License at |
7 | |
8 | http://www.apache.org/licenses/LICENSE-2.0 |
9 | |
10 | Unless required by applicable law or agreed to in writing, software |
11 | distributed under the License is distributed on an "AS IS" BASIS, |
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | See the License for the specific language governing permissions and |
14 | limitations under the License. |
15 | --> |
16 | |
17 | <!-- |
18 | <!DOCTYPE MediaCodecs [ |
19 | <!ELEMENT MediaCodecs (Decoders,Encoders)> |
20 | <!ELEMENT Decoders (MediaCodec*)> |
21 | <!ELEMENT Encoders (MediaCodec*)> |
22 | <!ELEMENT MediaCodec (Type*,Quirk*)> |
23 | <!ATTLIST MediaCodec name CDATA #REQUIRED> |
24 | <!ATTLIST MediaCodec type CDATA> |
25 | <!ELEMENT Type EMPTY> |
26 | <!ATTLIST Type name CDATA #REQUIRED> |
27 | <!ELEMENT Quirk EMPTY> |
28 | <!ATTLIST Quirk name CDATA #REQUIRED> |
29 | ]> |
30 | |
31 | There's a simple and a complex syntax to declare the availability of a |
32 | media codec: |
33 | |
34 | A codec that properly follows the OpenMax spec and therefore doesn't have any |
35 | quirks and that only supports a single content type can be declared like so: |
36 | |
37 | <MediaCodec name="OMX.foo.bar" type="something/interesting" /> |
38 | |
39 | If a codec has quirks OR supports multiple content types, the following syntax |
40 | can be used: |
41 | |
42 | <MediaCodec name="OMX.foo.bar" > |
43 | <Type name="something/interesting" /> |
44 | <Type name="something/else" /> |
45 | ... |
46 | <Quirk name="requires-allocate-on-input-ports" /> |
47 | <Quirk name="requires-allocate-on-output-ports" /> |
48 | <Quirk name="output-buffers-are-unreadable" /> |
49 | </MediaCodec> |
50 | |
51 | Only the three quirks included above are recognized at this point: |
52 | |
53 | "requires-allocate-on-input-ports" |
54 | must be advertised if the component does not properly support specification |
55 | of input buffers using the OMX_UseBuffer(...) API but instead requires |
56 | OMX_AllocateBuffer to be used. |
57 | |
58 | "requires-allocate-on-output-ports" |
59 | must be advertised if the component does not properly support specification |
60 | of output buffers using the OMX_UseBuffer(...) API but instead requires |
61 | OMX_AllocateBuffer to be used. |
62 | |
63 | "output-buffers-are-unreadable" |
64 | must be advertised if the emitted output buffers of a decoder component |
65 | are not readable, i.e. use a custom format even though abusing one of |
66 | the official OMX colorspace constants. |
67 | Clients of such decoders will not be able to access the decoded data, |
68 | naturally making the component much less useful. The only use for |
69 | a component with this quirk is to render the output to the screen. |
70 | Audio decoders MUST NOT advertise this quirk. |
71 | Video decoders that advertise this quirk must be accompanied by a |
72 | corresponding color space converter for thumbnail extraction, |
73 | matching surfaceflinger support that can render the custom format to |
74 | a texture and possibly other code, so just DON'T USE THIS QUIRK. |
75 | |
76 | --> |
77 | |
78 | <MediaCodecs> |
79 | <Decoders> |
80 | <MediaCodec name="OMX.amlogic.hevc.decoder.awesome" type="video/hevc" > |
81 | <Limit name="size" min="64x64" max="3840x2160" /> |
82 | <Limit name="alignment" value="2x2" /> |
83 | <Limit name="block-size" value="16x16" /> |
84 | <Limit name="blocks-per-second" min="1" max="972000" /> |
85 | <Limit name="bitrate" range="1-300000000" /> |
86 | <Feature name="adaptive-playback" /> |
87 | <Limit name="concurrent-instances" max="9" /> |
88 | </MediaCodec> |
89 | <MediaCodec name="OMX.amlogic.hevc.decoder.awesome.secure" type="video/hevc" > |
90 | <Limit name="size" min="64x64" max="3840x2160" /> |
91 | <Limit name="alignment" value="2x2" /> |
92 | <Limit name="block-size" value="16x16" /> |
93 | <Limit name="blocks-per-second" min="1" max="972000" /> |
94 | <Limit name="bitrate" range="1-300000000" /> |
95 | <Feature name="adaptive-playback" /> |
96 | <Feature name="secure-playback" required="true" /> |
97 | <Feature name="tunneled-playback" /> |
98 | <Limit name="concurrent-instances" max="1" /> |
99 | </MediaCodec> |
100 | <MediaCodec name="OMX.amlogic.avc.decoder.awesome" type="video/avc" > |
101 | <Limit name="size" min="64x64" max="3840x2160" /> |
102 | <Limit name="alignment" value="2x2" /> |
103 | <Limit name="block-size" value="16x16" /> |
104 | <Limit name="blocks-per-second" min="1" max="972000" /> |
105 | <Limit name="bitrate" range="1-300000000" /> |
106 | <Feature name="adaptive-playback" /> |
107 | <Limit name="concurrent-instances" max="9" /> |
108 | </MediaCodec> |
109 | <MediaCodec name="OMX.amlogic.avc.decoder.awesome.secure" type="video/avc" > |
110 | <Limit name="size" min="64x64" max="3840x2160" /> |
111 | <Limit name="alignment" value="2x2" /> |
112 | <Limit name="block-size" value="16x16" /> |
113 | <Limit name="blocks-per-second" min="1" max="972000" /> |
114 | <Limit name="bitrate" range="1-300000000" /> |
115 | <Feature name="adaptive-playback" /> |
116 | <Feature name="secure-playback" required="true" /> |
117 | <Limit name="concurrent-instances" max="1" /> |
118 | </MediaCodec> |
119 | <MediaCodec name="OMX.amlogic.mpeg4.decoder.awesome" type="video/mp4v-es" > |
120 | <Limit name="size" min="64x64" max="1920x1088" /> |
121 | <Limit name="alignment" value="2x2" /> |
122 | <Limit name="block-size" value="16x16" /> |
123 | <Limit name="blocks-per-second" min="1" max="972000" /> |
124 | <Limit name="bitrate" range="1-300000000" /> |
125 | <Feature name="adaptive-playback" /> |
126 | <Limit name="concurrent-instances" max="1" /> |
127 | </MediaCodec> |
128 | <MediaCodec name="OMX.amlogic.h263.decoder.awesome" type="video/3gpp" > |
129 | <Limit name="size" min="64x64" max="1920x1088" /> |
130 | <Limit name="alignment" value="2x2" /> |
131 | <Limit name="block-size" value="16x16" /> |
132 | <Limit name="blocks-per-second" min="1" max="972000" /> |
133 | <Limit name="bitrate" range="1-300000000" /> |
134 | <Feature name="adaptive-playback" /> |
135 | <Limit name="concurrent-instances" max="1" /> |
136 | </MediaCodec> |
137 | <MediaCodec name="OMX.amlogic.mpeg2.decoder.awesome" type="video/mpeg2" > |
138 | <Limit name="size" min="64x64" max="1920x1088" /> |
139 | <Limit name="alignment" value="2x2" /> |
140 | <Limit name="block-size" value="16x16" /> |
141 | <Limit name="blocks-per-second" min="1" max="972000" /> |
142 | <Limit name="bitrate" range="1-300000000" /> |
143 | <Feature name="adaptive-playback" /> |
144 | <Limit name="concurrent-instances" max="1" /> |
145 | </MediaCodec> |
146 | <MediaCodec name="OMX.amlogic.vc1.decoder.awesome" type="video/vc1" > |
147 | <Limit name="size" min="64x64" max="1920x1088" /> |
148 | <Limit name="alignment" value="2x2" /> |
149 | <Limit name="block-size" value="16x16" /> |
150 | <Limit name="blocks-per-second" min="1" max="" /> |
151 | <Limit name="bitrate" range="1-300000000" /> |
152 | <Feature name="adaptive-playback" /> |
153 | <Limit name="concurrent-instances" max="1" /> |
154 | </MediaCodec> |
155 | <MediaCodec name="OMX.amlogic.wvc1.decoder.awesome" type="video/wvc1" > |
156 | <Limit name="size" min="64x64" max="1920x1088" /> |
157 | <Limit name="alignment" value="2x2" /> |
158 | <Limit name="block-size" value="16x16" /> |
159 | <Limit name="blocks-per-second" min="1" max="" /> |
160 | <Limit name="bitrate" range="1-300000000" /> |
161 | <Feature name="adaptive-playback" /> |
162 | <Limit name="concurrent-instances" max="1" /> |
163 | </MediaCodec> |
164 | <MediaCodec name="OMX.amlogic.wmv3.decoder.awesome" type="video/wmv3" > |
165 | <Limit name="size" min="64x64" max="1920x1088" /> |
166 | <Limit name="alignment" value="2x2" /> |
167 | <Limit name="block-size" value="16x16" /> |
168 | <Limit name="blocks-per-second" min="1" max="972000" /> |
169 | <Limit name="bitrate" range="1-300000000" /> |
170 | <Feature name="adaptive-playback" /> |
171 | <Limit name="concurrent-instances" max="1" /> |
172 | </MediaCodec> |
173 | <MediaCodec name="OMX.amlogic.mjpeg.decoder.awesome" type="video/mjpeg" > |
174 | <Limit name="size" min="64x64" max="1920x1088" /> |
175 | <Limit name="alignment" value="2x2" /> |
176 | <Limit name="block-size" value="16x16" /> |
177 | <Limit name="blocks-per-second" min="1" max="972000" /> |
178 | <Limit name="bitrate" range="1-300000000" /> |
179 | <Feature name="adaptive-playback" /> |
180 | <Limit name="concurrent-instances" max="1" /> |
181 | </MediaCodec> |
182 | <MediaCodec name="OMX.amlogic.vp9.decoder.awesome" type="video/x-vnd.on2.vp9" > |
183 | <Limit name="size" min="64x64" max="3840x2160" /> |
184 | <Limit name="alignment" value="2x2" /> |
185 | <Limit name="block-size" value="16x16" /> |
186 | <Limit name="blocks-per-second" min="1" max="972000" /> |
187 | <Limit name="bitrate" range="1-300000000" /> |
188 | <Feature name="adaptive-playback" /> |
189 | <Limit name="concurrent-instances" max="9" /> |
190 | </MediaCodec> |
191 | <MediaCodec name="OMX.amlogic.vp9.decoder.awesome.secure" type="video/x-vnd.on2.vp9" > |
192 | <Limit name="size" min="64x64" max="3840x2160" /> |
193 | <Limit name="alignment" value="2x2" /> |
194 | <Limit name="block-size" value="16x16" /> |
195 | <Limit name="blocks-per-second" min="1" max="972000" /> |
196 | <Limit name="bitrate" range="1-300000000" /> |
197 | <Feature name="adaptive-playback" /> |
198 | <Feature name="secure-playback" required="true" /> |
199 | <Feature name="tunneled-playback" /> |
200 | <Limit name="concurrent-instances" max="1" /> |
201 | </MediaCodec> |
202 | <MediaCodec name="OMX.amlogic.vp6.decoder.sw" type="video/x-vnd.on2.vp6" /> |
203 | <MediaCodec name="OMX.amlogic.vp6a.decoder.sw" type="video/x-vnd.on2.vp6a" /> |
204 | <MediaCodec name="OMX.amlogic.vp6f.decoder.sw" type="video/x-vnd.on2.vp6f" /> |
205 | <MediaCodec name="OMX.amlogic.rm10.decoder.sw" type="video/rm10" /> |
206 | <MediaCodec name="OMX.amlogic.rm20.decoder.sw" type="video/rm20" /> |
207 | <MediaCodec name="OMX.amlogic.rm30.decoder.sw" type="video/rm30" /> |
208 | <MediaCodec name="OMX.amlogic.rm40.decoder.sw" type="video/rm40" /> |
209 | <MediaCodec name="OMX.amlogic.wmv2.decoder.sw" type="video/wmv2" /> |
210 | <MediaCodec name="OMX.amlogic.wmv1.decoder.sw" type="video/wmv1" /> |
211 | <MediaCodec name="OMX.google.ffmpeg.decoder.sw" type="audio/ffmpeg" /> |
212 | <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" /> |
213 | <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" /> |
214 | <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" /> |
215 | <MediaCodec name="OMX.google.adif.decoder" type="audio/aac-adif" /> |
216 | <MediaCodec name="OMX.google.latm.decoder" type="audio/aac-latm" /> |
217 | <MediaCodec name="OMX.google.adts.decoder" type="audio/adts" /> |
218 | <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" /> |
219 | <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" /> |
220 | <MediaCodec name="OMX.google.adpcm.ima.decoder" type="audio/adpcm-ima" /> |
221 | <MediaCodec name="OMX.google.adpcm.ms.decoder" type="audio/adpcm-ms" /> |
222 | <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" /> |
223 | <MediaCodec name="OMX.google.alac.decoder" type="audio/alac" /> |
224 | <MediaCodec name="OMX.google.wma.decoder" type="audio/wma" /> |
225 | <MediaCodec name="OMX.google.wmapro.decoder" type="audio/wmapro" /> |
226 | <MediaCodec name="OMX.google.ape.decoder" type="audio/ape" /> |
227 | <MediaCodec name="OMX.google.truehd.decoder" type="audio/truehd" /> |
228 | <MediaCodec name="OMX.google.raw.decoder" type="audio/raw" /> |
229 | <MediaCodec name="OMX.google.dtshd.decoder" type="audio/dtshd" /> |
230 | <MediaCodec name="OMX.google.opus.decoder" type="audio/opus"> |
231 | <Limit name="channel-count" max="8" /> |
232 | <Limit name="sample-rate" ranges="48000" /> |
233 | <Limit name="bitrate" range="6000-510000" /> |
234 | </MediaCodec> |
235 | |
236 | <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" /> |
237 | <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" /> |
238 | <MediaCodec name="OMX.google.h264.decoder" type="video/avc"> |
239 | <!-- profiles and levels: ProfileBaseline : Level51 --> |
240 | <Limit name="size" min="2x2" max="2048x2048" /> |
241 | <Limit name="alignment" value="2x2" /> |
242 | <Limit name="block-size" value="16x16" /> |
243 | <Limit name="block-count" range="1-8160" /> |
244 | <Limit name="blocks-per-second" range="1-489600" /> |
245 | <Limit name="bitrate" range="1-40000000" /> |
246 | <Feature name="adaptive-playback" /> |
247 | </MediaCodec> |
248 | <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8"> |
249 | <Limit name="size" min="2x2" max="2048x2048" /> |
250 | <Limit name="alignment" value="2x2" /> |
251 | <Limit name="block-size" value="16x16" /> |
252 | <Limit name="block-count" range="1-8160" /> |
253 | <Limit name="blocks-per-second" range="1-500000" /> |
254 | <Limit name="bitrate" range="1-40000000" /> |
255 | <Feature name="adaptive-playback" /> |
256 | </MediaCodec> |
257 | <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9"> |
258 | <Limit name="size" min="2x2" max="1280x1280" /> |
259 | <Limit name="alignment" value="2x2" /> |
260 | <Limit name="block-size" value="16x16" /> |
261 | <Limit name="block-count" range="1-3600" /> |
262 | <Limit name="blocks-per-second" range="1-108000" /> |
263 | <Limit name="bitrate" range="1-5000000" /> |
264 | <Feature name="adaptive-playback" /> |
265 | </MediaCodec> |
266 | <MediaCodec name="OMX.google.mp3.decoder" > |
267 | <Type name="audio/mpeg" /> |
268 | <Quirk name="needs-flush-before-disable" /> |
269 | <Quirk name="requires-flush-complete-emulation" /> |
270 | </MediaCodec> |
271 | |
272 | </Decoders> |
273 | |
274 | <Settings> |
275 | <Setting name="max-video-encoder-input-buffers" value="9" /> |
276 | <Setting name="supports-multiple-secure-codecs" value="false" /> |
277 | <Setting name="supports-secure-with-non-secure-codec" value="true" /> |
278 | </Settings> |
279 | |
280 | <Encoders> |
281 | <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" /> |
282 | <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" /> |
283 | <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" /> |
284 | <MediaCodec name="OMX.google.flac.encoder" type="audio/flac" /> |
285 | |
286 | <MediaCodec name="OMX.amlogic.video.encoder.avc" type="video/avc" > |
287 | <Limit name="size" min="64x64" max="1920x1088" /> |
288 | <Limit name="alignment" value="16x16" /> |
289 | <Limit name="block-size" value="16x16" /> |
290 | <Limit name="blocks-per-second" min="1" max="244800" /> |
291 | <Limit name="bitrate" range="1-20000000" /> |
292 | <Limit name="concurrent-instances" max="2" /> |
293 | </MediaCodec> |
294 | <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" > |
295 | <Limit name="size" min="176x144" max="640x480" /> |
296 | <Limit name="alignment" value="16x16" /> |
297 | <Limit name="block-size" value="16x16" /> |
298 | <Limit name="blocks-per-second" min="1" max="1485" /> |
299 | <Limit name="bitrate" range="192000-1440000" /> |
300 | </MediaCodec> |
301 | <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" > |
302 | <Limit name="size" min="176x144" max="352x288" /> |
303 | <Limit name="alignment" value="16x16" /> |
304 | </MediaCodec> |
305 | <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8"> |
306 | <!-- profiles and levels: ProfileMain : Level_Version0-3 --> |
307 | <Limit name="size" min="2x2" max="896x896" /> |
308 | <Limit name="alignment" value="2x2" /> |
309 | <Limit name="bitrate" range="1-40000000" /> |
310 | <Feature name="bitrate-modes" value="VBR,CBR" /> |
311 | </MediaCodec> |
312 | </Encoders> |
313 | </MediaCodecs> |
314 |