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="high" fileFormat="mp4" duration="60"> 83 <Video codec="h264" 84 bitRate="3000000" 85 width="720" 86 height="480" 87 frameRate="30" /> 88 89 <Audio codec="aac" 90 bitRate="96000" 91 sampleRate="16000" 92 channels="1" /> 93 </EncoderProfile> 94 95 <EncoderProfile quality="low" fileFormat="3gp" duration="30"> 96 <Video codec="h263" 97 bitRate="256000" 98 width="176" 99 height="144" 100 frameRate="30" /> 101 102 <Audio codec="amrnb" 103 bitRate="12200" 104 sampleRate="8000" 105 channels="1" /> 106 107 </EncoderProfile> 108 109 <ImageEncoding quality="90" /> 110 <ImageEncoding quality="80" /> 111 <ImageEncoding quality="70" /> 112 <ImageDecoding memCap="20000000" /> 113 114 </CamcorderProfiles> 115 116 <CamcorderProfiles cameraId="1"> 117 118 <EncoderProfile quality="high" fileFormat="mp4" duration="60"> 119 <Video codec="h264" 120 bitRate="1000000" 121 width="640" 122 height="480" 123 frameRate="30" /> 124 125 <Audio codec="aac" 126 bitRate="96000" 127 sampleRate="16000" 128 channels="1" /> 129 </EncoderProfile> 130 131 <EncoderProfile quality="low" fileFormat="3gp" duration="30"> 132 <Video codec="h263" 133 bitRate="256000" 134 width="176" 135 height="144" 136 frameRate="30" /> 137 138 <Audio codec="amrnb" 139 bitRate="12200" 140 sampleRate="8000" 141 channels="1" /> 142 143 </EncoderProfile> 144 145 <ImageEncoding quality="90" /> 146 <ImageEncoding quality="80" /> 147 <ImageEncoding quality="70" /> 148 <ImageDecoding memCap="20000000" /> 149 150 </CamcorderProfiles> 151 152 153 <EncoderOutputFileFormat name="3gp" /> 154 <EncoderOutputFileFormat name="mp4" /> 155 156 <!-- 157 If a codec is not enabled, it is invisible to the applications 158 In other words, the applications won't be able to use the codec 159 or query the capabilities of the codec at all if it is disabled 160 --> 161 <VideoEncoderCap name="h264" enabled="true" 162 minBitRate="64000" maxBitRate="3000000" 163 minFrameWidth="176" maxFrameWidth="800" 164 minFrameHeight="144" maxFrameHeight="480" 165 minFrameRate="1" maxFrameRate="30" /> 166 167 <VideoEncoderCap name="h263" enabled="true" 168 minBitRate="64000" maxBitRate="1000000" 169 minFrameWidth="176" maxFrameWidth="800" 170 minFrameHeight="144" maxFrameHeight="480" 171 minFrameRate="1" maxFrameRate="30" /> 172 173 <VideoEncoderCap name="m4v" enabled="true" 174 minBitRate="64000" maxBitRate="2000000" 175 minFrameWidth="176" maxFrameWidth="800" 176 minFrameHeight="144" maxFrameHeight="480" 177 minFrameRate="1" maxFrameRate="30" /> 178 179 <AudioEncoderCap name="aac" enabled="true" 180 minBitRate="8192" maxBitRate="96000" 181 minSampleRate="8000" maxSampleRate="16000" 182 minChannels="1" maxChannels="1" /> 183 184 <AudioEncoderCap name="amrwb" enabled="true" 185 minBitRate="6600" maxBitRate="23050" 186 minSampleRate="16000" maxSampleRate="16000" 187 minChannels="1" maxChannels="1" /> 188 189 <AudioEncoderCap name="amrnb" enabled="true" 190 minBitRate="5525" maxBitRate="12200" 191 minSampleRate="8000" maxSampleRate="8000" 192 minChannels="1" maxChannels="1" /> 193 194 <!-- 195 FIXME: 196 We do not check decoder capabilities at present 197 At present, we only check whether windows media is visible 198 for TEST applications. For other applications, we do 199 not perform any checks at all. 200 --> 201 <VideoDecoderCap name="wmv" enabled="false"/> 202 <AudioDecoderCap name="wma" enabled="false"/> 203 </MediaSettings> 204