Home | History | Annotate | Download | only in shamu
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!-- Copyright 2013 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="low" fileFormat="3gp" duration="60">
     83             <Video codec="h264"
     84                    bitRate="128000"
     85                    width="176"
     86                    height="144"
     87                    frameRate="30" />
     88 
     89             <Audio codec="amrnb"
     90                    bitRate="12200"
     91                    sampleRate="8000"
     92                    channels="1" />
     93         </EncoderProfile>
     94 
     95         <EncoderProfile quality="high" fileFormat="mp4" duration="30">
     96             <Video codec="h264"
     97                    bitRate="42000000"
     98                    width="3840"
     99                    height="2160"
    100                    frameRate="30" />
    101             <Audio codec="aac"
    102                    bitRate="96000"
    103                    sampleRate="48000"
    104                    channels="1" />
    105         </EncoderProfile>
    106 
    107         <EncoderProfile quality="qcif" fileFormat="3gp" duration="60">
    108             <Video codec="h264"
    109                    bitRate="128000"
    110                    width="176"
    111                    height="144"
    112                    frameRate="30" />
    113             <Audio codec="amrnb"
    114                    bitRate="12200"
    115                    sampleRate="8000"
    116                    channels="1" />
    117         </EncoderProfile>
    118 
    119         <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
    120             <Video codec="h264"
    121                    bitRate="512000"
    122                    width="320"
    123                    height="240"
    124                    frameRate="30" />
    125             <Audio codec="aac"
    126                    bitRate="156000"
    127                    sampleRate="48000"
    128                    channels="2" />
    129         </EncoderProfile>
    130 
    131         <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
    132             <Video codec="h264"
    133                    bitRate="1200000"
    134                    width="352"
    135                    height="288"
    136                    frameRate="30" />
    137             <Audio codec="aac"
    138                    bitRate="96000"
    139                    sampleRate="48000"
    140                    channels="1" />
    141         </EncoderProfile>
    142 
    143         <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
    144             <Video codec="h264"
    145                    bitRate="6000000"
    146                    width="720"
    147                    height="480"
    148                    frameRate="30" />
    149             <Audio codec="aac"
    150                    bitRate="96000"
    151                    sampleRate="48000"
    152                    channels="1" />
    153         </EncoderProfile>
    154 
    155         <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
    156             <Video codec="h264"
    157                    bitRate="12000000"
    158                    width="1280"
    159                    height="720"
    160                    frameRate="30" />
    161             <Audio codec="aac"
    162                    bitRate="96000"
    163                    sampleRate="48000"
    164                    channels="1" />
    165         </EncoderProfile>
    166 
    167         <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
    168             <Video codec="h264"
    169                    bitRate="17000000"
    170                    width="1920"
    171                    height="1080"
    172                    frameRate="30" />
    173             <Audio codec="aac"
    174                    bitRate="96000"
    175                    sampleRate="48000"
    176                    channels="1" />
    177         </EncoderProfile>
    178 
    179         <EncoderProfile quality="2160p" fileFormat="mp4" duration="30">
    180             <Video codec="h264"
    181                    bitRate="42000000"
    182                    width="3840"
    183                    height="2160"
    184                    frameRate="30" />
    185             <Audio codec="aac"
    186                    bitRate="96000"
    187                    sampleRate="48000"
    188                    channels="1" />
    189         </EncoderProfile>
    190 
    191         <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
    192             <Video codec="h264"
    193                    bitRate="192000"
    194                    width="176"
    195                    height="144"
    196                    frameRate="30" />
    197             <!-- audio setting is ignored -->
    198             <Audio codec="amrnb"
    199                    bitRate="12200"
    200                    sampleRate="8000"
    201                    channels="1" />
    202         </EncoderProfile>
    203 
    204         <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
    205             <Video codec="h264"
    206                    bitRate="1200000"
    207                    width="352"
    208                    height="288"
    209                    frameRate="30" />
    210             <!-- audio setting is ignored -->
    211             <Audio codec="aac"
    212                    bitRate="96000"
    213                    sampleRate="48000"
    214                    channels="1" />
    215         </EncoderProfile>
    216 
    217         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
    218             <Video codec="h264"
    219                    bitRate="6000000"
    220                    width="720"
    221                    height="480"
    222                    frameRate="30" />
    223             <!-- audio setting is ignored -->
    224             <Audio codec="aac"
    225                    bitRate="96000"
    226                    sampleRate="48000"
    227                    channels="1" />
    228         </EncoderProfile>
    229 
    230         <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
    231             <Video codec="h264"
    232                    bitRate="12000000"
    233                    width="1280"
    234                    height="720"
    235                    frameRate="30" />
    236             <!-- audio setting is ignored -->
    237             <Audio codec="aac"
    238                    bitRate="96000"
    239                    sampleRate="48000"
    240                    channels="1" />
    241         </EncoderProfile>
    242 
    243         <EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
    244             <Video codec="h264"
    245                    bitRate="17000000"
    246                    width="1920"
    247                    height="1080"
    248                    frameRate="30" />
    249             <!-- audio setting is ignored -->
    250             <Audio codec="aac"
    251                    bitRate="96000"
    252                    sampleRate="48000"
    253                    channels="1" />
    254         </EncoderProfile>
    255 
    256         <EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30">
    257             <Video codec="h264"
    258                    bitRate="42000000"
    259                    width="3840"
    260                    height="2160"
    261                    frameRate="30" />
    262             <!-- audio setting is ignored -->
    263             <Audio codec="aac"
    264                    bitRate="96000"
    265                    sampleRate="48000"
    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="1">
    277 
    278         <EncoderProfile quality="low" fileFormat="3gp" duration="60">
    279             <Video codec="h264"
    280                     bitRate="128000"
    281                     width="176"
    282                     height="144"
    283                     frameRate="30" />
    284 
    285             <Audio codec="amrnb"
    286                     bitRate="12200"
    287                     sampleRate="8000"
    288                     channels="1" />
    289         </EncoderProfile>
    290 
    291         <EncoderProfile quality="high" fileFormat="mp4" duration="30">
    292             <Video codec="h264"
    293                    bitRate="17000000"
    294                    width="1920"
    295                    height="1080"
    296                    frameRate="30" />
    297             <Audio codec="aac"
    298                    bitRate="96000"
    299                    sampleRate="48000"
    300                    channels="1" />
    301         </EncoderProfile>
    302 
    303         <EncoderProfile quality="qcif" fileFormat="3gp" duration="60">
    304             <Video codec="h264"
    305                    bitRate="128000"
    306                    width="176"
    307                    height="144"
    308                    frameRate="30" />
    309             <Audio codec="amrnb"
    310                    bitRate="12200"
    311                    sampleRate="8000"
    312                    channels="1" />
    313         </EncoderProfile>
    314 
    315         <EncoderProfile quality="qvga" fileFormat="mp4" duration="60">
    316             <Video codec="h264"
    317                    bitRate="512000"
    318                    width="320"
    319                    height="240"
    320                    frameRate="30" />
    321             <Audio codec="aac"
    322                    bitRate="156000"
    323                    sampleRate="48000"
    324                    channels="2" />
    325         </EncoderProfile>
    326 
    327         <EncoderProfile quality="cif" fileFormat="mp4" duration="30">
    328             <Video codec="h264"
    329                    bitRate="1200000"
    330                    width="352"
    331                    height="288"
    332                    frameRate="30" />
    333             <Audio codec="aac"
    334                    bitRate="96000"
    335                    sampleRate="48000"
    336                    channels="1" />
    337         </EncoderProfile>
    338 
    339         <EncoderProfile quality="480p" fileFormat="mp4" duration="30">
    340             <Video codec="h264"
    341                    bitRate="6000000"
    342                    width="720"
    343                    height="480"
    344                    frameRate="30" />
    345             <Audio codec="aac"
    346                    bitRate="96000"
    347                    sampleRate="48000"
    348                    channels="1" />
    349         </EncoderProfile>
    350 
    351         <EncoderProfile quality="720p" fileFormat="mp4" duration="30">
    352             <Video codec="h264"
    353                    bitRate="12000000"
    354                    width="1280"
    355                    height="720"
    356                    frameRate="30" />
    357             <Audio codec="aac"
    358                    bitRate="96000"
    359                    sampleRate="48000"
    360                    channels="1" />
    361         </EncoderProfile>
    362 
    363         <EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
    364             <Video codec="h264"
    365                    bitRate="17000000"
    366                    width="1920"
    367                    height="1080"
    368                    frameRate="30" />
    369             <Audio codec="aac"
    370                    bitRate="96000"
    371                    sampleRate="48000"
    372                    channels="1" />
    373         </EncoderProfile>
    374 
    375         <EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
    376             <Video codec="h264"
    377                    bitRate="192000"
    378                    width="176"
    379                    height="144"
    380                    frameRate="30" />
    381             <!-- audio setting is ignored -->
    382             <Audio codec="amrnb"
    383                    bitRate="12200"
    384                    sampleRate="8000"
    385                    channels="1" />
    386         </EncoderProfile>
    387 
    388         <EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
    389             <Video codec="h264"
    390                    bitRate="1200000"
    391                    width="352"
    392                    height="288"
    393                    frameRate="30" />
    394             <!-- audio setting is ignored -->
    395             <Audio codec="aac"
    396                    bitRate="96000"
    397                    sampleRate="48000"
    398                    channels="1" />
    399         </EncoderProfile>
    400 
    401         <EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
    402             <Video codec="h264"
    403                    bitRate="6000000"
    404                    width="720"
    405                    height="480"
    406                    frameRate="30" />
    407             <!-- audio setting is ignored -->
    408             <Audio codec="aac"
    409                    bitRate="96000"
    410                    sampleRate="48000"
    411                    channels="1" />
    412         </EncoderProfile>
    413 
    414         <EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
    415             <Video codec="h264"
    416                    bitRate="12000000"
    417                    width="1280"
    418                    height="720"
    419                    frameRate="30" />
    420             <!-- audio setting is ignored -->
    421             <Audio codec="aac"
    422                    bitRate="96000"
    423                    sampleRate="48000"
    424                    channels="1" />
    425         </EncoderProfile>
    426 
    427         <ImageEncoding quality="95" />
    428         <ImageEncoding quality="80" />
    429         <ImageEncoding quality="70" />
    430         <ImageDecoding memCap="20000000" />
    431 
    432     </CamcorderProfiles>
    433 
    434     <EncoderOutputFileFormat name="3gp" />
    435     <EncoderOutputFileFormat name="mp4" />
    436 
    437     <!--
    438          If a codec is not enabled, it is invisible to the applications
    439          In other words, the applications won't be able to use the codec
    440          or query the capabilities of the codec at all if it is disabled
    441     -->
    442     <VideoEncoderCap name="h264" enabled="true"
    443         minBitRate="64000" maxBitRate="100000000"
    444         minFrameWidth="176" maxFrameWidth="3840"
    445         minFrameHeight="144" maxFrameHeight="2160"
    446         minFrameRate="15" maxFrameRate="30" />
    447 
    448     <VideoEncoderCap name="h263" enabled="true"
    449         minBitRate="64000" maxBitRate="2000000"
    450         minFrameWidth="176" maxFrameWidth="800"
    451         minFrameHeight="144" maxFrameHeight="480"
    452         minFrameRate="15" maxFrameRate="30" />
    453 
    454     <VideoEncoderCap name="m4v" enabled="true"
    455         minBitRate="64000" maxBitRate="40000000"
    456         minFrameWidth="176" maxFrameWidth="1920"
    457         minFrameHeight="144" maxFrameHeight="1080"
    458         minFrameRate="15" maxFrameRate="30" />
    459 
    460     <AudioEncoderCap name="aac" enabled="true"
    461         minBitRate="758" maxBitRate="288000"
    462         minSampleRate="8000" maxSampleRate="48000"
    463         minChannels="1" maxChannels="1" />
    464 
    465     <AudioEncoderCap name="heaac" enabled="true"
    466         minBitRate="8000" maxBitRate="64000"
    467         minSampleRate="16000" maxSampleRate="48000"
    468         minChannels="1" maxChannels="1" />
    469 
    470     <AudioEncoderCap name="aaceld" enabled="true"
    471         minBitRate="16000" maxBitRate="192000"
    472         minSampleRate="16000" maxSampleRate="48000"
    473         minChannels="1" maxChannels="1" />
    474 
    475     <AudioEncoderCap name="amrwb" enabled="true"
    476         minBitRate="6600" maxBitRate="23050"
    477         minSampleRate="16000" maxSampleRate="16000"
    478         minChannels="1" maxChannels="1" />
    479 
    480     <AudioEncoderCap name="amrnb" enabled="true"
    481         minBitRate="5525" maxBitRate="12200"
    482         minSampleRate="8000" maxSampleRate="8000"
    483         minChannels="1" maxChannels="1" />
    484 
    485     <!--
    486         FIXME:
    487         We do not check decoder capabilities at present
    488         At present, we only check whether windows media is visible
    489         for TEST applications. For other applications, we do
    490         not perform any checks at all.
    491     -->
    492     <VideoDecoderCap name="wmv" enabled="false"/>
    493     <AudioDecoderCap name="wma" enabled="false"/>
    494 </MediaSettings>
    495