Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8" ?> |
| 2 | <!-- Copyright 2013 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 | |
Lajos Molnar | 69720e5 | 2014-08-12 17:40:04 -0700 | [diff] [blame] | 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 | |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 81 | <MediaCodecs> |
Lajos Molnar | 69720e5 | 2014-08-12 17:40:04 -0700 | [diff] [blame] | 82 | <Include href="media_codecs_google_audio.xml" /> |
| 83 | <Include href="media_codecs_google_telephony.xml" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 84 | <Encoders> |
| 85 | <MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" > |
| 86 | <Quirk name="requires-allocate-on-input-ports" /> |
| 87 | <Quirk name="requires-allocate-on-output-ports"/> |
| 88 | <Quirk name="requires-loaded-to-idle-after-allocation"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 89 | <Limit name="size" min="96x64" max="1920x1088" /> |
| 90 | <Limit name="alignment" value="2x2" /> |
| 91 | <Limit name="block-size" value="16x16" /> |
| 92 | <Limit name="blocks-per-second" min="1" max="489600" /> |
| 93 | <Limit name="bitrate" range="1-60000000" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 94 | </MediaCodec> |
| 95 | <MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" > |
| 96 | <Quirk name="requires-allocate-on-input-ports" /> |
| 97 | <Quirk name="requires-allocate-on-output-ports"/> |
| 98 | <Quirk name="requires-loaded-to-idle-after-allocation"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 99 | <Limit name="size" min="96x64" max="720x576" /> |
| 100 | <Limit name="alignment" value="2x2" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 101 | </MediaCodec> |
| 102 | <MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" > |
| 103 | <Quirk name="requires-allocate-on-input-ports" /> |
| 104 | <Quirk name="requires-allocate-on-output-ports"/> |
| 105 | <Quirk name="requires-loaded-to-idle-after-allocation"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 106 | <Limit name="size" min="96x64" max="4096x2160" /> |
| 107 | <Limit name="alignment" value="2x2" /> |
| 108 | <Limit name="block-size" value="16x16" /> |
| 109 | <Limit name="blocks-per-second" min="1" max="972000" /> |
| 110 | <Limit name="bitrate" range="1-100000000" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 111 | </MediaCodec> |
| 112 | <MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" > |
| 113 | <Quirk name="requires-allocate-on-input-ports" /> |
| 114 | <Quirk name="requires-allocate-on-output-ports"/> |
| 115 | <Quirk name="requires-loaded-to-idle-after-allocation"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 116 | <Limit name="size" min="96x64" max="3840x2160" /> |
| 117 | <Limit name="alignment" value="2x2" /> |
| 118 | <Limit name="block-size" value="16x16" /> |
| 119 | <Limit name="blocks-per-second" min="1" max="777600" /> |
| 120 | <Limit name="bitrate" range="1-20000000" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 121 | </MediaCodec> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 122 | </Encoders> |
| 123 | <Decoders> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 124 | <MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" > |
| 125 | <Quirk name="requires-allocate-on-input-ports" /> |
| 126 | <Quirk name="requires-allocate-on-output-ports"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 127 | <Limit name="size" min="64x64" max="4096x2160" /> |
| 128 | <Limit name="alignment" value="2x2" /> |
| 129 | <Limit name="block-size" value="16x16" /> |
| 130 | <Limit name="blocks-per-second" min="1" max="972000" /> |
| 131 | <Limit name="bitrate" range="1-100000000" /> |
| 132 | <Feature name="adaptive-playback" /> |
| 133 | </MediaCodec> |
| 134 | <MediaCodec name="OMX.qcom.video.decoder.avc.secure" type="video/avc" > |
| 135 | <Quirk name="requires-allocate-on-input-ports" /> |
| 136 | <Quirk name="requires-allocate-on-output-ports"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 137 | <Limit name="size" min="64x64" max="4096x2160" /> |
| 138 | <Limit name="alignment" value="2x2" /> |
| 139 | <Limit name="block-size" value="16x16" /> |
| 140 | <Limit name="blocks-per-second" min="1" max="972000" /> |
| 141 | <Limit name="bitrate" range="1-100000000" /> |
| 142 | <Feature name="adaptive-playback" /> |
| 143 | <Feature name="secure-playback" required="true" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 144 | </MediaCodec> |
| 145 | <MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" > |
| 146 | <Quirk name="requires-allocate-on-input-ports" /> |
| 147 | <Quirk name="requires-allocate-on-output-ports"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 148 | <Limit name="size" min="64x64" max="1920x1088" /> |
| 149 | <Limit name="alignment" value="2x2" /> |
| 150 | <Limit name="block-size" value="16x16" /> |
| 151 | <Limit name="blocks-per-second" min="1" max="489600" /> |
| 152 | <Limit name="bitrate" range="1-60000000" /> |
| 153 | <Feature name="adaptive-playback" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 154 | </MediaCodec> |
| 155 | <MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" > |
| 156 | <Quirk name="requires-allocate-on-input-ports" /> |
| 157 | <Quirk name="requires-allocate-on-output-ports"/> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 158 | <Limit name="size" min="64x64" max="720x576" /> |
| 159 | <Limit name="alignment" value="2x2" /> |
| 160 | <Feature name="adaptive-playback" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 161 | </MediaCodec> |
| 162 | <MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" > |
| 163 | <Quirk name="requires-allocate-on-input-ports" /> |
| 164 | <Quirk name="requires-allocate-on-output-ports" /> |
Lajos Molnar | 3b1398e | 2014-08-13 18:40:57 -0700 | [diff] [blame] | 165 | <Limit name="size" min="64x64" max="3840x2160" /> |
| 166 | <Limit name="alignment" value="2x2" /> |
| 167 | <Limit name="block-size" value="16x16" /> |
| 168 | <Limit name="blocks-per-second" min="1" max="777600" /> |
| 169 | <Limit name="bitrate" range="1-20000000" /> |
| 170 | <Feature name="adaptive-playback" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 171 | </MediaCodec> |
Praveen Chavan | 1c779d2 | 2014-10-03 15:54:20 -0700 | [diff] [blame] | 172 | <MediaCodec name="OMX.qcom.video.decoder.hevc" type="video/hevc" > |
| 173 | <Quirk name="requires-allocate-on-input-ports" /> |
| 174 | <Quirk name="requires-allocate-on-output-ports" /> |
| 175 | <Limit name="size" min="64x64" max="3840x2160" /> |
| 176 | <Limit name="alignment" value="2x2" /> |
| 177 | <Limit name="block-size" value="16x16" /> |
| 178 | <Limit name="blocks-per-second" min="1" max="777600" /> |
| 179 | <Limit name="bitrate" range="1-20000000" /> |
| 180 | <Feature name="adaptive-playback" /> |
| 181 | </MediaCodec> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 182 | </Decoders> |
Lajos Molnar | 69720e5 | 2014-08-12 17:40:04 -0700 | [diff] [blame] | 183 | <Include href="media_codecs_google_video.xml" /> |
Vineeta Srivastava | 8cc76b4 | 2014-05-09 10:53:46 -0700 | [diff] [blame] | 184 | </MediaCodecs> |