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