Commit | Line | Data |
---|---|---|
d05bb22f S |
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 | 2012/07/13 config for MTK OMX Media Codecs, created by Morris Yang (mtk03147) | |
77 | --> | |
78 | ||
79 | <MediaCodecs> | |
80 | <Decoders> | |
81 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.MP3" type="audio/mpeg" > | |
82 | <Quirk name="decoder-lies-about-number-of-channels" /> | |
83 | <Quirk name="supports-multiple-frames-per-input-buffer" /> | |
84 | </MediaCodec> | |
85 | <MediaCodec name="OMX.google.opus.decoder" type="audio/opus"> | |
86 | <Limit name="channel-count" max="8" /> | |
87 | <Limit name="sample-rate" ranges="8000-96000" /> | |
88 | <Limit name="bitrate" range="1-10000000" /> | |
89 | </MediaCodec> | |
90 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.ADPCM.MS" type="audio/x-adpcm-ms" /> | |
91 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.ADPCM.DVI" type="audio/x-adpcm-dvi-ima" /> | |
92 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.GSM" type="audio/gsm" /> | |
93 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.RAW" type="audio/raw" /> | |
94 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.G711.ALAW" type="audio/g711-alaw" > | |
95 | <Quirk name="decoder-lies-about-number-of-channels" /> | |
96 | </MediaCodec> | |
97 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.G711.MLAW" type="audio/g711-mlaw" > | |
98 | <Quirk name="decoder-lies-about-number-of-channels" /> | |
99 | </MediaCodec> | |
100 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.FLAC" type="audio/flac" /> | |
101 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.WMA" type="audio/x-ms-wma" /> | |
102 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.APE" type="audio/ape" > | |
103 | <Quirk name="decoder-lies-about-number-of-channels" /> | |
104 | <Quirk name="supports-multiple-frames-per-input-buffer" /> | |
105 | </MediaCodec> | |
106 | <MediaCodec name="OMX.MTK.AUDIO.DECODER.ALAC" type="audio/alac" /> | |
107 | <MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" /> | |
108 | <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" /> | |
109 | <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" /> | |
110 | <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" /> | |
111 | <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" /> | |
112 | <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" /> | |
113 | <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" /> | |
114 | <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" /> | |
115 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.MPEG2" type="video/mpeg2" > | |
116 | <Quirk name="requires-allocate-on-input-ports" /> | |
117 | <Quirk name="requires-allocate-on-output-ports" /> | |
118 | </MediaCodec> | |
119 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.HEVC" type="video/hevc" > | |
120 | <Quirk name="requires-allocate-on-input-ports" /> | |
121 | <Quirk name="requires-allocate-on-output-ports" /> | |
122 | </MediaCodec> | |
123 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.MPEG4" type="video/mp4v-es" > | |
124 | <Quirk name="requires-allocate-on-input-ports" /> | |
125 | <Quirk name="requires-allocate-on-output-ports" /> | |
126 | </MediaCodec> | |
127 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.H263" type="video/3gpp" > | |
128 | <Quirk name="requires-allocate-on-input-ports" /> | |
129 | <Quirk name="requires-allocate-on-output-ports" /> | |
130 | </MediaCodec> | |
131 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.AVC" type="video/avc" > | |
132 | <Quirk name="requires-allocate-on-input-ports" /> | |
133 | <Quirk name="requires-allocate-on-output-ports" /> | |
134 | </MediaCodec> | |
135 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.VPX" type="video/x-vnd.on2.vp8" > | |
136 | <Quirk name="requires-allocate-on-input-ports" /> | |
137 | <Quirk name="requires-allocate-on-output-ports" /> | |
138 | </MediaCodec> | |
139 | <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" > | |
140 | </MediaCodec> | |
141 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.VC1" type="video/x-ms-wmv" > | |
142 | <Quirk name="requires-allocate-on-input-ports" /> | |
143 | <Quirk name="requires-allocate-on-output-ports" /> | |
144 | </MediaCodec> | |
145 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.DIVX" type="video/divx" > | |
146 | <Quirk name="requires-allocate-on-input-ports" /> | |
147 | <Quirk name="requires-allocate-on-output-ports" /> | |
148 | </MediaCodec> | |
149 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.DIVX3" type="video/divx3" > | |
150 | <Quirk name="requires-allocate-on-input-ports" /> | |
151 | <Quirk name="requires-allocate-on-output-ports" /> | |
152 | </MediaCodec> | |
153 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.XVID" type="video/xvid" > | |
154 | <Quirk name="requires-allocate-on-input-ports" /> | |
155 | <Quirk name="requires-allocate-on-output-ports" /> | |
156 | </MediaCodec> | |
157 | <MediaCodec name="OMX.MTK.VIDEO.DECODER.S263" type="video/flv1" > | |
158 | <Quirk name="requires-allocate-on-input-ports" /> | |
159 | <Quirk name="requires-allocate-on-output-ports" /> | |
160 | </MediaCodec> | |
161 | <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" > | |
162 | </MediaCodec> | |
163 | <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" > | |
164 | </MediaCodec> | |
165 | <MediaCodec name="OMX.google.h264.decoder" type="video/avc" /> | |
166 | ||
167 | <!-- DOLBY_UDC --> | |
168 | <MediaCodec name="OMX.dolby.ac3.decoder" > | |
169 | <Type name="audio/ac3" /> | |
170 | <Quirk name="needs-flush-before-disable" /> | |
171 | <Quirk name="requires-flush-complete-emulation" /> | |
172 | </MediaCodec> | |
173 | <MediaCodec name="OMX.dolby.ec3.decoder" > | |
174 | <Type name="audio/eac3" /> | |
175 | <Quirk name="needs-flush-before-disable" /> | |
176 | <Quirk name="requires-flush-complete-emulation" /> | |
177 | </MediaCodec> | |
178 | <!-- DOLBY_UDC END --> | |
179 | </Decoders> | |
180 | ||
181 | <Encoders> | |
182 | <MediaCodec name="OMX.MTK.VIDEO.ENCODER.MPEG4" type="video/mp4v-es" > | |
183 | <Quirk name="requires-allocate-on-input-ports" /> | |
184 | <Quirk name="requires-allocate-on-output-ports" /> | |
185 | </MediaCodec> | |
186 | <MediaCodec name="OMX.MTK.VIDEO.ENCODER.H263" type="video/3gpp" > | |
187 | <Quirk name="requires-allocate-on-input-ports" /> | |
188 | <Quirk name="requires-allocate-on-output-ports" /> | |
189 | </MediaCodec> | |
190 | <MediaCodec name="OMX.MTK.VIDEO.ENCODER.AVC" type="video/avc" > | |
191 | <Quirk name="requires-allocate-on-input-ports" /> | |
192 | <Quirk name="requires-allocate-on-output-ports" /> | |
193 | </MediaCodec> | |
194 | ||
195 | <MediaCodec name="OMX.MTK.AUDIO.ENCODER.VORBIS" type="audio/vorbis" /> | |
196 | <MediaCodec name="OMX.MTK.AUDIO.ENCODER.ADPCM.MS" type="audio/x-adpcm-ms" /> | |
197 | <MediaCodec name="OMX.MTK.AUDIO.ENCODER.ADPCM.DVI" type="audio/x-adpcm-dvi-ima" /> | |
198 | <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" /> | |
199 | <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" /> | |
200 | <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" /> | |
201 | <MediaCodec name="OMX.google.flac.encoder" type="audio/flac" /> | |
202 | <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" /> | |
203 | </Encoders> | |
204 | </MediaCodecs> |