1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3/*
4** Copyright 2017, The Android Open Source Project.
5**
6** Licensed under the Apache License, Version 2.0 (the "License");
7** you may not use this file except in compliance with the License.
8** You may obtain a copy of the License at
9**
10**     http://www.apache.org/licenses/LICENSE-2.0
11**
12** Unless required by applicable law or agreed to in writing, software
13** distributed under the License is distributed on an "AS IS" BASIS,
14** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15** See the License for the specific language governing permissions and
16** limitations under the License.
17*/
18-->
19
20<!--
21<!DOCTYPE MediaCodecs [
22<!ELEMENT Include EMPTY>
23<!ATTLIST Include href CDATA #REQUIRED>
24<!ELEMENT MediaCodecs (Decoders|Encoders|Include)*>
25<!ELEMENT Decoders (MediaCodec|Include)*>
26<!ELEMENT Encoders (MediaCodec|Include)*>
27<!ELEMENT MediaCodec (Type|Quirk|Include)*>
28<!ATTLIST MediaCodec name CDATA #REQUIRED>
29<!ATTLIST MediaCodec type CDATA>
30<!ELEMENT Type EMPTY>
31<!ATTLIST Type name CDATA #REQUIRED>
32<!ELEMENT Quirk EMPTY>
33<!ATTLIST Quirk name CDATA #REQUIRED>
34]>
35
36There's a simple and a complex syntax to declare the availability of a
37media codec:
38
39A codec that properly follows the OpenMax spec and therefore doesn't have any
40quirks and that only supports a single content type can be declared like so:
41
42    <MediaCodec name="OMX.foo.bar" type="something/interesting" />
43
44If a codec has quirks OR supports multiple content types, the following syntax
45can be used:
46
47    <MediaCodec name="OMX.foo.bar" >
48        <Type name="something/interesting" />
49        <Type name="something/else" />
50        ...
51        <Quirk name="requires-allocate-on-input-ports" />
52        <Quirk name="requires-allocate-on-output-ports" />
53        <Quirk name="output-buffers-are-unreadable" />
54    </MediaCodec>
55
56Only the three quirks included above are recognized at this point:
57
58"requires-allocate-on-input-ports"
59    must be advertised if the component does not properly support specification
60    of input buffers using the OMX_UseBuffer(...) API but instead requires
61    OMX_AllocateBuffer to be used.
62
63"requires-allocate-on-output-ports"
64    must be advertised if the component does not properly support specification
65    of output buffers using the OMX_UseBuffer(...) API but instead requires
66    OMX_AllocateBuffer to be used.
67
68"output-buffers-are-unreadable"
69    must be advertised if the emitted output buffers of a decoder component
70    are not readable, i.e. use a custom format even though abusing one of
71    the official OMX colorspace constants.
72    Clients of such decoders will not be able to access the decoded data,
73    naturally making the component much less useful. The only use for
74    a component with this quirk is to render the output to the screen.
75    Audio decoders MUST NOT advertise this quirk.
76    Video decoders that advertise this quirk must be accompanied by a
77    corresponding color space converter for thumbnail extraction,
78    matching surfaceflinger support that can render the custom format to
79    a texture and possibly other code, so just DON'T USE THIS QUIRK.
80
81-->
82
83<MediaCodecs>
84    <Settings>
85        <Setting name="max-video-encoder-input-buffers" value="12" />
86    </Settings>
87
88    <Include href="media_codecs_google_audio.xml" />
89    <Include href="media_codecs_google_telephony.xml" />
90    <Include href="media_codecs_google_video.xml" />
91</MediaCodecs>
92