Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [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 [ |
| 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> |
Eric Laurent | 06f9ceb | 2016-06-10 14:37:37 -0700 | [diff] [blame] | 79 | <Include href="media_codecs_google_audio.xml" /> |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 80 | <Decoders> |
John Stultz | 7eac282 | 2018-04-09 17:36:26 -0700 | [diff] [blame] | 81 | <MediaCodec name="OMX.hisi.video.decoder.avc" type="video/avc" > |
| 82 | <Quirk name="needs-flush-on-all-ports" /> |
| 83 | <Limit name="size" min="128x128" max="4096x2304" /> |
| 84 | <Limit name="alignment" value="2x2" /> |
| 85 | <Limit name="block-size" value="16x16" /> |
| 86 | <Limit name="blocks-per-second" min="1" max="972000" /> |
| 87 | <Limit name="bitrate" range="1-100000000" /> |
| 88 | <Feature name="adaptive-playback" /> |
| 89 | <Quirk name="requires-allocate-on-input-ports" /> |
| 90 | <Quirk name="requires-allocate-on-output-ports" /> |
| 91 | <Limit name="concurrent-instances" max="16" /> |
| 92 | </MediaCodec> |
| 93 | <MediaCodec name="OMX.hisi.video.decoder.hevc" type="video/hevc" > |
| 94 | <Quirk name="needs-flush-on-all-ports" /> |
| 95 | <Limit name="size" min="128x128" max="4096x2304" /> |
| 96 | <Limit name="alignment" value="2x2" /> |
| 97 | <Limit name="block-size" value="16x16" /> |
| 98 | <Limit name="block-count" range="64-36896" /> |
| 99 | <Limit name="blocks-per-second" range="99-1106880" /> |
| 100 | <Limit name="bitrate" range="1-52428800" /> |
| 101 | <Feature name="adaptive-playback" /> |
| 102 | <Quirk name="requires-allocate-on-input-ports" /> |
| 103 | <Quirk name="requires-allocate-on-output-ports" /> |
| 104 | <Limit name="concurrent-instances" max="16" /> |
| 105 | </MediaCodec> |
| 106 | <MediaCodec name="OMX.hisi.video.decoder.mpeg4" type="video/mp4v-es" > |
| 107 | <Quirk name="needs-flush-on-all-ports" /> |
| 108 | <Limit name="size" min="128x128" max="1920x1088" /> |
| 109 | <Limit name="alignment" value="2x2" /> |
| 110 | <Limit name="block-size" value="16x16" /> |
| 111 | <Limit name="blocks-per-second" range="99-244800" /> |
| 112 | <Limit name="bitrate" range="1-60000000" /> |
| 113 | <Feature name="adaptive-playback" /> |
| 114 | <Quirk name="requires-allocate-on-input-ports" /> |
| 115 | <Quirk name="requires-allocate-on-output-ports" /> |
| 116 | <Limit name="concurrent-instances" max="16" /> |
| 117 | </MediaCodec> |
| 118 | <MediaCodec name="OMX.hisi.video.decoder.mpeg2" > |
| 119 | <Quirk name="needs-flush-on-all-ports" /> |
| 120 | <Limit name="size" min="128x128" max="1920x1088" /> |
| 121 | <Limit name="alignment" value="2x2" /> |
| 122 | <Limit name="block-size" value="16x16" /> |
| 123 | <Limit name="blocks-per-second" range="99-244800" /> |
| 124 | <Limit name="bitrate" range="1-60000000" /> |
| 125 | <Feature name="adaptive-playback" /> |
| 126 | <Quirk name="requires-allocate-on-input-ports" /> |
| 127 | <Quirk name="requires-allocate-on-output-ports" /> |
| 128 | <Limit name="concurrent-instances" max="16" /> |
| 129 | <Type name="video/mpeg2"> |
| 130 | <Limit name="concurrent-instances" max="16" /> |
| 131 | </Type> |
| 132 | <Type name="video/mpeg"> |
| 133 | <Limit name="concurrent-instances" max="16" /> |
| 134 | </Type> |
| 135 | </MediaCodec> |
| 136 | <MediaCodec name="OMX.hisi.video.decoder.vp8" type="video/x-vnd.on2.vp8" > |
| 137 | <Limit name="size" min="128x128" max="1920x1088" /> |
| 138 | <Quirk name="needs-flush-on-all-ports" /> |
| 139 | <Quirk name="requires-allocate-on-input-ports" /> |
| 140 | <Quirk name="requires-allocate-on-output-ports" /> |
| 141 | <Feature name="adaptive-playback" /> |
| 142 | <Limit name="concurrent-instances" max="16" /> |
| 143 | </MediaCodec> |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 144 | <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" /> |
| 145 | <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" /> |
| 146 | <MediaCodec name="OMX.google.h264.decoder" type="video/avc" /> |
| 147 | <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" /> |
| 148 | <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" /> |
| 149 | </Decoders> |
| 150 | |
| 151 | <Encoders> |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 152 | <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" /> |
| 153 | <MediaCodec name="OMX.google.h264.encoder" type="video/avc" /> |
| 154 | <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" /> |
Vishal Bhoj | e72c920 | 2015-10-23 18:10:21 +0100 | [diff] [blame] | 155 | <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" /> |
| 156 | </Encoders> |
| 157 | </MediaCodecs> |