blob: 0ffad5bf0fe7c8d4e5346aa76f7e78d64c97c41c [file] [log] [blame]
Jiho Chang502ad5d2012-06-05 09:10:01 +00001<?xml version="1.0" encoding="utf-8" ?>
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -07002<!-- 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 [
Lajos Molnar5fd81eb2014-03-19 14:43:16 -070019<!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)*>
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -070025<!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
33There's a simple and a complex syntax to declare the availability of a
34media codec:
35
36A codec that properly follows the OpenMax spec and therefore doesn't have any
37quirks and that only supports a single content type can be declared like so:
38
39 <MediaCodec name="OMX.foo.bar" type="something/interesting" />
40
41If a codec has quirks OR supports multiple content types, the following syntax
42can 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
53Only 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>
Lajos Molnar5fd81eb2014-03-19 14:43:16 -070081 <Include href="media_codecs_google_audio.xml" />
82 <Include href="media_codecs_google_telephony.xml" />
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -070083 <Decoders>
Jiho Changbefcf4c2012-06-05 10:44:36 +000084 <MediaCodec name="OMX.Exynos.MPEG4.Decoder" type="video/mp4v-es" >
85 <Quirk name="requires-allocate-on-input-ports" />
86 <Quirk name="requires-allocate-on-output-ports" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -070087 <Limit name="size" min="32x32" max="1920x1088" />
88 <Limit name="alignment" value="2x2" />
89 <Limit name="block-size" value="16x16" />
90 <Limit name="blocks-per-second" min="1" max="489600" />
91 <Limit name="bitrate" range="1-80000000" />
92 <Feature name="adaptive-playback" />
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -070093 </MediaCodec>
Jiho Changbefcf4c2012-06-05 10:44:36 +000094 <MediaCodec name="OMX.Exynos.H263.Decoder" type="video/3gpp" >
95 <Quirk name="requires-allocate-on-input-ports" />
96 <Quirk name="requires-allocate-on-output-ports" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -070097 <Limit name="size" min="32x32" max="1088x1152" />
98 <Limit name="alignment" value="2x2" />
99 <Limit name="block-size" value="16x16" />
100 <Limit name="blocks-per-second" min="1" max="489600" />
101 <Limit name="bitrate" range="1-80000000" />
102 <Feature name="adaptive-playback" />
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -0700103 </MediaCodec>
Jiho Changbefcf4c2012-06-05 10:44:36 +0000104 <MediaCodec name="OMX.Exynos.AVC.Decoder" type="video/avc" >
105 <Quirk name="requires-allocate-on-input-ports" />
106 <Quirk name="requires-allocate-on-output-ports" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -0700107 <Limit name="size" min="32x32" max="8192x8192" />
108 <Limit name="alignment" value="2x2" />
109 <Limit name="block-size" value="16x16" />
110 <Limit name="blocks-per-second" min="1" max="489600" />
111 <Limit name="bitrate" range="1-80000000" />
112 <Feature name="adaptive-playback" />
113 </MediaCodec>
114 <MediaCodec name="OMX.Exynos.AVC.Decoder.secure" type="video/avc" >
115 <Quirk name="requires-allocate-on-input-ports" />
116 <Quirk name="requires-allocate-on-output-ports" />
117 <Limit name="size" min="32x32" max="1920x1088" />
118 <Limit name="alignment" value="2x2" />
119 <Limit name="block-size" value="16x16" />
120 <Limit name="blocks-per-second" min="1" max="489600" />
121 <Limit name="bitrate" range="1-80000000" />
122 <Feature name="adaptive-playback" />
123 <Feature name="secure-playback" required="true" />
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -0700124 </MediaCodec>
Dima Zavin842cb0f2012-06-13 16:47:20 -0700125 <MediaCodec name="OMX.Exynos.VP8.Decoder" type="video/x-vnd.on2.vp8" >
126 <Quirk name="requires-allocate-on-input-ports" />
127 <Quirk name="requires-allocate-on-output-ports" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -0700128 <Limit name="size" min="32x32" max="8192x8192" />
129 <Limit name="alignment" value="2x2" />
130 <Limit name="block-size" value="16x16" />
131 <Limit name="blocks-per-second" min="1" max="489600" />
132 <Limit name="bitrate" range="1-80000000" />
133 <Feature name="adaptive-playback" />
Dima Zavin842cb0f2012-06-13 16:47:20 -0700134 </MediaCodec>
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -0700135 </Decoders>
136
137 <Encoders>
SeungBeom Kimbc2e2ad2012-07-21 09:09:00 +0900138 <MediaCodec name="OMX.Exynos.AVC.Encoder" type="video/avc" >
139 <Quirk name="requires-allocate-on-input-ports" />
140 <Quirk name="requires-allocate-on-output-ports" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -0700141 <Limit name="size" min="32x32" max="8192x8192" />
142 <Limit name="alignment" value="2x2" />
143 <Limit name="block-size" value="16x16" />
144 <Limit name="blocks-per-second" min="1" max="489600" />
145 <Limit name="bitrate" range="1-40000000" />
SeungBeom Kimbc2e2ad2012-07-21 09:09:00 +0900146 </MediaCodec>
147 <MediaCodec name="OMX.Exynos.H263.Encoder" type="video/3gpp" >
148 <Quirk name="requires-allocate-on-input-ports" />
149 <Quirk name="requires-allocate-on-output-ports" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -0700150 <Limit name="size" min="32x32" max="1088x1152" />
Ronghua Wu118a1212015-01-21 15:24:34 -0800151 <Limit name="alignment" value="4x4" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -0700152 <Limit name="block-size" value="16x16" />
153 <Limit name="blocks-per-second" min="1" max="489600" />
154 <Limit name="bitrate" range="1-40000000" />
SeungBeom Kimbc2e2ad2012-07-21 09:09:00 +0900155 </MediaCodec>
156 <MediaCodec name="OMX.Exynos.MPEG4.Encoder" type="video/mp4v-es" >
157 <Quirk name="requires-allocate-on-input-ports" />
158 <Quirk name="requires-allocate-on-output-ports" />
Lajos Molnar61bb4af2014-08-19 18:11:29 -0700159 <Limit name="size" min="32x32" max="1920x1088" />
160 <Limit name="alignment" value="2x2" />
161 <Limit name="block-size" value="16x16" />
162 <Limit name="blocks-per-second" min="1" max="489600" />
163 <Limit name="bitrate" range="1-40000000" />
SeungBeom Kimbc2e2ad2012-07-21 09:09:00 +0900164 </MediaCodec>
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -0700165 </Encoders>
Lajos Molnar5fd81eb2014-03-19 14:43:16 -0700166 <Include href="media_codecs_google_video.xml" />
Rebecca Schultz Zavinc2c95e12012-04-04 16:26:48 -0700167</MediaCodecs>