1<?xml version="1.0" encoding="utf-8"?>
2<!--
3/*
4** Copyright 2017, The Android Open Source Project.
5**
6** Licensed under the Apache License, Version 2.0 (the "License");
7** you may not use this file except in compliance with the License.
8** You may obtain a copy of the License at
9**
10**     http://www.apache.org/licenses/LICENSE-2.0
11**
12** Unless required by applicable law or agreed to in writing, software
13** distributed under the License is distributed on an "AS IS" BASIS,
14** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15** See the License for the specific language governing permissions and
16** limitations under the License.
17*/
18-->
19<!DOCTYPE MediaSettings [
20<!ELEMENT MediaSettings (CamcorderProfiles,
21                         EncoderOutputFileFormat+,
22                         VideoEncoderCap+,
23                         AudioEncoderCap+,
24                         VideoDecoderCap,
25                         AudioDecoderCap)>
26<!ELEMENT CamcorderProfiles (EncoderProfile+, ImageEncoding+, ImageDecoding, Camera)>
27<!ELEMENT EncoderProfile (Video, Audio)>
28<!ATTLIST EncoderProfile quality (high|low) #REQUIRED>
29<!ATTLIST EncoderProfile fileFormat (mp4|3gp) #REQUIRED>
30<!ATTLIST EncoderProfile duration (30|60) #REQUIRED>
31<!ATTLIST EncoderProfile cameraId (0|1) #REQUIRED>
32<!ELEMENT Video EMPTY>
33<!ATTLIST Video codec (h264|h263|m4v) #REQUIRED>
34<!ATTLIST Video bitRate CDATA #REQUIRED>
35<!ATTLIST Video width CDATA #REQUIRED>
36<!ATTLIST Video height CDATA #REQUIRED>
37<!ATTLIST Video frameRate CDATA #REQUIRED>
38<!ELEMENT Audio EMPTY>
39<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
40<!ATTLIST Audio bitRate CDATA #REQUIRED>
41<!ATTLIST Audio sampleRate CDATA #REQUIRED>
42<!ATTLIST Audio channels (1|2) #REQUIRED>
43<!ELEMENT ImageEncoding EMPTY>
44<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
45<!ELEMENT ImageDecoding EMPTY>
46<!ATTLIST ImageDecoding memCap CDATA #REQUIRED>
47<!ELEMENT Camera EMPTY>
48<!ELEMENT EncoderOutputFileFormat EMPTY>
49<!ATTLIST EncoderOutputFileFormat name (mp4|3gp) #REQUIRED>
50<!ELEMENT VideoEncoderCap EMPTY>
51<!ATTLIST VideoEncoderCap name (h264|h263|m4v|wmv) #REQUIRED>
52<!ATTLIST VideoEncoderCap enabled (true|false) #REQUIRED>
53<!ATTLIST VideoEncoderCap minBitRate CDATA #REQUIRED>
54<!ATTLIST VideoEncoderCap maxBitRate CDATA #REQUIRED>
55<!ATTLIST VideoEncoderCap minFrameWidth CDATA #REQUIRED>
56<!ATTLIST VideoEncoderCap maxFrameWidth CDATA #REQUIRED>
57<!ATTLIST VideoEncoderCap minFrameHeight CDATA #REQUIRED>
58<!ATTLIST VideoEncoderCap maxFrameHeight CDATA #REQUIRED>
59<!ATTLIST VideoEncoderCap minFrameRate CDATA #REQUIRED>
60<!ATTLIST VideoEncoderCap maxFrameRate CDATA #REQUIRED>
61<!ELEMENT AudioEncoderCap EMPTY>
62<!ATTLIST AudioEncoderCap name (amrnb|amrwb|aac|wma) #REQUIRED>
63<!ATTLIST AudioEncoderCap enabled (true|false) #REQUIRED>
64<!ATTLIST AudioEncoderCap minBitRate CDATA #REQUIRED>
65<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
66<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
67<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
68<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
69<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
70<!ELEMENT VideoDecoderCap EMPTY>
71<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
72<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
73<!ELEMENT AudioDecoderCap EMPTY>
74<!ATTLIST AudioDecoderCap name (wma) #REQUIRED>
75<!ATTLIST AudioDecoderCap enabled (true|false) #REQUIRED>
76]>
77<!--
78     This file is used to declare the multimedia profiles and capabilities
79     on an android-powered device.
80-->
81<MediaSettings>
82    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
83    <CamcorderProfiles cameraId="0">
84        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
85            <Video codec="h264"
86                   bitRate="128000"
87                   width="320"
88                   height="240"
89                   frameRate="30" />
90            <Audio codec="amrnb"
91                   bitRate="12200"
92                   sampleRate="8000"
93                   channels="1" />
94        </EncoderProfile>
95
96        <EncoderProfile quality="720p " fileFormat="mp4" duration="60">
97            <Video codec="h264"
98                   bitRate="12000000"
99                   width="1280"
100                   height="720"
101                   frameRate="30" />
102            <Audio codec="amrnb"
103                   bitRate="12200"
104                   sampleRate="8000"
105                   channels="1" />
106        </EncoderProfile>
107
108        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
109            <Video codec="h264"
110                   bitRate="192000"
111                   width="176"
112                   height="144"
113                   frameRate="30" />
114            <!-- audio setting is ignored -->
115            <Audio codec="amrnb"
116                   bitRate="12200"
117                   sampleRate="8000"
118                   channels="1" />
119        </EncoderProfile>
120
121        <ImageEncoding quality="95" />
122        <ImageEncoding quality="80" />
123        <ImageEncoding quality="70" />
124        <ImageDecoding memCap="20000000" />
125
126    </CamcorderProfiles>
127
128    <CamcorderProfiles cameraId="1">
129
130        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
131            <Video codec="h264"
132                   bitRate="128000"
133                   width="320"
134                   height="240"
135                   frameRate="30" />
136            <Audio codec="amrnb"
137                   bitRate="12200"
138                   sampleRate="8000"
139                   channels="1" />
140        </EncoderProfile>
141
142        <EncoderProfile quality="720p" fileFormat="mp4" duration="60">
143            <Video codec="h264"
144                   bitRate="12000000"
145                   width="1280"
146                   height="720"
147                   frameRate="30" />
148            <Audio codec="amrnb"
149                   bitRate="12200"
150                   sampleRate="8000"
151                   channels="1" />
152        </EncoderProfile>
153
154        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
155            <Video codec="h264"
156                   bitRate="192000"
157                   width="176"
158                   height="144"
159                   frameRate="30" />
160            <!-- audio setting is ignored -->
161            <Audio codec="amrnb"
162                   bitRate="12200"
163                   sampleRate="8000"
164                   channels="1" />
165        </EncoderProfile>
166
167        <ImageEncoding quality="95" />
168        <ImageEncoding quality="80" />
169        <ImageEncoding quality="70" />
170        <ImageDecoding memCap="20000000" />
171
172    </CamcorderProfiles>
173
174    <CamcorderProfiles cameraId="2">
175
176        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
177            <Video codec="m4v"
178                   bitRate="128000"
179                   width="320"
180                   height="240"
181                   frameRate="15" />
182            <Audio codec="amrnb"
183                   bitRate="12200"
184                   sampleRate="8000"
185                   channels="1" />
186        </EncoderProfile>
187
188        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
189            <Video codec="h264"
190                   bitRate="192000"
191                   width="176"
192                   height="144"
193                   frameRate="30" />
194            <!-- audio setting is ignored -->
195            <Audio codec="amrnb"
196                   bitRate="12200"
197                   sampleRate="8000"
198                   channels="1" />
199        </EncoderProfile>
200
201        <ImageEncoding quality="95" />
202        <ImageEncoding quality="80" />
203        <ImageEncoding quality="70" />
204        <ImageDecoding memCap="20000000" />
205
206    </CamcorderProfiles>
207
208    <CamcorderProfiles cameraId="3">
209
210        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
211            <Video codec="m4v"
212                   bitRate="128000"
213                   width="320"
214                   height="240"
215                   frameRate="15" />
216            <Audio codec="amrnb"
217                   bitRate="12200"
218                   sampleRate="8000"
219                   channels="1" />
220        </EncoderProfile>
221
222        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
223            <Video codec="h264"
224                   bitRate="192000"
225                   width="176"
226                   height="144"
227                   frameRate="30" />
228            <!-- audio setting is ignored -->
229            <Audio codec="amrnb"
230                   bitRate="12200"
231                   sampleRate="8000"
232                   channels="1" />
233        </EncoderProfile>
234
235        <ImageEncoding quality="95" />
236        <ImageEncoding quality="80" />
237        <ImageEncoding quality="70" />
238        <ImageDecoding memCap="20000000" />
239
240    </CamcorderProfiles>
241
242    <CamcorderProfiles cameraId="4">
243
244        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
245            <Video codec="m4v"
246                   bitRate="128000"
247                   width="320"
248                   height="240"
249                   frameRate="15" />
250            <Audio codec="amrnb"
251                   bitRate="12200"
252                   sampleRate="8000"
253                   channels="1" />
254        </EncoderProfile>
255
256        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
257            <Video codec="h264"
258                   bitRate="192000"
259                   width="176"
260                   height="144"
261                   frameRate="30" />
262            <!-- audio setting is ignored -->
263            <Audio codec="amrnb"
264                   bitRate="12200"
265                   sampleRate="8000"
266                   channels="1" />
267        </EncoderProfile>
268
269        <ImageEncoding quality="95" />
270        <ImageEncoding quality="80" />
271        <ImageEncoding quality="70" />
272        <ImageDecoding memCap="20000000" />
273
274    </CamcorderProfiles>
275
276    <CamcorderProfiles cameraId="5">
277
278        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
279            <Video codec="m4v"
280                   bitRate="128000"
281                   width="320"
282                   height="240"
283                   frameRate="15" />
284            <Audio codec="amrnb"
285                   bitRate="12200"
286                   sampleRate="8000"
287                   channels="1" />
288        </EncoderProfile>
289
290        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
291            <Video codec="h264"
292                   bitRate="192000"
293                   width="176"
294                   height="144"
295                   frameRate="30" />
296            <!-- audio setting is ignored -->
297            <Audio codec="amrnb"
298                   bitRate="12200"
299                   sampleRate="8000"
300                   channels="1" />
301        </EncoderProfile>
302
303        <ImageEncoding quality="95" />
304        <ImageEncoding quality="80" />
305        <ImageEncoding quality="70" />
306        <ImageDecoding memCap="20000000" />
307
308    </CamcorderProfiles>
309
310    <CamcorderProfiles cameraId="6">
311
312        <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
313            <Video codec="m4v"
314                   bitRate="128000"
315                   width="320"
316                   height="240"
317                   frameRate="15" />
318            <Audio codec="amrnb"
319                   bitRate="12200"
320                   sampleRate="8000"
321                   channels="1" />
322        </EncoderProfile>
323
324        <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
325            <Video codec="h264"
326                   bitRate="192000"
327                   width="176"
328                   height="144"
329                   frameRate="30" />
330            <!-- audio setting is ignored -->
331            <Audio codec="amrnb"
332                   bitRate="12200"
333                   sampleRate="8000"
334                   channels="1" />
335        </EncoderProfile>
336
337        <ImageEncoding quality="95" />
338        <ImageEncoding quality="80" />
339        <ImageEncoding quality="70" />
340        <ImageDecoding memCap="20000000" />
341
342    </CamcorderProfiles>
343
344    <EncoderOutputFileFormat name="3gp" />
345    <EncoderOutputFileFormat name="mp4" />
346
347    <!--
348         If a codec is not enabled, it is invisible to the applications
349         In other words, the applications won't be able to use the codec
350         or query the capabilities of the codec at all if it is disabled
351    -->
352    <VideoEncoderCap name="h264" enabled="true"
353        minBitRate="64000" maxBitRate="12000000"
354        minFrameWidth="176" maxFrameWidth="1280"
355        minFrameHeight="144" maxFrameHeight="720"
356        minFrameRate="15" maxFrameRate="30" />
357
358    <VideoEncoderCap name="h263" enabled="true"
359        minBitRate="64000" maxBitRate="12000000"
360        minFrameWidth="176" maxFrameWidth="1280"
361        minFrameHeight="144" maxFrameHeight="720"
362        minFrameRate="15" maxFrameRate="30" />
363
364    <VideoEncoderCap name="m4v" enabled="true"
365        minBitRate="64000" maxBitRate="12000000"
366        minFrameWidth="176" maxFrameWidth="1280"
367        minFrameHeight="144" maxFrameHeight="720"
368        minFrameRate="15" maxFrameRate="30" />
369
370    <AudioEncoderCap name="aac" enabled="true"
371        minBitRate="8000" maxBitRate="96000"
372        minSampleRate="8000" maxSampleRate="48000"
373        minChannels="1" maxChannels="1" />
374
375    <AudioEncoderCap name="amrwb" enabled="true"
376        minBitRate="6600" maxBitRate="23050"
377        minSampleRate="16000" maxSampleRate="16000"
378        minChannels="1" maxChannels="1" />
379
380    <AudioEncoderCap name="amrnb" enabled="true"
381        minBitRate="5525" maxBitRate="12200"
382        minSampleRate="8000" maxSampleRate="8000"
383        minChannels="1" maxChannels="1" />
384
385    <!--
386        FIXME:
387        We do not check decoder capabilities at present
388        At present, we only check whether windows media is visible
389        for TEST applications. For other applications, we do
390        not perform any checks at all.
391    -->
392    <VideoDecoderCap name="wmv" enabled="false"/>
393    <AudioDecoderCap name="wma" enabled="false"/>
394</MediaSettings>
395