SHARE
TWEET

media_codecs.xml

a guest Jan 20th, 2017 224 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="utf-8" ?>
  2.  
  3. <!-- Copyright 2013 The Android Open Source Project
  4.  
  5.  
  6.  
  7.     Licensed under the Apache License, Version 2.0 (the "License");
  8.  
  9.     you may not use this file except in compliance with the License.
  10.  
  11.     You may obtain a copy of the License at
  12.  
  13.  
  14.  
  15.          http://www.apache.org/licenses/LICENSE-2.0
  16.  
  17.  
  18.  
  19.     Unless required by applicable law or agreed to in writing, software
  20.  
  21.     distributed under the License is distributed on an "AS IS" BASIS,
  22.  
  23.     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  24.  
  25.     See the License for the specific language governing permissions and
  26.  
  27.     limitations under the License.
  28.  
  29. -->
  30.  
  31.  
  32.  
  33. <!--
  34.  
  35. <!DOCTYPE MediaCodecs [
  36.  
  37. <!ELEMENT Include EMPTY>
  38.  
  39. <!ATTLIST Include href CDATA #REQUIRED>
  40.  
  41. <!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
  42.  
  43. <!ELEMENT Decoders (MediaCodec|Include)*>
  44.  
  45. <!ELEMENT Encoders (MediaCodec|Include)*>
  46.  
  47. <!ELEMENT MediaCodec (Type|Quirk|Include)*>
  48.  
  49. <!ATTLIST MediaCodec name CDATA #REQUIRED>
  50.  
  51. <!ATTLIST MediaCodec type CDATA>
  52.  
  53. <!ELEMENT Type EMPTY>
  54.  
  55. <!ATTLIST Type name CDATA #REQUIRED>
  56.  
  57. <!ELEMENT Quirk EMPTY>
  58.  
  59. <!ATTLIST Quirk name CDATA #REQUIRED>
  60.  
  61. ]>
  62.  
  63.  
  64.  
  65. There's a simple and a complex syntax to declare the availability of a
  66.  
  67. media codec:
  68.  
  69.  
  70.  
  71. A codec that properly follows the OpenMax spec and therefore doesn't have any
  72.  
  73. quirks and that only supports a single content type can be declared like so:
  74.  
  75.  
  76.  
  77.    <MediaCodec name="OMX.foo.bar" type="something/interesting" />
  78.  
  79.  
  80.  
  81. If a codec has quirks OR supports multiple content types, the following syntax
  82.  
  83. can be used:
  84.  
  85.  
  86.  
  87.    <MediaCodec name="OMX.foo.bar" >
  88.  
  89.        <Type name="something/interesting" />
  90.  
  91.        <Type name="something/else" />
  92.  
  93.        ...
  94.  
  95.        <Quirk name="requires-allocate-on-input-ports" />
  96.  
  97.        <Quirk name="requires-allocate-on-output-ports" />
  98.  
  99.        <Quirk name="output-buffers-are-unreadable" />
  100.  
  101.    </MediaCodec>
  102.  
  103.  
  104.  
  105. Only the three quirks included above are recognized at this point:
  106.  
  107.  
  108.  
  109. "requires-allocate-on-input-ports"
  110.  
  111.    must be advertised if the component does not properly support specification
  112.  
  113.    of input buffers using the OMX_UseBuffer(...) API but instead requires
  114.  
  115.    OMX_AllocateBuffer to be used.
  116.  
  117.  
  118.  
  119. "requires-allocate-on-output-ports"
  120.  
  121.    must be advertised if the component does not properly support specification
  122.  
  123.    of output buffers using the OMX_UseBuffer(...) API but instead requires
  124.  
  125.    OMX_AllocateBuffer to be used.
  126.  
  127.  
  128.  
  129. "output-buffers-are-unreadable"
  130.  
  131.    must be advertised if the emitted output buffers of a decoder component
  132.  
  133.    are not readable, i.e. use a custom format even though abusing one of
  134.  
  135.    the official OMX colorspace constants.
  136.  
  137.    Clients of such decoders will not be able to access the decoded data,
  138.  
  139.    naturally making the component much less useful. The only use for
  140.  
  141.    a component with this quirk is to render the output to the screen.
  142.  
  143.    Audio decoders MUST NOT advertise this quirk.
  144.  
  145.    Video decoders that advertise this quirk must be accompanied by a
  146.  
  147.    corresponding color space converter for thumbnail extraction,
  148.  
  149.    matching surfaceflinger support that can render the custom format to
  150.  
  151.    a texture and possibly other code, so just DON'T USE THIS QUIRK.
  152.  
  153.  
  154.  
  155.  
  156.  
  157. -->
  158.  
  159.  
  160.  
  161. <MediaCodecs>
  162.  
  163.     <Encoders>
  164.  
  165.         <MediaCodec name="OMX.MARVELL.VIDEO.HW.CODA7542ENCODER" >
  166.  
  167.             <Type name="video/mp4v-es" >
  168.  
  169.                 <Limit name="size" min="64x64" max="1920x1088" />
  170.  
  171.                 <Limit name="alignment" value="2x2" />
  172.  
  173.             </Type>
  174.  
  175.             <Type name="video/3gpp" >
  176.  
  177.                 <Limit name="size" min="64x64" max="704x576" />
  178.  
  179.                 <Limit name="alignment" value="16x16" />
  180.  
  181.             </Type>
  182.  
  183.             <Type name="video/avc" >
  184.  
  185.                 <Limit name="size" min="64x64" max="1920x1088" />
  186.  
  187.             </Type>
  188.  
  189.             <Quirk name="avoid-memcpy-input-recording-frames"/>
  190.  
  191.         </MediaCodec>
  192.  
  193. <!--
  194.  
  195.        <MediaCodec name="OMX.MARVELL.VIDEO.MPEG4ENCODER" type="video/mp4v-es" >
  196.  
  197.            <Limit name="size" min="16x16" max="640x480" />
  198.  
  199.            <Limit name="alignment" value="2x2" />
  200.  
  201.            <Limit name="block-size" value="16x16" />
  202.  
  203.            <Limit name="frame-rate" range="1-30" />
  204.  
  205.            <Limit name="bitrate" range="100-4000000" />
  206.  
  207.        </MediaCodec>
  208.  
  209.        <MediaCodec name="OMX.MARVELL.VIDEO.H263ENCODER" type="video/3gpp" >
  210.  
  211.           <Limit name="size" min="128x96" max="352x288" />
  212.  
  213.            <Limit name="alignment" value="16x16" />
  214.  
  215.            <Limit name="block-size" value="16x16" />
  216.  
  217.           <Limit name="bitrate" range="100-512000" />
  218.  
  219.           <Limit name="frame-rate" range="1-30" />
  220.  
  221.        </MediaCodec>
  222.  
  223.        <MediaCodec name="OMX.MARVELL.VIDEO.H264ENCODER" type="video/avc" >
  224.  
  225.            <Limit name="size" min="16x16" max="640x480" />
  226.  
  227.            <Limit name="alignment" value="2x2" />
  228.  
  229.            <Limit name="frame-rate" range="1-30" />
  230.  
  231.            <Limit name="bitrate" range="100-4000000" />
  232.  
  233.        </MediaCodec>
  234.  
  235. -->    
  236.  
  237.     </Encoders>
  238.  
  239.     <Decoders>
  240.  
  241.         <MediaCodec name="OMX.MARVELL.VIDEO.HW.CODA7542DECODER" >
  242.  
  243.             <Type name="video/mp4v-es" />
  244.  
  245.             <Type name="video/3gpp" />
  246.  
  247.             <Type name="video/avc" >
  248.  
  249.                 <Feature name="adaptive-playback" />
  250.  
  251.             </Type>
  252.  
  253.             <Quirk name="requires-allocate-on-output-ports"/>
  254.  
  255.             <Quirk name="video-controller-check-enable" />
  256.  
  257.         </MediaCodec>
  258.  
  259.         <MediaCodec name="OMX.MARVELL.VIDEO.HW.CODA7542DECODER.secure" type="video/avc" >
  260.  
  261.             <Feature name="adaptive-playback" />
  262.  
  263.             <Feature name="secure-playback" required="true" />
  264.  
  265.             <Quirk name="video-controller-check-enable" />
  266.  
  267.         </MediaCodec>
  268.  
  269.         <!-- Video Software -->
  270.  
  271.         <MediaCodec name="OMX.SEC.h263.sw.dec" type="video/3gpp" >
  272.  
  273.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  274.  
  275.             </MediaCodec>
  276.  
  277.         <MediaCodec name="OMX.SEC.avc.sw.dec" type="video/avc" >
  278.  
  279.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  280.  
  281.             <Limit name="size" min="64x64" max="2048x2048" />
  282.  
  283.             <Feature name="adaptive-playback" />
  284.  
  285.         </MediaCodec>
  286.  
  287.         <MediaCodec name="OMX.SEC.mpeg4.sw.dec" type="video/mp4v-es" >
  288.  
  289.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  290.  
  291.             </MediaCodec>
  292.  
  293.         <MediaCodec name="OMX.SEC.hevc.sw.dec" type="video/hevc" >
  294.  
  295.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  296.  
  297.             <Limit name="size" min="64x64" max="2048x2048" />
  298.  
  299.             <Feature name="adaptive-playback" />
  300.  
  301.         </MediaCodec>
  302.  
  303.         <MediaCodec name="OMX.SEC.vp8.dec" type="video/x-vnd.on2.vp8" >
  304.  
  305.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  306.  
  307.             <Limit name="size" min="64x64" max="2048x2048" />
  308.  
  309.             <Feature name="adaptive-playback" />
  310.  
  311.         </MediaCodec>      
  312.  
  313. <!--    we don't use marvell S/W codecs
  314.  
  315.        <MediaCodec name="OMX.MARVELL.VIDEO.MPEG4ASPDECODER" type="video/mp4v-es" />
  316.  
  317.        <MediaCodec name="OMX.MARVELL.VIDEO.H263DECODER" type="video/3gpp" />
  318.  
  319.        <MediaCodec name="OMX.MARVELL.VIDEO.H264DECODER" type="video/avc" />
  320.  
  321.        <MediaCodec name="OMX.MARVELL.VIDEO.H265DECODER" type="video/hevc" />
  322.  
  323. -->
  324.  
  325.         <!-- Audio Software  -->
  326.  
  327.         <MediaCodec name="OMX.SEC.amr.dec">
  328.  
  329.             <Type name="audio/amr-wb" />
  330.  
  331.             <Type name="audio/3gpp"  />
  332.  
  333.             <Quirk name="needs-flush-before-disable" />
  334.  
  335.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  336.  
  337.         </MediaCodec>  
  338.  
  339.         <MediaCodec name="OMX.SEC.mp3.dec">
  340.  
  341.             <Type name="audio/mpeg"/>
  342.  
  343.             <Type name="audio/mpeg-L1"/>
  344.  
  345.             <Type name="audio/mpeg-L2"/>
  346.  
  347.             <Quirk name="needs-flush-before-disable" />
  348.  
  349.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  350.  
  351.         </MediaCodec>
  352.  
  353.         <MediaCodec name="OMX.SEC.aac.dec" type="audio/mp4a-latm" >
  354.  
  355.             <Quirk name="needs-flush-before-disable" />
  356.  
  357.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  358.  
  359.         </MediaCodec>
  360.  
  361.         <MediaCodec name="OMX.SEC.flac.dec" type="audio/flac" >
  362.  
  363.             <Quirk name="needs-flush-before-disable" />
  364.  
  365.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  366.  
  367.         </MediaCodec>
  368.  
  369.         <MediaCodec name="OMX.SEC.adpcm.dec" type="audio/x-ima" >
  370.  
  371.             <Quirk name="needs-flush-before-disable" />
  372.  
  373.             <Quirk name="decoder-ignores-streamcorrupt-error" />
  374.  
  375.         </MediaCodec>
  376.  
  377.     </Decoders>
  378.  
  379.  
  380.  
  381.     <Include href="media_codecs_google_audio.xml" />
  382.  
  383.     <Include href="media_codecs_google_telephony.xml" />
  384.  
  385.     <Include href="media_codecs_google_video.xml" />
  386.  
  387.  
  388.  
  389. </MediaCodecs>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top