• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2010 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<!DOCTYPE MediaSettings [
17<!ELEMENT MediaSettings (CamcorderProfiles,
18                         EncoderOutputFileFormat+,
19                         VideoEncoderCap+,
20                         AudioEncoderCap+,
21                         VideoDecoderCap,
22                         AudioDecoderCap)>
23<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
24<!ELEMENT EncoderProfile (Video, Audio)>
25<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
26<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
27<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
28<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
29<!ELEMENT Video EMPTY>
30<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
31<!ATTLIST Video bitRate CDATA #REQUIRED>
32<!ATTLIST Video width CDATA #REQUIRED>
33<!ATTLIST Video height CDATA #REQUIRED>
34<!ATTLIST Video frameRate CDATA #REQUIRED>
35<!ELEMENT Audio EMPTY>
36<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
37<!ATTLIST Audio bitRate CDATA #REQUIRED>
38<!ATTLIST Audio sampleRate CDATA #REQUIRED>
39<!ATTLIST Audio channels (1|2) #REQUIRED>
40<!ELEMENT ImageEncoding EMPTY>
41<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
42<!ELEMENT ImageDecoding EMPTY>
43<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
44<!ELEMENT Camera EMPTY>
45<!ELEMENT EncoderOutputFileFormat EMPTY>
46<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
47<!ELEMENT VideoEncoderCap EMPTY>
48<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
49<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
50<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
51<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
52<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
53<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
54<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
55<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
56<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
57<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
58<!ELEMENT AudioEncoderCap EMPTY>
59<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
60<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
61<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
62<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
63<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
64<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
65<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
66<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
67<!ELEMENT VideoDecoderCap EMPTY>
68<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
69<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
70<!ELEMENT AudioDecoderCap EMPTY>
71<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
72<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
73<!ELEMENT VideoEditorCap EMPTY>
74<!ATTLIST VideoEditorCap maxInputFrameWidth CDATA #REQUIRED>
75<!ATTLIST VideoEditorCap maxInputFrameHeight CDATA #REQUIRED>
76<!ATTLIST VideoEditorCap maxOutputFrameWidth CDATA #REQUIRED>
77<!ATTLIST VideoEditorCap maxOutputFrameHeight CDATA #REQUIRED>
78<!ATTLIST VideoEditorCap maxPrefetchYUVFrames CDATA #REQUIRED>
79<!ELEMENT ExportVideoProfile EMPTY>
80<!ATTLIST ExportVideoProfile name (h264|h263|m4v) #REQUIRED>
81<!ATTLIST ExportVideoProfile profile CDATA #REQUIRED>
82<!ATTLIST ExportVideoProfile level CDATA #REQUIRED>
83]>
84<!--
85     This file is used to declare the multimedia profiles and capabilities
86     on an android-powered device.
87-->
88<MediaSettings>
89    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
90    <CamcorderProfiles cameraId="0">
91
92        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
93            <Video codec="m4v"
94                   bitRate="128000"
95                   width="320"
96                   height="240"
97                   frameRate="15" />
98            <Audio codec="amrnb"
99                   bitRate="12200"
100                   sampleRate="8000"
101                   channels="1" />
102        </EncoderProfile>
103
104        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
105            <Video codec="h264"
106                   bitRate="192000"
107                   width="176"
108                   height="144"
109                   frameRate="30" />
110            <!-- audio setting is ignored -->
111            <Audio codec="amrnb"
112                   bitRate="12200"
113                   sampleRate="8000"
114                   channels="1" />
115        </EncoderProfile>
116
117        <ImageEncoding quality="95" />
118        <ImageEncoding quality="80" />
119        <ImageEncoding quality="70" />
120        <ImageDecoding memCap="20000000" />
121
122    </CamcorderProfiles>
123
124    <CamcorderProfiles cameraId="1">
125
126        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
127            <Video codec="m4v"
128                   bitRate="128000"
129                   width="320"
130                   height="240"
131                   frameRate="15" />
132            <Audio codec="amrnb"
133                   bitRate="12200"
134                   sampleRate="8000"
135                   channels="1" />
136        </EncoderProfile>
137
138        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
139            <Video codec="h264"
140                   bitRate="192000"
141                   width="176"
142                   height="144"
143                   frameRate="30" />
144            <!-- audio setting is ignored -->
145            <Audio codec="amrnb"
146                   bitRate="12200"
147                   sampleRate="8000"
148                   channels="1" />
149        </EncoderProfile>
150
151        <ImageEncoding quality="95" />
152        <ImageEncoding quality="80" />
153        <ImageEncoding quality="70" />
154        <ImageDecoding memCap="20000000" />
155
156    </CamcorderProfiles>
157
158    <CamcorderProfiles cameraId="2">
159
160        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
161            <Video codec="m4v"
162                   bitRate="128000"
163                   width="320"
164                   height="240"
165                   frameRate="15" />
166            <Audio codec="amrnb"
167                   bitRate="12200"
168                   sampleRate="8000"
169                   channels="1" />
170        </EncoderProfile>
171
172        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
173            <Video codec="h264"
174                   bitRate="192000"
175                   width="176"
176                   height="144"
177                   frameRate="30" />
178            <!-- audio setting is ignored -->
179            <Audio codec="amrnb"
180                   bitRate="12200"
181                   sampleRate="8000"
182                   channels="1" />
183        </EncoderProfile>
184
185        <ImageEncoding quality="95" />
186        <ImageEncoding quality="80" />
187        <ImageEncoding quality="70" />
188        <ImageDecoding memCap="20000000" />
189
190    </CamcorderProfiles>
191
192    <CamcorderProfiles cameraId="3">
193
194        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
195            <Video codec="m4v"
196                   bitRate="128000"
197                   width="320"
198                   height="240"
199                   frameRate="15" />
200            <Audio codec="amrnb"
201                   bitRate="12200"
202                   sampleRate="8000"
203                   channels="1" />
204        </EncoderProfile>
205
206        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
207            <Video codec="h264"
208                   bitRate="192000"
209                   width="176"
210                   height="144"
211                   frameRate="30" />
212            <!-- audio setting is ignored -->
213            <Audio codec="amrnb"
214                   bitRate="12200"
215                   sampleRate="8000"
216                   channels="1" />
217        </EncoderProfile>
218
219        <ImageEncoding quality="95" />
220        <ImageEncoding quality="80" />
221        <ImageEncoding quality="70" />
222        <ImageDecoding memCap="20000000" />
223
224    </CamcorderProfiles>
225
226    <CamcorderProfiles cameraId="4">
227
228        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
229            <Video codec="m4v"
230                   bitRate="128000"
231                   width="320"
232                   height="240"
233                   frameRate="15" />
234            <Audio codec="amrnb"
235                   bitRate="12200"
236                   sampleRate="8000"
237                   channels="1" />
238        </EncoderProfile>
239
240        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
241            <Video codec="h264"
242                   bitRate="192000"
243                   width="176"
244                   height="144"
245                   frameRate="30" />
246            <!-- audio setting is ignored -->
247            <Audio codec="amrnb"
248                   bitRate="12200"
249                   sampleRate="8000"
250                   channels="1" />
251        </EncoderProfile>
252
253        <ImageEncoding quality="95" />
254        <ImageEncoding quality="80" />
255        <ImageEncoding quality="70" />
256        <ImageDecoding memCap="20000000" />
257
258    </CamcorderProfiles>
259
260    <CamcorderProfiles cameraId="5">
261
262        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
263            <Video codec="m4v"
264                   bitRate="128000"
265                   width="320"
266                   height="240"
267                   frameRate="15" />
268            <Audio codec="amrnb"
269                   bitRate="12200"
270                   sampleRate="8000"
271                   channels="1" />
272        </EncoderProfile>
273
274        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
275            <Video codec="h264"
276                   bitRate="192000"
277                   width="176"
278                   height="144"
279                   frameRate="30" />
280            <!-- audio setting is ignored -->
281            <Audio codec="amrnb"
282                   bitRate="12200"
283                   sampleRate="8000"
284                   channels="1" />
285        </EncoderProfile>
286
287        <ImageEncoding quality="95" />
288        <ImageEncoding quality="80" />
289        <ImageEncoding quality="70" />
290        <ImageDecoding memCap="20000000" />
291
292    </CamcorderProfiles>
293
294    <CamcorderProfiles cameraId="6">
295
296        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
297            <Video codec="m4v"
298                   bitRate="128000"
299                   width="320"
300                   height="240"
301                   frameRate="15" />
302            <Audio codec="amrnb"
303                   bitRate="12200"
304                   sampleRate="8000"
305                   channels="1" />
306        </EncoderProfile>
307
308        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
309            <Video codec="h264"
310                   bitRate="192000"
311                   width="176"
312                   height="144"
313                   frameRate="30" />
314            <!-- audio setting is ignored -->
315            <Audio codec="amrnb"
316                   bitRate="12200"
317                   sampleRate="8000"
318                   channels="1" />
319        </EncoderProfile>
320
321        <ImageEncoding quality="95" />
322        <ImageEncoding quality="80" />
323        <ImageEncoding quality="70" />
324        <ImageDecoding memCap="20000000" />
325
326    </CamcorderProfiles>
327
328    <EncoderOutputFileFormat name="3gp" />
329    <EncoderOutputFileFormat name="mp4" />
330
331    <!--
332         If a codec is not enabled, it is invisible to the applications
333         In other words, the applications won't be able to use the codec
334         or query the capabilities of the codec at all if it is disabled
335    -->
336    <VideoEncoderCap name="h264" enabled="true"
337        minBitRate="64000" maxBitRate="192000"
338        minFrameWidth="176" maxFrameWidth="320"
339        minFrameHeight="144" maxFrameHeight="240"
340        minFrameRate="15" maxFrameRate="30" />
341
342    <VideoEncoderCap name="h263" enabled="true"
343        minBitRate="64000" maxBitRate="192000"
344        minFrameWidth="176" maxFrameWidth="320"
345        minFrameHeight="144" maxFrameHeight="240"
346        minFrameRate="15" maxFrameRate="30" />
347
348    <VideoEncoderCap name="m4v" enabled="true"
349        minBitRate="64000" maxBitRate="192000"
350        minFrameWidth="176" maxFrameWidth="320"
351        minFrameHeight="144" maxFrameHeight="240"
352        minFrameRate="15" maxFrameRate="30" />
353
354    <AudioEncoderCap name="aac" enabled="true"
355        minBitRate="8000" maxBitRate="96000"
356        minSampleRate="8000" maxSampleRate="48000"
357        minChannels="1" maxChannels="1" />
358
359    <AudioEncoderCap name="amrwb" enabled="true"
360        minBitRate="6600" maxBitRate="23050"
361        minSampleRate="16000" maxSampleRate="16000"
362        minChannels="1" maxChannels="1" />
363
364    <AudioEncoderCap name="amrnb" enabled="true"
365        minBitRate="5525" maxBitRate="12200"
366        minSampleRate="8000" maxSampleRate="8000"
367        minChannels="1" maxChannels="1" />
368
369    <!--
370        FIXME:
371        We do not check decoder capabilities at present
372        At present, we only check whether windows media is visible
373        for TEST applications. For other applications, we do
374        not perform any checks at all.
375    -->
376    <VideoDecoderCap name="wmv" enabled="false"/>
377    <AudioDecoderCap name="wma" enabled="false"/>
378
379    <!--
380        The VideoEditor Capability configuration:
381        - maxInputFrameWidth: maximum video width of imported video clip.
382        - maxInputFrameHeight: maximum video height of imported video clip.
383        - maxOutputFrameWidth: maximum video width of exported video clip.
384        - maxOutputFrameHeight: maximum video height of exported video clip.
385        - maxPrefetchYUVFrames: maximum prefetch YUV frames for encoder,
386        used to limit the amount of memory for prefetched YUV frames.
387        For this platform, it allows maximum ~1MB(~0.1MB per QVGA frame x 10
388        frames) memory.
389    -->
390
391    <VideoEditorCap  maxInputFrameWidth="320"
392        maxInputFrameHeight="240" maxOutputFrameWidth="320"
393        maxOutputFrameHeight="240" maxPrefetchYUVFrames="10" />
394    <!--
395        The VideoEditor Export codec profile and level values
396        correspond to the values in OMX_Video.h.
397        E.g. for h264, profile value 1 means OMX_VIDEO_AVCProfileBaseline
398        and  level 4096 means OMX_VIDEO_AVCLevel41.
399        Please note that the values are in decimal.
400        These values are for video encoder.
401    -->
402    <!--
403      Codec = h.264, Baseline profile, level 4.1
404    -->
405    <ExportVideoProfile name="h264" profile= "1" level="512"/>
406    <!--
407      Codec = h.263, Baseline profile, level 0
408    -->
409    <ExportVideoProfile name="h263" profile= "1" level="1"/>
410    <!--
411      Codec = mpeg4, Simple profile, level 3
412    -->
413    <ExportVideoProfile name="m4v" profile= "1" level="16"/>
414</MediaSettings>
415