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]> 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 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 82 <Video codec="h264" 83 bitRate="128000" 84 width="320" 85 height="240" 86 frameRate="30" /> 87 <Audio codec="amrnb" 88 bitRate="12200" 89 sampleRate="8000" 90 channels="1" /> 91 </EncoderProfile> 92 93 <EncoderProfile quality="720p " fileFormat="mp4" duration="60"> 94 <Video codec="h264" 95 bitRate="12000000" 96 width="1280" 97 height="720" 98 frameRate="30" /> 99 <Audio codec="amrnb" 100 bitRate="12200" 101 sampleRate="8000" 102 channels="1" /> 103 </EncoderProfile> 104 105 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 106 <Video codec="h264" 107 bitRate="192000" 108 width="176" 109 height="144" 110 frameRate="30" /> 111 <!-- audio setting is ignored --> 112 <Audio codec="amrnb" 113 bitRate="12200" 114 sampleRate="8000" 115 channels="1" /> 116 </EncoderProfile> 117 118 <ImageEncoding quality="95" /> 119 <ImageEncoding quality="80" /> 120 <ImageEncoding quality="70" /> 121 <ImageDecoding memCap="20000000" /> 122 123 </CamcorderProfiles> 124 125 <CamcorderProfiles cameraId="1"> 126 127 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 128 <Video codec="h264" 129 bitRate="128000" 130 width="320" 131 height="240" 132 frameRate="30" /> 133 <Audio codec="amrnb" 134 bitRate="12200" 135 sampleRate="8000" 136 channels="1" /> 137 </EncoderProfile> 138 139 <EncoderProfile quality="720p" fileFormat="mp4" duration="60"> 140 <Video codec="h264" 141 bitRate="12000000" 142 width="1280" 143 height="720" 144 frameRate="30" /> 145 <Audio codec="amrnb" 146 bitRate="12200" 147 sampleRate="8000" 148 channels="1" /> 149 </EncoderProfile> 150 151 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 152 <Video codec="h264" 153 bitRate="192000" 154 width="176" 155 height="144" 156 frameRate="30" /> 157 <!-- audio setting is ignored --> 158 <Audio codec="amrnb" 159 bitRate="12200" 160 sampleRate="8000" 161 channels="1" /> 162 </EncoderProfile> 163 164 <ImageEncoding quality="95" /> 165 <ImageEncoding quality="80" /> 166 <ImageEncoding quality="70" /> 167 <ImageDecoding memCap="20000000" /> 168 169 </CamcorderProfiles> 170 171 <CamcorderProfiles cameraId="2"> 172 173 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 174 <Video codec="m4v" 175 bitRate="128000" 176 width="320" 177 height="240" 178 frameRate="15" /> 179 <Audio codec="amrnb" 180 bitRate="12200" 181 sampleRate="8000" 182 channels="1" /> 183 </EncoderProfile> 184 185 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 186 <Video codec="h264" 187 bitRate="192000" 188 width="176" 189 height="144" 190 frameRate="30" /> 191 <!-- audio setting is ignored --> 192 <Audio codec="amrnb" 193 bitRate="12200" 194 sampleRate="8000" 195 channels="1" /> 196 </EncoderProfile> 197 198 <ImageEncoding quality="95" /> 199 <ImageEncoding quality="80" /> 200 <ImageEncoding quality="70" /> 201 <ImageDecoding memCap="20000000" /> 202 203 </CamcorderProfiles> 204 205 <CamcorderProfiles cameraId="3"> 206 207 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 208 <Video codec="m4v" 209 bitRate="128000" 210 width="320" 211 height="240" 212 frameRate="15" /> 213 <Audio codec="amrnb" 214 bitRate="12200" 215 sampleRate="8000" 216 channels="1" /> 217 </EncoderProfile> 218 219 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 220 <Video codec="h264" 221 bitRate="192000" 222 width="176" 223 height="144" 224 frameRate="30" /> 225 <!-- audio setting is ignored --> 226 <Audio codec="amrnb" 227 bitRate="12200" 228 sampleRate="8000" 229 channels="1" /> 230 </EncoderProfile> 231 232 <ImageEncoding quality="95" /> 233 <ImageEncoding quality="80" /> 234 <ImageEncoding quality="70" /> 235 <ImageDecoding memCap="20000000" /> 236 237 </CamcorderProfiles> 238 239 <CamcorderProfiles cameraId="4"> 240 241 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 242 <Video codec="m4v" 243 bitRate="128000" 244 width="320" 245 height="240" 246 frameRate="15" /> 247 <Audio codec="amrnb" 248 bitRate="12200" 249 sampleRate="8000" 250 channels="1" /> 251 </EncoderProfile> 252 253 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 254 <Video codec="h264" 255 bitRate="192000" 256 width="176" 257 height="144" 258 frameRate="30" /> 259 <!-- audio setting is ignored --> 260 <Audio codec="amrnb" 261 bitRate="12200" 262 sampleRate="8000" 263 channels="1" /> 264 </EncoderProfile> 265 266 <ImageEncoding quality="95" /> 267 <ImageEncoding quality="80" /> 268 <ImageEncoding quality="70" /> 269 <ImageDecoding memCap="20000000" /> 270 271 </CamcorderProfiles> 272 273 <CamcorderProfiles cameraId="5"> 274 275 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 276 <Video codec="m4v" 277 bitRate="128000" 278 width="320" 279 height="240" 280 frameRate="15" /> 281 <Audio codec="amrnb" 282 bitRate="12200" 283 sampleRate="8000" 284 channels="1" /> 285 </EncoderProfile> 286 287 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 288 <Video codec="h264" 289 bitRate="192000" 290 width="176" 291 height="144" 292 frameRate="30" /> 293 <!-- audio setting is ignored --> 294 <Audio codec="amrnb" 295 bitRate="12200" 296 sampleRate="8000" 297 channels="1" /> 298 </EncoderProfile> 299 300 <ImageEncoding quality="95" /> 301 <ImageEncoding quality="80" /> 302 <ImageEncoding quality="70" /> 303 <ImageDecoding memCap="20000000" /> 304 305 </CamcorderProfiles> 306 307 <CamcorderProfiles cameraId="6"> 308 309 <EncoderProfile quality="qvga" fileFormat="mp4" duration="60"> 310 <Video codec="m4v" 311 bitRate="128000" 312 width="320" 313 height="240" 314 frameRate="15" /> 315 <Audio codec="amrnb" 316 bitRate="12200" 317 sampleRate="8000" 318 channels="1" /> 319 </EncoderProfile> 320 321 <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30"> 322 <Video codec="h264" 323 bitRate="192000" 324 width="176" 325 height="144" 326 frameRate="30" /> 327 <!-- audio setting is ignored --> 328 <Audio codec="amrnb" 329 bitRate="12200" 330 sampleRate="8000" 331 channels="1" /> 332 </EncoderProfile> 333 334 <ImageEncoding quality="95" /> 335 <ImageEncoding quality="80" /> 336 <ImageEncoding quality="70" /> 337 <ImageDecoding memCap="20000000" /> 338 339 </CamcorderProfiles> 340 341 <EncoderOutputFileFormat name="3gp" /> 342 <EncoderOutputFileFormat name="mp4" /> 343 344 <!-- 345 If a codec is not enabled, it is invisible to the applications 346 In other words, the applications won't be able to use the codec 347 or query the capabilities of the codec at all if it is disabled 348 --> 349 <VideoEncoderCap name="h264" enabled="true" 350 minBitRate="64000" maxBitRate="12000000" 351 minFrameWidth="176" maxFrameWidth="1280" 352 minFrameHeight="144" maxFrameHeight="720" 353 minFrameRate="15" maxFrameRate="30" /> 354 355 <VideoEncoderCap name="h263" enabled="true" 356 minBitRate="64000" maxBitRate="12000000" 357 minFrameWidth="176" maxFrameWidth="1280" 358 minFrameHeight="144" maxFrameHeight="720" 359 minFrameRate="15" maxFrameRate="30" /> 360 361 <VideoEncoderCap name="m4v" enabled="true" 362 minBitRate="64000" maxBitRate="12000000" 363 minFrameWidth="176" maxFrameWidth="1280" 364 minFrameHeight="144" maxFrameHeight="720" 365 minFrameRate="15" maxFrameRate="30" /> 366 367 <AudioEncoderCap name="aac" enabled="true" 368 minBitRate="8000" maxBitRate="96000" 369 minSampleRate="8000" maxSampleRate="48000" 370 minChannels="1" maxChannels="1" /> 371 372 <AudioEncoderCap name="amrwb" enabled="true" 373 minBitRate="6600" maxBitRate="23050" 374 minSampleRate="16000" maxSampleRate="16000" 375 minChannels="1" maxChannels="1" /> 376 377 <AudioEncoderCap name="amrnb" enabled="true" 378 minBitRate="5525" maxBitRate="12200" 379 minSampleRate="8000" maxSampleRate="8000" 380 minChannels="1" maxChannels="1" /> 381 382 <!-- 383 FIXME: 384 We do not check decoder capabilities at present 385 At present, we only check whether windows media is visible 386 for TEST applications. For other applications, we do 387 not perform any checks at all. 388 --> 389 <VideoDecoderCap name="wmv" enabled="false"/> 390 <AudioDecoderCap name="wma" enabled="false"/> 391</MediaSettings> 392