Product SiteDocumentation Site

2.5. Codecs

2.5.1. Introduction

Software centers might want to special-case codec handling. Therefore, we provide a component type for them.
Codecs can ship one or more files in /usr/share/metainfo/%{id}.metainfo.xml.
Codec metadata files can - just likle all other metainfo files - be translated. See the section about translation for more information about that.

2.5.2. Example file

A codec meta-info file should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<component type="codec">
  <name>GStreamer Multimedia Codecs - Extra</name>
      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.
      These codecs can be used to encode and decode media files where the
      format is not patent encumbered.
      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.
    <codec>mpegversion=(int){ 4, 2 }</codec>
    <codec>stream-format=(string){ adts, raw }</codec>
    <codec>mpegversion=(int){ 1, 2, 4 }</codec>

2.5.3. File specification

Note that the XML root must have the type property set to codec. This clearly identified this metainfo document as describing a codec.
For codecs, there are no special requirements for what their %{id} should be. But, as for any other component, you should pick a reasonable and unique name.
The <metadata_license/> tag is required. See Section 2.1, “Generic Component” for a description of this tag.
<provides/> ↪ <codec/>
This tag is described for generic components at Section 2.1, “Generic Component” in detail.
You must add one or more children of type <codec/> 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 type=codec.
For a component of type codec, the following tags are required and must be present: <id/>, <name/>, <summary/>, <metadata_license/>, <provides/> ↪ <codec/>.