GStreamer Plugin Writer's Guide | ||
---|---|---|
<<< Previous | Next >>> |
This is a list of the basic types used for buffers. For each type, we give the name ("mime type") of the type, the list of properties which are associated with the type, the meaning of each property, and the purpose of the type.
audio/raw - Unstructured and uncompressed raw audio data.
rate - The sample rate of the data, in samples per second.
channels - The number of channels of audio data.
format - This describes the format in which the audio data is passed. This is a string for which there are currently two valid values: "int" for integer data and "float" for floating point data.
law - Valid only if format=int. The law used to describe the data. This is an integer for which there are three valid values: 0 for linear, 1 for mu law, 2 for A law.
endianness - Valid only if format=int. The order of bytes in a sample. This is a boolean: 0 means little-endian (ie, bytes are least significant first), 1 means big-endian (ie, most significant byte first).
signed - Valid only if format=int. Whether the samples are signed or not. This is a boolean: 0 means unsigned, 1 means signed.
width - Valid only if format=int. The number of bits per sample. This is extremely likely to be a multiple of 8, but as ever this is up to each element supporting this format to specify.
depth - Valid only if format=int. The number of bits used per sample. This must be less than or equal to the width: if less than the width, the low bits are assumed to be the ones used. For example, width=32, depth=24 means that each sample is stored in a 32 bit word, but only the low 24 bits are actually used.
layout - Valid only if format=float. A string representing the way in which the floating point data is represented. For now, the only valid value is gfloat, meaning that the data is passed as a series of gfloat values.
intercept - Valid only if format=float. A floating point value representing the value that the signal "centres" on.
slope - Valid only if format=float. A floating point value representing how far the signal deviates from the intercept. So a slope of 1.0 and an intercept of 0.0 would mean an audio signal with minimum and maximum values of -1.0 and 1.0. A slope of 0.5 and intercept of 0.5 would represent values in the range 0.0 to 1.0.
For example: 16 bit integer, unsigned, linear, monophonic, big-endian, 44100KHz audio would be represented by "format=int,law=0,endianness=1,signed=0,width=16,depth=16,rate=44100,channels=1" and floating point, using gfloat's, in the range -1.0 to 1.0, 8000KHz stereo audio would be represented by "format=float,layout=gfloat,intercept=0.0,slope=1.0,rate=8000,channels=2"
audio/mp3 - Audio data compressed using the mp3 encoding scheme.
framed - This is a boolean. If true (1), each buffer contains exactly one frame. If false (0), frames and buffers do not (necessarily) match up. If the data is not framed, the values of some of the properties will not be available, but others will be assumed to be constant throughout the file, or may be found in other ways.
layer - The compression scheme layer used to compress the data. This is an integer, and can currently have the value 1, 2 or 3.
bitrate - The bitrate, in kilobits per second. For VBR (variable bitrate) mp3 data, this is the average bitrate.
channels - The number of channels of audio data present. This could theoretically be any integer greater than 0, but in practice will be either 1 or 2.
joint-stereo - Boolean. If true, channels must not be zero. If true, this implies that stereo data is stored as a combined signal and the difference between the signals, rather than as two entirely separate signals.
There are many other properties relevant for audio/mp3 data: these may be added to this specification at a later date.
audio/x-ogg - Audio data compressed using the Ogg Vorbis encoding scheme. There are currently no parameters defined for this type. FIXME.
video/raw - Raw video data.
fourcc - A FOURCC code identifying the format in which this data is stored. FOURCC (Four Character Code) is a simple system to allow unambiguous identification of a video datastream format. See http://www.webartz.com/fourcc/
width - The number of pixels wide that each video frame is.
height - The number of pixels high that each video frame is.
video/mpeg - Video data compressed using an mpeg encoding scheme.
mpegversion
systemstream
video/avi - Video data compressed using the AVI encoding scheme. There are currently no parameters defined for this type. FIXME.
<<< Previous | Home | Next >>> |
Types and Properties | Up | Building a simple format for testing |