blob: 8365f964521ab1e67987143cca5c161bb7f849aa
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.vc1.decoder.awesome" type="video/vc1" > |
81 | <Limit name="size" min="64x64" max="1920x1088" /> |
82 | <Limit name="alignment" value="2x2" /> |
83 | <Limit name="block-size" value="16x16" /> |
84 | <Limit name="blocks-per-second" min="1" max="" /> |
85 | <Limit name="bitrate" range="1-300000000" /> |
86 | <Feature name="adaptive-playback" /> |
87 | <Limit name="concurrent-instances" max="1" /> |
88 | </MediaCodec> |
89 | <MediaCodec name="OMX.amlogic.wvc1.decoder.awesome" type="video/wvc1" > |
90 | <Limit name="size" min="64x64" max="1920x1088" /> |
91 | <Limit name="alignment" value="2x2" /> |
92 | <Limit name="block-size" value="16x16" /> |
93 | <Limit name="blocks-per-second" min="1" max="" /> |
94 | <Limit name="bitrate" range="1-300000000" /> |
95 | <Feature name="adaptive-playback" /> |
96 | <Limit name="concurrent-instances" max="1" /> |
97 | </MediaCodec> |
98 | <MediaCodec name="OMX.amlogic.wmv3.decoder.awesome" type="video/wmv3" > |
99 | <Limit name="size" min="64x64" max="1920x1088" /> |
100 | <Limit name="alignment" value="2x2" /> |
101 | <Limit name="block-size" value="16x16" /> |
102 | <Limit name="blocks-per-second" min="1" max="972000" /> |
103 | <Limit name="bitrate" range="1-300000000" /> |
104 | <Feature name="adaptive-playback" /> |
105 | <Limit name="concurrent-instances" max="1" /> |
106 | </MediaCodec> |
107 | <MediaCodec name="OMX.amlogic.mswmv3.decoder.awesome" type="video/x-ms-wmv" > |
108 | <Limit name="size" min="64x64" max="1920x1088" /> |
109 | <Limit name="alignment" value="2x2" /> |
110 | <Limit name="block-size" value="16x16" /> |
111 | <Limit name="blocks-per-second" min="1" max="972000" /> |
112 | <Limit name="bitrate" range="1-300000000" /> |
113 | <Feature name="adaptive-playback" /> |
114 | </MediaCodec> |
115 | <MediaCodec name="OMX.amlogic.mjpeg.decoder.awesome" type="video/mjpeg" > |
116 | <Limit name="size" min="64x64" max="1920x1088" /> |
117 | <Limit name="alignment" value="2x2" /> |
118 | <Limit name="block-size" value="16x16" /> |
119 | <Limit name="blocks-per-second" min="1" max="972000" /> |
120 | <Limit name="bitrate" range="1-300000000" /> |
121 | <Feature name="adaptive-playback" /> |
122 | <Limit name="concurrent-instances" max="1" /> |
123 | </MediaCodec> |
124 | <MediaCodec name="OMX.amlogic.avs.decoder.awesome" type="video/avs" > |
125 | <Limit name="size" min="64x64" max="1920x1088" /> |
126 | <Limit name="alignment" value="2x2" /> |
127 | <Limit name="block-size" value="16x16" /> |
128 | <Limit name="blocks-per-second" min="1" max="972000" /> |
129 | <Limit name="bitrate" range="1-300000000" /> |
130 | <Feature name="adaptive-playback" /> |
131 | <Limit name="concurrent-instances" max="1" /> |
132 | </MediaCodec> |
133 | <MediaCodec name="OMX.amlogic.vp6a.decoder.sw" type="video/x-vnd.on2.vp6a" /> |
134 | <MediaCodec name="OMX.amlogic.vp6f.decoder.sw" type="video/x-vnd.on2.vp6f" /> |
135 | <MediaCodec name="OMX.amlogic.rm10.decoder.sw" type="video/rm10" /> |
136 | <MediaCodec name="OMX.amlogic.rm20.decoder.sw" type="video/rm20" /> |
137 | <MediaCodec name="OMX.amlogic.rm30.decoder.sw" type="video/rm30" /> |
138 | <MediaCodec name="OMX.amlogic.rm40.decoder.sw" type="video/rm40" /> |
139 | <MediaCodec name="OMX.amlogic.wmv2.decoder.sw" type="video/wmv2" /> |
140 | <MediaCodec name="OMX.amlogic.wmv1.decoder.sw" type="video/wmv1" /> |
141 | <MediaCodec name="OMX.amlogic.vp8.decoder.sw" type="video/x-vnd.on2.vp8"> |
142 | <Limit name="size" min="2x2" max="2048x2048" /> |
143 | <Limit name="alignment" value="2x2" /> |
144 | <Limit name="block-size" value="16x16" /> |
145 | <Limit name="block-count" range="1-8160" /> |
146 | <Limit name="blocks-per-second" range="1-500000" /> |
147 | <Limit name="bitrate" range="1-40000000" /> |
148 | <Feature name="adaptive-playback" /> |
149 | </MediaCodec> |
150 | <MediaCodec name="OMX.amlogic.audio.decoder.ffmpeg" type="audio/ffmpeg" /> |
151 | </Decoders> |
152 | |
153 | </MediaCodecs> |
154 |