Media types and Properties

GStreamer uses a type system to ensure that the data passed between elements is in a recognized format. The type system is also important for ensuring that the parameters required to fully specify a format match up correctly when linking pads between elements. Each link that is made between elements has a specified type and optionally a set of properties. See more about caps negotiation in Caps negotiation.

The Basic Types

GStreamer already supports many basic media types. Following is a table of a few of the basic types used for buffers in GStreamer. The table contains the name ("media type") and a description of the type, the properties associated with the type, and the meaning of each property. A full list of supported types is included in List of Defined Types.

Table 2.1. Table of Example Types

Media TypeDescriptionPropertyProperty TypeProperty ValuesProperty Description
audio/* All audio types rateintegergreater than 0 The sample rate of the data, in samples (per channel) per second.
channelsintegergreater than 0 The number of channels of audio data.
audio/x-raw Unstructured and uncompressed raw integer audio data. formatstring S8 U8 S16LE S16BE U16LE U16BE S24_32LE S24_32BE U24_32LE U24_32BE S32LE S32BE U32LE U32BE S24LE S24BE U24LE U24BE S20LE S20BE U20LE U20BE S18LE S18BE U18LE U18BE F32LE F32BE F64LE F64BE The format of the sample data.
audio/mpeg Audio data compressed using the MPEG audio encoding scheme. mpegversioninteger1, 2 or 4 The MPEG-version used for encoding the data. The value 1 refers to MPEG-1, -2 and -2.5 layer 1, 2 or 3. The values 2 and 4 refer to the MPEG-AAC audio encoding schemes.
framedboolean0 or 1 A true value indicates that each buffer contains exactly one frame. A false value indicates that frames and buffers do not necessarily match up.
layerinteger1, 2, or 3 The compression scheme layer used to compress the data (only if mpegversion=1).
bitrateintegergreater than 0 The bitrate, in bits per second. For VBR (variable bitrate) MPEG data, this is the average bitrate.
audio/x-vorbisVorbis audio data    There are currently no specific properties defined for this type.