OSDN Git Service

09f4bcdf104e8bbee233453dc4d18cf1df60e999
[android-x86/external-stagefright-plugins.git] / config / media_codecs.xml
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.TI.DUCATI1.VIDEO.DECODER" >
81             <Type name="video/mp4v-es" />
82             <Type name="video/3gpp" />
83             <Type name="video/avc" />
84             <Quirk name="requires-allocate-on-input-ports" />
85             <Quirk name="requires-allocate-on-output-ports" />
86         </MediaCodec>
87
88         <!-- ffmpeg video codec -->
89         <MediaCodec name="OMX.ffmpeg.mpeg2v.decoder" type="video/mpeg2" />
90         <MediaCodec name="OMX.ffmpeg.h263.decoder"   type="video/3gpp" />
91         <MediaCodec name="OMX.ffmpeg.mpeg4.decoder"  type="video/mp4v-es" />
92         <MediaCodec name="OMX.ffmpeg.wmv.decoder"    type="video/x-ms-wmv" />
93         <MediaCodec name="OMX.ffmpeg.rv.decoder"     type="video/vnd.rn-realvideo" />
94         <MediaCodec name="OMX.ffmpeg.h264.decoder"   type="video/avc" />
95         <MediaCodec name="OMX.ffmpeg.vpx.decoder"    type="video/x-vnd.on2.vp8" />
96         <MediaCodec name="OMX.ffmpeg.vc1.decoder"    type="video/vc1" />
97         <MediaCodec name="OMX.ffmpeg.flv1.decoder"    type="video/x-flv" />
98         <MediaCodec name="OMX.ffmpeg.divx.decoder"    type="video/divx" />
99         <MediaCodec name="OMX.ffmpeg.vtrial.decoder" type="video/ffmpeg" />
100
101         <!-- ffmpeg audio codec -->
102         <MediaCodec name="OMX.ffmpeg.aac.decoder"    type="audio/mp4a-latm" />
103         <MediaCodec name="OMX.ffmpeg.mp3.decoder"    type="audio/mpeg" />
104         <!--MediaCodec name="OMX.ffmpeg.vorbis.decoder"    type="audio/vorbis" /-->
105         <MediaCodec name="OMX.ffmpeg.wma.decoder"    type="audio/x-ms-wma" />
106         <MediaCodec name="OMX.ffmpeg.ra.decoder"     type="audio/vnd.rn-realaudio" />
107         <MediaCodec name="OMX.ffmpeg.flac.decoder"   type="audio/flac" />
108         <MediaCodec name="OMX.ffmpeg.mp2.decoder"    type="audio/mpeg-L2" />
109         <MediaCodec name="OMX.ffmpeg.ac3.decoder"    type="audio/ac3" />
110         <MediaCodec name="OMX.ffmpeg.ape.decoder"    type="audio/x-ape" />
111         <MediaCodec name="OMX.ffmpeg.dts.decoder"    type="audio/vnd.dts" />
112         <MediaCodec name="OMX.ffmpeg.atrial.decoder" type="audio/ffmpeg" />
113
114         <!-- google audio codec -->
115         <MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" />
116         <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" />
117         <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" />
118         <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" />
119         <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" />
120         <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" />
121         <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" />
122
123                 <!-- google video codec -->
124         <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" />
125         <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" />
126         <MediaCodec name="OMX.google.h264.decoder" type="video/avc" />
127         <MediaCodec name="OMX.google.vpx.decoder" type="video/x-vnd.on2.vp8" />
128     </Decoders>
129
130     <Encoders>
131         <MediaCodec name="OMX.TI.DUCATI1.VIDEO.MPEG4E" >
132             <Type name="video/mp4v-es" />
133             <Type name="video/3gpp" />
134             <Quirk name="requires-allocate-on-input-ports" />
135             <Quirk name="requires-allocate-on-output-ports" />
136         </MediaCodec>
137
138         <MediaCodec name="OMX.TI.DUCATI1.VIDEO.H264E" type="video/avc" >
139             <Quirk name="requires-allocate-on-input-ports" />
140             <Quirk name="requires-allocate-on-output-ports" />
141         </MediaCodec>
142
143         <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" />
144         <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" />
145         <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" />
146         <MediaCodec name="OMX.google.flac.encoder" type="audio/flac" />
147     </Encoders>
148 </MediaCodecs>