blob: 2b00568d000abb5c1694dbf74f9029163d8c38c3 [file] [log] [blame]
Amit Pundirc738b812019-06-19 16:13:49 +05301<?xml version="1.0" encoding="utf-8" ?>
2<!-- Copyright (C) 2012 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
17<!--
18<!DOCTYPE MediaCodecs [
19<!ELEMENT MediaCodecs (Decoders,Encoders)>
20<!ELEMENT Decoders (MediaCodec*)>
21<!ELEMENT Encoders (MediaCodec*)>
22<!ELEMENT MediaCodec (Type*,Quirk*)>
23<!ATTLIST MediaCodec name CDATA #REQUIRED>
24<!ATTLIST MediaCodec type CDATA>
25<!ELEMENT Type EMPTY>
26<!ATTLIST Type name CDATA #REQUIRED>
27<!ELEMENT Quirk EMPTY>
28<!ATTLIST Quirk name CDATA #REQUIRED>
29]>
30
31There's a simple and a complex syntax to declare the availability of a
32media codec:
33
34A codec that properly follows the OpenMax spec and therefore doesn't have any
35quirks and that only supports a single content type can be declared like so:
36
37 <MediaCodec name="OMX.foo.bar" type="something/interesting" />
38
39If a codec has quirks OR supports multiple content types, the following syntax
40can be used:
41
42 <MediaCodec name="OMX.foo.bar" >
43 <Type name="something/interesting" />
44 <Type name="something/else" />
45 ...
46 <Quirk name="requires-allocate-on-input-ports" />
47 <Quirk name="requires-allocate-on-output-ports" />
48 <Quirk name="output-buffers-are-unreadable" />
49 </MediaCodec>
50
51Only the three quirks included above are recognized at this point:
52
53"requires-allocate-on-input-ports"
54 must be advertised if the component does not properly support specification
55 of input buffers using the OMX_UseBuffer(...) API but instead requires
56 OMX_AllocateBuffer to be used.
57
58"requires-allocate-on-output-ports"
59 must be advertised if the component does not properly support specification
60 of output buffers using the OMX_UseBuffer(...) API but instead requires
61 OMX_AllocateBuffer to be used.
62
63"output-buffers-are-unreadable"
64 must be advertised if the emitted output buffers of a decoder component
65 are not readable, i.e. use a custom format even though abusing one of
66 the official OMX colorspace constants.
67 Clients of such decoders will not be able to access the decoded data,
68 naturally making the component much less useful. The only use for
69 a component with this quirk is to render the output to the screen.
70 Audio decoders MUST NOT advertise this quirk.
71 Video decoders that advertise this quirk must be accompanied by a
72 corresponding color space converter for thumbnail extraction,
73 matching surfaceflinger support that can render the custom format to
74 a texture and possibly other code, so just DON'T USE THIS QUIRK.
75
76-->
77
78<MediaCodecs>
79 <Include href="media_codecs_google_audio.xml" />
80 <Include href="media_codecs_google_video.xml" />
81</MediaCodecs>