File: metainfo-codec.xml

package info (click to toggle)
appstream 1.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,408 kB
  • sloc: ansic: 51,906; xml: 10,459; cpp: 4,721; python: 538; sh: 260; makefile: 24
file content (117 lines) | stat: -rw-r--r-- 4,246 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "AppStream.ent">
%BOOK_ENTITIES;
]>

<section id="sect-Metadata-Codec">
	<title>Codecs</title>

	<section id="spec-codecdata-introduction">
		<title>Introduction</title>
		<para>
			Software centers might want to special-case codec handling. Therefore, we provide a component type for them.
		</para>
		<para>
			Codecs can ship one or more files in <filename>/usr/share/metainfo/%{id}.metainfo.xml</filename>.
		</para>
		<para>
			Codec metadata files can – just like all other metainfo files – be translated. See the section about translation for more information.
		</para>
	</section>

	<section id="spec-codecdata-example">
		<title>Example file</title>
		<para>
			A codec metainfo file should look like this:
		</para>
		<programlisting language="XML">
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<component type="codec">
  <id>org.freedesktop.gstreamer.codecs-good</id>
  <metadata_license>CC0</metadata_license>
  <name>GStreamer Multimedia Codecs - Extra</name>
  <description>
    <p>
      This addon includes several additional codecs that are missing
      something - perhaps a good code review, some documentation, a set of
      tests, a real live maintainer, or some actual wide use.
      However, they might be good enough to play your media files.
    </p>
    <p>
      These codecs can be used to encode and decode media files where the
      format is not patent encumbered.
    </p>
    <p>
      A codec decodes audio and video for for playback or editing and is also
      used for transmission or storage.
      Different codecs are used in video-conferencing, streaming media and
      video editing applications.
    </p>
  </description>
  <provides>
    <codec>encoder-audio/mpeg</codec>
    <codec>mpegversion=(int){ 4, 2 }</codec>
    <codec>stream-format=(string){ adts, raw }</codec>
    <codec>encoder-video/mpeg</codec>
    <codec>systemstream=(boolean)false</codec>
    <codec>mpegversion=(int){ 1, 2, 4 }</codec>
    <codec>encoder-video/mpeg</codec>
    <codec>systemstream=(boolean)true</codec>
    <codec>encoder-video/x-xvid</codec>
    <codec>element-faac</codec>
    <codec>element-mpeg2enc</codec>
    <codec>element-mplex</codec>
    <codec>element-xviddec</codec>
    <codec>element-xvidenc</codec>
  </provides>
</component>]]></programlisting>
	</section>

	<section id="spec-codecdata-filespec">
		<title>File specification</title>
		<para>
			Note that the XML root must have the <literal>type</literal> property set to <code>codec</code>.
			This clearly identifies this metainfo document as describing a codec.
		</para>

		<variablelist>
			<varlistentry id="tag-id-codec">
			<term>&lt;id/&gt;</term>
			<listitem>
				<para>
					For codecs, the <literal>%{id}</literal> must follow the component-id naming conventions (see <xref linkend="tag-id-generic"/>).
				</para>
			</listitem>
			</varlistentry>

			<varlistentry>
			<term>&lt;metadata_license/&gt;</term>
			<listitem>
				<para>
					The <code>&lt;metadata_license/&gt;</code> tag is required. See <xref linkend="sect-Metadata-GenericComponent"/> for a description of this tag.
				</para>
			</listitem>
			</varlistentry>

			<varlistentry id="tag-codec-provides">
			<term>&lt;provides/&gt; ↪ &lt;codec/&gt;</term>
			<listitem>
				<para>
					This tag is described for generic components at <xref linkend="sect-Metadata-GenericComponent"/> in detail.
				</para>
				<para>
					You must add one or more children of type <code>&lt;codec/&gt;</code> to make it known to the system that your
					software is able to provide the mentioned codecs.
					Adding this data is required for all components of <literal>type=codec</literal>.
				</para>
			</listitem>
			</varlistentry>
		</variablelist>

		<para>
			For a component of type <literal>codec</literal>, the following tags are required and must be present: <xref linkend="tag-id-codec"/>, <xref linkend="tag-name"/>,
			<xref linkend="tag-summary"/>, <xref linkend="tag-metadata_license"/>, <xref linkend="tag-codec-provides"/>.
		</para>
	</section>
</section>