ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 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 [ |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 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)*> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 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 | |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 53 | Only the three quirks included above are recognized at this point: |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 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 | |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 78 | |
| 79 | --> |
| 80 | |
| 81 | <MediaCodecs> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 82 | <Include href="media_codecs_google_audio.xml" /> |
| 83 | |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 84 | <Decoders> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 85 | <MediaCodec name="OMX.Intel.VideoDecoder.MPEG4" type="video/mp4v-es"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 86 | <Limit name="size" min="96x32" max="1920x1088" /> |
| 87 | <Limit name="alignment" value="2x2" /> |
| 88 | <Limit name="block-size" value="16x16" /> |
| 89 | <Limit name="blocks-per-second" range="12-244800" /> |
| 90 | <Limit name="bitrate" range="1-20000000" /> |
| 91 | <Feature name="adaptive-playback" optional="yes" /> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 92 | </MediaCodec> |
| 93 | <MediaCodec name="OMX.Intel.VideoDecoder.H263" type="video/3gpp"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 94 | <Limit name="size" min="96x32" max="720x576" /> |
| 95 | <Limit name="alignment" value="2x2" /> |
| 96 | <Limit name="block-size" value="16x16" /> |
| 97 | <Limit name="blocks-per-second" range="12-48600" /> |
| 98 | <Limit name="bitrate" range="1-16000000" /> |
| 99 | <Feature name="adaptive-playback" optional="yes" /> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 100 | </MediaCodec> |
| 101 | <MediaCodec name="OMX.Intel.VideoDecoder.AVC" type="video/avc"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 102 | <Limit name="size" min="96x32" max="2560x1440" /> |
| 103 | <Limit name="alignment" value="2x2" /> |
| 104 | <Limit name="block-size" value="16x16" /> |
| 105 | <Limit name="blocks-per-second" range="12-864000" /> |
| 106 | <Limit name="bitrate" range="1-50000000" /> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 107 | <Feature name="adaptive-playback" /> |
| 108 | </MediaCodec> |
| 109 | <MediaCodec name="OMX.Intel.VideoDecoder.AVC.secure" type="video/avc"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 110 | <Limit name="size" min="96x32" max="1920x1088" /> |
| 111 | <Limit name="alignment" value="2x2" /> |
| 112 | <Limit name="block-size" value="16x16" /> |
Yuanjun Huang | 405541b | 2015-01-16 02:14:08 +0800 | [diff] [blame] | 113 | <Limit name="blocks-per-second" range="12-522240" /> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 114 | <Limit name="bitrate" range="1-50000000" /> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 115 | <Feature name="adaptive-playback" /> |
| 116 | <Feature name="secure-playback" required="true" /> |
| 117 | </MediaCodec> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 118 | <MediaCodec name="OMX.Intel.VideoDecoder.VP8" type="video/x-vnd.on2.vp8"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 119 | <Limit name="size" min="96x32" max="1920x1088" /> |
| 120 | <Limit name="alignment" value="2x2" /> |
| 121 | <Limit name="block-size" value="16x16" /> |
| 122 | <Limit name="blocks-per-second" range="12-489600" /> |
| 123 | <Limit name="bitrate" range="1-50000000" /> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 124 | <Feature name="adaptive-playback" /> |
| 125 | </MediaCodec> |
ywan171 | 5ab046c | 2014-11-14 16:12:58 +0800 | [diff] [blame] | 126 | <MediaCodec name="OMX.Intel.VideoDecoder.VP9.hybrid" type="video/x-vnd.on2.vp9"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 127 | <Limit name="size" min="16x16" max="1920x1088" /> |
| 128 | <Limit name="alignment" value="2x2" /> |
| 129 | <Limit name="block-size" value="16x16" /> |
| 130 | <Limit name="blocks-per-second" range="1-244800" /> |
| 131 | <Limit name="bitrate" range="1-8000000" /> |
ywan171 | 5ab046c | 2014-11-14 16:12:58 +0800 | [diff] [blame] | 132 | <Feature name="adaptive-playback" /> |
| 133 | </MediaCodec> |
Lajos Molnar | 3677dd8 | 2015-02-05 18:41:54 -0800 | [diff] [blame] | 134 | <!-- |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 135 | <MediaCodec name="OMX.Intel.VideoDecoder.VP9.hwr" type="video/x-vnd.on2.vp9"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 136 | <Limit name="size" min="16x16" max="1920x1088" /> |
| 137 | <Limit name="alignment" value="2x2" /> |
| 138 | <Limit name="block-size" value="16x16" /> |
| 139 | <Limit name="blocks-per-second" range="1-244800" /> |
| 140 | <Limit name="bitrate" range="1-8000000" /> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 141 | <Feature name="adaptive-playback" /> |
| 142 | </MediaCodec> |
Lajos Molnar | 3677dd8 | 2015-02-05 18:41:54 -0800 | [diff] [blame] | 143 | --> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 144 | <MediaCodec name="OMX.Intel.sw_vd.h265" type="video/hevc"> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 145 | <Limit name="size" min="16x16" max="1920x1088" /> |
| 146 | <Limit name="alignment" value="2x2" /> |
| 147 | <Limit name="block-size" value="16x16" /> |
| 148 | <Limit name="blocks-per-second" range="1-244800" /> |
| 149 | <Limit name="bitrate" range="1-8000000" /> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 150 | <Feature name="adaptive-playback" /> |
| 151 | </MediaCodec> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 152 | |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 153 | <MediaCodec name="OMX.Intel.alac.decoder" type="audio/alac" /> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 154 | </Decoders> |
| 155 | |
| 156 | <Encoders> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 157 | <MediaCodec name="OMX.Intel.VideoEncoder.AVC" type="video/avc" > |
| 158 | <Quirk name="requires-allocate-on-input-ports" /> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 159 | <Limit name="size" min="176x144" max="1920x1088" /> |
| 160 | <Limit name="alignment" value="8x8" /> |
| 161 | <Limit name="block-size" value="16x16" /> |
| 162 | <Limit name="frame-rate" range="1-60" /> |
| 163 | <Limit name="bitrate" range="1-50000000" /> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 164 | </MediaCodec> |
| 165 | <MediaCodec name="OMX.Intel.VideoEncoder.VP8" type="video/x-vnd.on2.vp8" > |
| 166 | <Quirk name="requires-allocate-on-input-ports" /> |
hding3 | 69b346e | 2014-12-15 17:50:14 +0800 | [diff] [blame] | 167 | <Limit name="size" min="176x144" max="1920x1088" /> |
| 168 | <Limit name="alignment" value="8x8" /> |
| 169 | <Limit name="block-size" value="16x16" /> |
| 170 | <Limit name="frame-rate" range="1-30" /> |
| 171 | <Limit name="bitrate" range="1-10000000" /> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 172 | </MediaCodec> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 173 | </Encoders> |
Lajos Molnar | 3f364c5 | 2014-08-11 16:01:42 -0700 | [diff] [blame] | 174 | |
| 175 | <Include href="media_codecs_google_video.xml" /> |
ywan171 | ee4044e | 2014-07-17 19:11:50 +0800 | [diff] [blame] | 176 | </MediaCodecs> |