Commit | Line | Data |
---|---|---|
8c8508f8 | 1 | <?xml version="1.0" encoding="utf-8" ?> |
83dc35bd S |
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 Include EMPTY> | |
20 | <!ATTLIST Include href CDATA #REQUIRED> | |
21 | <!ELEMENT MediaCodecs (Decoders|Encoders|Include)*> | |
22 | <!ELEMENT Decoders (MediaCodec|Include)*> | |
23 | <!ELEMENT Encoders (MediaCodec|Include)*> | |
24 | <!ELEMENT MediaCodec (Type|Quirk|Include)*> | |
25 | <!ATTLIST MediaCodec name CDATA #REQUIRED> | |
26 | <!ATTLIST MediaCodec type CDATA> | |
27 | <!ELEMENT Type EMPTY> | |
28 | <!ATTLIST Type name CDATA #REQUIRED> | |
29 | <!ELEMENT Quirk EMPTY> | |
30 | <!ATTLIST Quirk name CDATA #REQUIRED> | |
31 | ]> | |
32 | ||
33 | There's a simple and a complex syntax to declare the availability of a | |
34 | media codec: | |
35 | ||
36 | A codec that properly follows the OpenMax spec and therefore doesn't have any | |
37 | quirks and that only supports a single content type can be declared like so: | |
38 | ||
39 | <MediaCodec name="OMX.foo.bar" type="something/interesting" /> | |
40 | ||
41 | If a codec has quirks OR supports multiple content types, the following syntax | |
42 | can be used: | |
43 | ||
44 | <MediaCodec name="OMX.foo.bar" > | |
45 | <Type name="something/interesting" /> | |
46 | <Type name="something/else" /> | |
47 | ... | |
48 | <Quirk name="requires-allocate-on-input-ports" /> | |
49 | <Quirk name="requires-allocate-on-output-ports" /> | |
50 | <Quirk name="output-buffers-are-unreadable" /> | |
51 | </MediaCodec> | |
52 | ||
53 | Only the three quirks included above are recognized at this point: | |
54 | ||
55 | "requires-allocate-on-input-ports" | |
56 | must be advertised if the component does not properly support specification | |
57 | of input buffers using the OMX_UseBuffer(...) API but instead requires | |
58 | OMX_AllocateBuffer to be used. | |
59 | ||
60 | "requires-allocate-on-output-ports" | |
61 | must be advertised if the component does not properly support specification | |
62 | of output buffers using the OMX_UseBuffer(...) API but instead requires | |
63 | OMX_AllocateBuffer to be used. | |
64 | ||
65 | "output-buffers-are-unreadable" | |
66 | must be advertised if the emitted output buffers of a decoder component | |
67 | are not readable, i.e. use a custom format even though abusing one of | |
68 | the official OMX colorspace constants. | |
69 | Clients of such decoders will not be able to access the decoded data, | |
70 | naturally making the component much less useful. The only use for | |
71 | a component with this quirk is to render the output to the screen. | |
72 | Audio decoders MUST NOT advertise this quirk. | |
73 | Video decoders that advertise this quirk must be accompanied by a | |
74 | corresponding color space converter for thumbnail extraction, | |
75 | matching surfaceflinger support that can render the custom format to | |
76 | a texture and possibly other code, so just DON'T USE THIS QUIRK. | |
77 | ||
78 | --> | |
79 | ||
80 | <MediaCodecs> | |
81 | <Settings> | |
8c8508f8 S |
82 | <Setting name="supports-multiple-secure-codecs" value="true" /> |
83 | <Setting name="supports-secure-with-non-secure-codec" value="true" /> | |
83dc35bd S |
84 | <Setting name="max-video-encoder-input-buffers" value="9" /> |
85 | </Settings> | |
86 | <Decoders> | |
8c8508f8 | 87 | <MediaCodec name="OMX.Exynos.mpeg4.dec" type="video/mp4v-es" > |
83dc35bd S |
88 | <Quirk name="requires-allocate-on-input-ports" /> |
89 | <Quirk name="requires-allocate-on-output-ports" /> | |
90 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
91 | <Quirk name="video-controller-check-enable" /> | |
8c8508f8 | 92 | <Limit name="size" min="32x32" max="1920x1088" /> |
83dc35bd S |
93 | <Limit name="alignment" value="2x2" /> |
94 | <Limit name="block-size" value="16x16" /> | |
95 | <Limit name="blocks-per-second" min="1" max="244800" /> | |
96 | <Limit name="bitrate" range="1-20000000" /> | |
8c8508f8 | 97 | <Limit name="concurrent-instances" max="16" /> |
83dc35bd S |
98 | <Feature name="adaptive-playback" /> |
99 | </MediaCodec> | |
8c8508f8 | 100 | <MediaCodec name="OMX.Exynos.h263.dec" type="video/3gpp" > |
83dc35bd S |
101 | <Quirk name="requires-allocate-on-input-ports" /> |
102 | <Quirk name="requires-allocate-on-output-ports" /> | |
103 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
104 | <Quirk name="video-controller-check-enable" /> | |
8c8508f8 S |
105 | <Limit name="size" min="32x32" max="720x480" /> |
106 | <Limit name="alignment" value="4x4" /> | |
83dc35bd | 107 | <Limit name="block-size" value="16x16" /> |
8c8508f8 S |
108 | <Limit name="blocks-per-second" min="1" max="48600" /> |
109 | <Limit name="bitrate" range="1-20000000" /> | |
110 | <Limit name="concurrent-instances" max="16" /> | |
83dc35bd S |
111 | <Feature name="adaptive-playback" /> |
112 | </MediaCodec> | |
8c8508f8 | 113 | <MediaCodec name="OMX.Exynos.avc.dec" type="video/avc" > |
83dc35bd S |
114 | <Quirk name="requires-allocate-on-input-ports" /> |
115 | <Quirk name="requires-allocate-on-output-ports" /> | |
8c8508f8 | 116 | <Limit name="size" min="32x32" max="1920x1088" /> |
83dc35bd S |
117 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
118 | <Quirk name="video-controller-check-enable" /> | |
83dc35bd S |
119 | <Limit name="alignment" value="2x2" /> |
120 | <Limit name="block-size" value="16x16" /> | |
121 | <Limit name="blocks-per-second" min="1" max="244800" /> | |
8c8508f8 S |
122 | <Limit name="bitrate" range="1-20000000" /> |
123 | <Limit name="concurrent-instances" max="16" /> | |
83dc35bd S |
124 | <Feature name="adaptive-playback" /> |
125 | </MediaCodec> | |
8c8508f8 | 126 | <MediaCodec name="OMX.Exynos.avc.dec.secure" type="video/avc" > |
83dc35bd S |
127 | <Quirk name="requires-allocate-on-input-ports" /> |
128 | <Quirk name="requires-allocate-on-output-ports" /> | |
8c8508f8 | 129 | <Limit name="size" min="32x32" max="1920x1088" /> |
83dc35bd S |
130 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
131 | <Quirk name="video-controller-check-enable" /> | |
83dc35bd S |
132 | <Limit name="alignment" value="2x2" /> |
133 | <Limit name="block-size" value="16x16" /> | |
134 | <Limit name="blocks-per-second" min="1" max="244800" /> | |
135 | <Limit name="bitrate" range="1-20000000" /> | |
8c8508f8 | 136 | <Limit name="concurrent-instances" max="2" /> |
83dc35bd S |
137 | <Feature name="adaptive-playback" /> |
138 | <Feature name="secure-playback" required="true" /> | |
139 | </MediaCodec> | |
83dc35bd S |
140 | <MediaCodec name="OMX.Exynos.vp8.dec" type="video/x-vnd.on2.vp8" > |
141 | <Quirk name="requires-allocate-on-input-ports" /> | |
142 | <Quirk name="requires-allocate-on-output-ports" /> | |
143 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
144 | <Quirk name="video-controller-check-enable" /> | |
8c8508f8 | 145 | <Limit name="size" min="32x32" max="1920x1088" /> |
83dc35bd S |
146 | <Limit name="alignment" value="2x2" /> |
147 | <Limit name="block-size" value="16x16" /> | |
148 | <Limit name="blocks-per-second" min="1" max="244800" /> | |
149 | <Limit name="bitrate" range="1-20000000" /> | |
8c8508f8 | 150 | <Limit name="concurrent-instances" max="16" /> |
83dc35bd S |
151 | <Feature name="adaptive-playback" /> |
152 | </MediaCodec> | |
8c8508f8 S |
153 | <MediaCodec name="OMX.Exynos.vc1.dec" > |
154 | <Type name="video/wvc1" /> | |
155 | <Type name="video/x-ms-wmv" /> | |
83dc35bd S |
156 | <Quirk name="requires-allocate-on-input-ports" /> |
157 | <Quirk name="requires-allocate-on-output-ports" /> | |
158 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
159 | <Quirk name="video-controller-check-enable" /> | |
8c8508f8 S |
160 | <Limit name="size" min="32x32" max="1920x1088" /> |
161 | <Limit name="alignment" value="2x2" /> | |
162 | <Limit name="block-size" value="16x16" /> | |
163 | <Limit name="blocks-per-second" min="1" max="244800" /> | |
164 | <Limit name="bitrate" range="1-40000000" /> | |
83dc35bd | 165 | <Feature name="adaptive-playback" /> |
8c8508f8 | 166 | <Limit name="concurrent-instances" max="16"/> |
83dc35bd S |
167 | </MediaCodec> |
168 | ||
8c8508f8 | 169 | <!-- SEC Software --> |
83dc35bd | 170 | <MediaCodec name="OMX.SEC.h263.sw.dec" type="video/3gpp" > |
8c8508f8 | 171 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
83dc35bd S |
172 | </MediaCodec> |
173 | <MediaCodec name="OMX.SEC.avc.sw.dec" type="video/avc" > | |
174 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
175 | <Limit name="size" min="64x64" max="2048x2048" /> | |
176 | <Feature name="adaptive-playback" /> | |
177 | </MediaCodec> | |
178 | <MediaCodec name="OMX.SEC.mpeg4.sw.dec" type="video/mp4v-es" > | |
8c8508f8 | 179 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
83dc35bd S |
180 | </MediaCodec> |
181 | <MediaCodec name="OMX.SEC.vc1.sw.dec" > | |
182 | <Type name="video/wvc1" /> | |
183 | <Type name="video/x-ms-wmv" /> | |
8c8508f8 | 184 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
83dc35bd S |
185 | </MediaCodec> |
186 | <MediaCodec name="OMX.SEC.wmv7.dec" type="video/x-ms-wmv7" > | |
8c8508f8 | 187 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
83dc35bd S |
188 | </MediaCodec> |
189 | <MediaCodec name="OMX.SEC.wmv8.dec" type="video/x-ms-wmv8" > | |
8c8508f8 | 190 | <Quirk name="decoder-ignores-streamcorrupt-error" /> |
83dc35bd S |
191 | </MediaCodec> |
192 | <MediaCodec name="OMX.SEC.mp43.dec" type="video/mp43" > | |
193 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
194 | </MediaCodec> | |
195 | <MediaCodec name="OMX.SEC.vp8.dec" type="video/x-vnd.on2.vp8" > | |
196 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
197 | <Limit name="size" min="64x64" max="2048x2048" /> | |
198 | <Feature name="adaptive-playback" /> | |
199 | </MediaCodec> | |
83dc35bd S |
200 | </Decoders> |
201 | ||
202 | <Encoders> | |
203 | <MediaCodec name="OMX.Exynos.AVC.Encoder" type="video/avc" > | |
204 | <Quirk name="requires-allocate-on-input-ports" /> | |
205 | <Quirk name="requires-allocate-on-output-ports" /> | |
206 | <Quirk name="video-controller-check-enable" /> | |
8c8508f8 | 207 | <Limit name="size" min="32x32" max="1920x1088" /> |
83dc35bd S |
208 | <Limit name="alignment" value="2x2" /> |
209 | <Limit name="block-size" value="16x16" /> | |
8c8508f8 | 210 | <Limit name="blocks-per-second" min="1" max="983040" /> |
83dc35bd | 211 | <Limit name="bitrate" range="1-20000000" /> |
8c8508f8 | 212 | <Limit name="concurrent-instances" max="16" /> |
83dc35bd S |
213 | </MediaCodec> |
214 | <MediaCodec name="OMX.Exynos.H263.Encoder" type="video/3gpp" > | |
215 | <Quirk name="requires-allocate-on-input-ports" /> | |
216 | <Quirk name="requires-allocate-on-output-ports" /> | |
217 | <Quirk name="video-controller-check-enable" /> | |
8c8508f8 | 218 | <Limit name="size" min="32x32" max="1920x1080" /> |
83dc35bd S |
219 | <Limit name="alignment" value="4x4" /> |
220 | <Limit name="block-size" value="16x16" /> | |
8c8508f8 S |
221 | <Limit name="blocks-per-second" min="1" max="243000" /> |
222 | <Limit name="bitrate" range="1-20000000" /> | |
223 | <Limit name="concurrent-instances" max="16" /> | |
83dc35bd S |
224 | </MediaCodec> |
225 | <MediaCodec name="OMX.Exynos.MPEG4.Encoder" type="video/mp4v-es" > | |
226 | <Quirk name="requires-allocate-on-input-ports" /> | |
227 | <Quirk name="requires-allocate-on-output-ports" /> | |
228 | <Quirk name="video-controller-check-enable" /> | |
229 | <Limit name="size" min="32x32" max="1920x1080" /> | |
230 | <Limit name="alignment" value="2x2" /> | |
231 | <Limit name="block-size" value="16x16" /> | |
8c8508f8 S |
232 | <Limit name="blocks-per-second" min="1" max="243000" /> |
233 | <Limit name="bitrate" range="1-20000000" /> | |
234 | <Limit name="concurrent-instances" max="16" /> | |
235 | </MediaCodec> | |
236 | <MediaCodec name="OMX.Exynos.VP8.Encoder" type="video/x-vnd.on2.vp8" > | |
237 | <Quirk name="requires-allocate-on-input-ports" /> | |
238 | <Quirk name="requires-allocate-on-output-ports" /> | |
239 | <Quirk name="video-controller-check-enable" /> | |
240 | <Limit name="size" min="32x32" max="1920x1080" /> | |
241 | <Limit name="alignment" value="2x2" /> | |
242 | <Limit name="block-size" value="16x16" /> | |
243 | <Limit name="blocks-per-second" min="1" max="243000" /> | |
244 | <Limit name="bitrate" range="1-20000000" /> | |
245 | <Limit name="concurrent-instances" max="16" /> | |
83dc35bd S |
246 | </MediaCodec> |
247 | </Encoders> | |
248 | <Include href="media_codecs_google_video_le.xml" /> | |
8c8508f8 | 249 | <!-- sec sw hevc move behind google sw hevc --> |
83dc35bd S |
250 | <Decoders> |
251 | <MediaCodec name="OMX.SEC.hevc.sw.dec" type="video/hevc" > | |
252 | <Quirk name="decoder-ignores-streamcorrupt-error" /> | |
253 | <Limit name="size" min="64x64" max="1280x1280" /> | |
8c8508f8 | 254 | <Feature name="adaptive-playback" /> |
83dc35bd S |
255 | </MediaCodec> |
256 | </Decoders> | |
257 | <Include href="media_codecs_google_audio.xml" /> | |
258 | <Include href="media_codecs_google_telephony.xml" /> | |
259 | </MediaCodecs> |