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<!ELEMENT Video EMPTY>
29<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
30<!ATTLIST Video bitRate CDATA #REQUIRED>
31<!ATTLIST Video width CDATA #REQUIRED>
32<!ATTLIST Video height CDATA #REQUIRED>
33<!ATTLIST Video frameRate CDATA #REQUIRED>
34<!ELEMENT Audio EMPTY>
35<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
36<!ATTLIST Audio bitRate CDATA #REQUIRED>
37<!ATTLIST Audio sampleRate CDATA #REQUIRED>
38<!ATTLIST Audio channels (1|2) #REQUIRED>
39<!ELEMENT ImageEncoding EMPTY>
40<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
41<!ELEMENT ImageDecoding EMPTY>
42<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
43<!ELEMENT Camera EMPTY>
44<!ATTLIST Camera previewFrameRate CDATA #REQUIRED>
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]>
74<!--
75     This file is used to declare the multimedia profiles and capabilities
76     on an android-powered device.
77-->
78<MediaSettings>
79    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
80    <CamcorderProfiles cameraId="0">
81
82        <EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
83            <Video codec="h264"
84                   bitRate="12000000"
85                   width="1920"
86                   height="1080"
87                   frameRate="30" />
88
89            <Audio codec="aac"
90                   bitRate="96000"
91                   sampleRate="16000"
92                   channels="1" />
93        </EncoderProfile>
94
95        <EncoderProfile quality="720p" fileFormat="mp4" duration="60">
96            <Video codec="h264"
97                   bitRate="8000000"
98                   width="1280"
99                   height="720"
100                   frameRate="30" />
101
102            <Audio codec="aac"
103                   bitRate="96000"
104                   sampleRate="16000"
105                   channels="1" />
106        </EncoderProfile>
107
108        <EncoderProfile quality="480p" fileFormat="mp4" duration="60">
109            <Video codec="h264"
110                   bitRate="3000000"
111                   width="720"
112                   height="480"
113                   frameRate="30" />
114
115            <Audio codec="aac"
116                   bitRate="96000"
117                   sampleRate="16000"
118                   channels="1" />
119        </EncoderProfile>
120
121        <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
122            <Video codec="h264"
123                   bitRate="12000000"
124                   width="1920"
125                   height="1080"
126                   frameRate="30" />
127
128            <!-- Audio settings are not used for timealpse video recording -->
129            <Audio codec="aac"
130                   bitRate="96000"
131                   sampleRate="16000"
132                   channels="1" />
133        </EncoderProfile>
134
135        <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
136            <Video codec="h264"
137                   bitRate="8000000"
138                   width="1280"
139                   height="720"
140                   frameRate="30" />
141
142            <!-- Audio settings are not used for timealpse video recording -->
143            <Audio codec="aac"
144                   bitRate="96000"
145                   sampleRate="16000"
146                   channels="1" />
147        </EncoderProfile>
148
149        <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
150            <Video codec="h264"
151                   bitRate="3000000"
152                   width="720"
153                   height="480"
154                   frameRate="30" />
155
156            <!-- Audio settings are not used for timealpse video recording -->
157            <Audio codec="aac"
158                   bitRate="96000"
159                   sampleRate="16000"
160                   channels="1" />
161        </EncoderProfile>
162
163        <ImageEncoding quality="90" />
164        <ImageEncoding quality="80" />
165        <ImageEncoding quality="70" />
166        <ImageDecoding memCap="20000000" />
167
168    </CamcorderProfiles>
169
170    <CamcorderProfiles cameraId="1">
171
172        <EncoderProfile quality="1080p" fileFormat="mp4" duration="60">
173            <Video codec="h264"
174                   bitRate="12000000"
175                   width="1920"
176                   height="1080"
177                   frameRate="30" />
178
179            <Audio codec="aac"
180                   bitRate="96000"
181                   sampleRate="16000"
182                   channels="1" />
183        </EncoderProfile>
184
185        <EncoderProfile quality="720p" fileFormat="mp4" duration="60">
186            <Video codec="h264"
187                   bitRate="8000000"
188                   width="1280"
189                   height="720"
190                   frameRate="30" />
191
192            <Audio codec="aac"
193                   bitRate="96000"
194                   sampleRate="16000"
195                   channels="1" />
196        </EncoderProfile>
197
198        <EncoderProfile quality="480p" fileFormat="mp4" duration="60">
199            <Video codec="h264"
200                   bitRate="3000000"
201                   width="720"
202                   height="480"
203                   frameRate="30" />
204
205            <Audio codec="aac"
206                   bitRate="96000"
207                   sampleRate="16000"
208                   channels="1" />
209        </EncoderProfile>
210
211        <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="60">
212            <Video codec="h264"
213                   bitRate="12000000"
214                   width="1920"
215                   height="1080"
216                   frameRate="30" />
217
218            <!-- Audio settings are not used for timealpse video recording -->
219            <Audio codec="aac"
220                   bitRate="96000"
221                   sampleRate="16000"
222                   channels="1" />
223        </EncoderProfile>
224
225        <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="60">
226            <Video codec="h264"
227                   bitRate="8000000"
228                   width="1280"
229                   height="720"
230                   frameRate="30" />
231
232            <!-- Audio settings are not used for timealpse video recording -->
233            <Audio codec="aac"
234                   bitRate="96000"
235                   sampleRate="16000"
236                   channels="1" />
237        </EncoderProfile>
238
239        <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="60">
240            <Video codec="h264"
241                   bitRate="3000000"
242                   width="720"
243                   height="480"
244                   frameRate="30" />
245
246            <!-- Audio settings are not used for timealpse video recording -->
247            <Audio codec="aac"
248                   bitRate="96000"
249                   sampleRate="16000"
250                   channels="1" />
251        </EncoderProfile>
252
253        <ImageEncoding quality="90" />
254        <ImageEncoding quality="80" />
255        <ImageEncoding quality="70" />
256        <ImageDecoding memCap="20000000" />
257
258    </CamcorderProfiles>
259
260    <EncoderOutputFileFormat name="3gp" />
261    <EncoderOutputFileFormat name="mp4" />
262
263    <!--
264         If a codec is not enabled, it is invisible to the applications
265         In other words, the applications won't be able to use the codec
266         or query the capabilities of the codec at all if it is disabled
267    -->
268
269    <!--
270         FIXME : we only check Mpeg4 encorder cap and other codec doesn't check
271                 codec cap
272    -->
273    <VideoEncoderCap name="h264" enabled="true"
274        minBitRate="64000" maxBitRate="12000000"
275        minFrameWidth="128" maxFrameWidth="1920"
276        minFrameHeight="96" maxFrameHeight="1080"
277        minFrameRate="15" maxFrameRate="30" />
278
279    <VideoEncoderCap name="h263" enabled="true"
280        minBitRate="64000" maxBitRate="1000000"
281        minFrameWidth="128" maxFrameWidth="1920"
282        minFrameHeight="96" maxFrameHeight="1080"
283        minFrameRate="15" maxFrameRate="30" />
284
285    <VideoEncoderCap name="m4v" enabled="true"
286        minBitRate="64000" maxBitRate="2000000"
287        minFrameWidth="128" maxFrameWidth="1920"
288        minFrameHeight="96" maxFrameHeight="1080"
289        minFrameRate="15" maxFrameRate="30" />
290
291    <AudioEncoderCap name="aac" enabled="true"
292        minBitRate="758" maxBitRate="288000"
293        minSampleRate="8000" maxSampleRate="48000"
294        minChannels="1" maxChannels="1" />
295
296    <AudioEncoderCap name="heaac" enabled="true"
297        minBitRate="8000" maxBitRate="64000"
298        minSampleRate="16000" maxSampleRate="48000"
299        minChannels="1" maxChannels="1" />
300
301    <AudioEncoderCap name="aaceld" enabled="true"
302        minBitRate="16000" maxBitRate="192000"
303        minSampleRate="16000" maxSampleRate="48000"
304        minChannels="1" maxChannels="1" />
305
306    <AudioEncoderCap name="amrwb" enabled="true"
307        minBitRate="6600" maxBitRate="23050"
308        minSampleRate="16000" maxSampleRate="16000"
309        minChannels="1" maxChannels="1" />
310
311    <AudioEncoderCap name="amrnb" enabled="true"
312        minBitRate="5525" maxBitRate="12200"
313        minSampleRate="8000" maxSampleRate="8000"
314        minChannels="1" maxChannels="1" />
315
316    <!--
317        FIXME:
318        We do not check decoder capabilities at present
319        At present, we only check whether windows media is visible
320        for TEST applications. For other applications, we do
321        not perform any checks at all.
322    -->
323    <VideoDecoderCap name="wmv" enabled="false"/>
324    <AudioDecoderCap name="wma" enabled="false"/>
325</MediaSettings>
326