Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [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 | 4389f09 | 2014-03-19 14:45:02 -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)*> |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [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 | |
| 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 | <MediaCodecs> |
Lajos Molnar | 4389f09 | 2014-03-19 14:45:02 -0700 | [diff] [blame] | 81 | <Include href="media_codecs_google_audio.xml" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 82 | <Settings> |
| 83 | <Setting name="max-video-encoder-input-buffers" value="6" /> |
| 84 | </Settings> |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 85 | <Decoders> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 86 | <MediaCodec name="OMX.Nvidia.mp4.decode" type="video/mp4v-es" > |
| 87 | <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="244800" /> |
| 91 | <Limit name="bitrate" range="1-10000000" /> |
| 92 | <Feature name="adaptive-playback" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 93 | <Limit name="concurrent-instances" max="32" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 94 | </MediaCodec> |
| 95 | <MediaCodec name="OMX.Nvidia.h263.decode" type="video/3gpp" > |
| 96 | <Limit name="size" min="32x32" max="720x576" /> |
| 97 | <Limit name="alignment" value="2x2" /> |
| 98 | <Feature name="adaptive-playback" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 99 | <Limit name="concurrent-instances" max="32" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 100 | </MediaCodec> |
| 101 | <MediaCodec name="OMX.Nvidia.h264.decode" type="video/avc" > |
| 102 | <Limit name="size" min="32x32" max="3840x2176" /> |
| 103 | <Limit name="alignment" value="2x2" /> |
| 104 | <Limit name="block-size" value="16x16" /> |
| 105 | <Limit name="blocks-per-second" min="1" max="783360" /> |
| 106 | <Limit name="bitrate" range="1-62500000" /> |
| 107 | <Feature name="adaptive-playback" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 108 | <Limit name="concurrent-instances" max="32" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 109 | </MediaCodec> |
| 110 | <MediaCodec name="OMX.Nvidia.h264.decode.secure" type="video/avc" > |
| 111 | <Limit name="size" min="32x32" max="3840x2176" /> |
| 112 | <Limit name="alignment" value="2x2" /> |
| 113 | <Limit name="block-size" value="16x16" /> |
| 114 | <Limit name="blocks-per-second" min="1" max="783360" /> |
| 115 | <Limit name="bitrate" range="1-62500000" /> |
| 116 | <Feature name="adaptive-playback" /> |
| 117 | <Feature name="secure-playback" required="true" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 118 | <Limit name="concurrent-instances" max="32" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 119 | </MediaCodec> |
| 120 | <MediaCodec name="OMX.Nvidia.mpeg2v.decode" type="video/mpeg2" > |
| 121 | <Limit name="size" min="32x32" max="3840x2176" /> |
| 122 | <Limit name="alignment" value="2x2" /> |
| 123 | <Limit name="block-size" value="16x16" /> |
| 124 | <Limit name="blocks-per-second" min="1" max="783360" /> |
| 125 | <Limit name="bitrate" range="1-62500000" /> |
| 126 | <Feature name="adaptive-playback" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 127 | <Limit name="concurrent-instances" max="32" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 128 | </MediaCodec> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 129 | <MediaCodec name="OMX.Nvidia.vp8.decode" type="video/x-vnd.on2.vp8" > |
| 130 | <Limit name="size" min="32x32" max="3840x2176" /> |
| 131 | <Limit name="alignment" value="2x2" /> |
| 132 | <Limit name="block-size" value="16x16" /> |
| 133 | <Limit name="blocks-per-second" min="1" max="783360" /> |
| 134 | <Limit name="bitrate" range="1-62500000" /> |
| 135 | <Feature name="adaptive-playback" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 136 | <Limit name="concurrent-instances" max="32" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 137 | </MediaCodec> |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 138 | </Decoders> |
| 139 | |
| 140 | <Encoders> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 141 | <MediaCodec name="OMX.Nvidia.h264.encoder" type="video/avc" > |
| 142 | <Limit name="size" min="48x48" max="3840x2176" /> |
| 143 | <Limit name="alignment" value="2x2" /> |
| 144 | <Limit name="block-size" value="16x16" /> |
| 145 | <Limit name="blocks-per-second" min="1" max="783360" /> |
| 146 | <Limit name="bitrate" range="1-50000000" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 147 | <Limit name="concurrent-instances" max="32" /> |
Parag Mehendale | 38a0d6d | 2016-06-08 15:14:11 -0700 | [diff] [blame] | 148 | <Feature name="intra-refresh" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 149 | </MediaCodec> |
| 150 | <MediaCodec name="OMX.Nvidia.vp8.encoder" type="video/x-vnd.on2.vp8" > |
| 151 | <Limit name="size" min="48x48" max="3840x2176" /> |
| 152 | <Limit name="alignment" value="2x2" /> |
| 153 | <Limit name="block-size" value="16x16" /> |
| 154 | <Limit name="blocks-per-second" min="1" max="783360" /> |
| 155 | <Limit name="bitrate" range="1-50000000" /> |
Ronghua Wu | 90ab40f | 2015-06-25 15:50:17 -0700 | [diff] [blame] | 156 | <Limit name="concurrent-instances" max="32" /> |
Lajos Molnar | 4bc01f8 | 2014-08-13 20:07:33 -0700 | [diff] [blame] | 157 | </MediaCodec> |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 158 | </Encoders> |
Lajos Molnar | 4389f09 | 2014-03-19 14:45:02 -0700 | [diff] [blame] | 159 | <Include href="media_codecs_google_video.xml" /> |
Yogesh Agrawal | 9240c1a | 2013-10-16 15:13:32 +0530 | [diff] [blame] | 160 | </MediaCodecs> |