Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

2.10 Codecs

2.10.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 like all other metainfo files – be translated. See the section about translation for more information.

2.10.2 Example file

A codec metainfo file should look like this:

<?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>

2.10.3 File specification

Note that the XML root must have the type property set to codec. This clearly identifies this metainfo document as describing a codec.

<id/> 

For codecs, the %{id} must follow the component-id naming conventions (see <id/>).

<metadata_license/>

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/>.