Enums

Details

class GstAudio.AudioBaseSinkDiscontReason(value)

Bases: GObject.GEnum

Different possible reasons for discontinuities. This enum is useful for the custom slave method.

New in version 1.6.

NO_DISCONT = 0

No discontinuity occurred

NEW_CAPS = 1

New caps are set, causing renegotiotion

FLUSH = 2

Samples have been flushed

SYNC_LATENCY = 3

Sink was synchronized to the estimated latency (occurs during initialization)

ALIGNMENT = 4

Aligning buffers failed because the timestamps are too discontinuous

DEVICE_FAILURE = 5

Audio output device experienced and recovered from an error but introduced latency in the process (see also gst_audio_base_sink_report_device_failure())

class GstAudio.AudioBaseSinkSlaveMethod(value)

Bases: GObject.GEnum

Different possible clock slaving algorithms used when the internal audio clock is not selected as the pipeline master clock.

RESAMPLE = 0

Resample to match the master clock

SKEW = 1

Adjust playout pointer when master clock drifts too much.

NONE = 2

No adjustment is done.

CUSTOM = 3

Use custom clock slaving algorithm (Since: 1.6)

class GstAudio.AudioBaseSrcSlaveMethod(value)

Bases: GObject.GEnum

Different possible clock slaving algorithms when the internal audio clock was not selected as the pipeline clock.

RESAMPLE = 0

Resample to match the master clock.

RE_TIMESTAMP = 1

Retimestamp output buffers with master clock time.

SKEW = 2

Adjust capture pointer when master clock drifts too much.

NONE = 3

No adjustment is done.

class GstAudio.AudioCdSrcMode(value)

Bases: GObject.GEnum

Mode in which the CD audio source operates. Influences timestamping, EOS handling and seeking.

NORMAL = 0

each single track is a stream

CONTINUOUS = 1

the entire disc is a single stream

class GstAudio.AudioChannelPosition(value)

Bases: GObject.GEnum

Audio channel positions.

These are the channels defined in SMPTE 2036-2-2008 Table 1 for 22.2 audio systems with the Surround and Wide channels from DTS Coherent Acoustics (v.1.3.1) and 10.2 and 7.1 layouts. In the caps the actual channel layout is expressed with a channel count and a channel mask, which describes the existing channels. The positions in the bit mask correspond to the enum values. For negotiation it is allowed to have more bits set in the channel mask than the number of channels to specify the allowed channel positions but this is not allowed in negotiated caps. It is not allowed in any situation other than the one mentioned below to have less bits set in the channel mask than the number of channels.

GstAudio.AudioChannelPosition.MONO can only be used with a single mono channel that has no direction information and would be mixed into all directional channels. This is expressed in caps by having a single channel and no channel mask.

GstAudio.AudioChannelPosition.NONE can only be used if all channels have this position. This is expressed in caps by having a channel mask with no bits set.

As another special case it is allowed to have two channels without a channel mask. This implicitely means that this is a stereo stream with a front left and front right channel.

INVALID = -1

invalid position

MONO = -2

Mono without direction; can only be used with 1 channel

NONE = -3

used for position-less channels, e.g. from a sound card that records 1024 channels; mutually exclusive with any other channel position

FRONT_LEFT = 0

Front left

FRONT_RIGHT = 1

Front right

SIDE_LEFT = 10

Side left

SIDE_RIGHT = 11

Side right

TOP_FRONT_LEFT = 12

Top front left

TOP_FRONT_RIGHT = 13

Top front right

TOP_FRONT_CENTER = 14

Top front center

TOP_CENTER = 15

Top center

TOP_REAR_LEFT = 16

Top rear left

TOP_REAR_RIGHT = 17

Top rear right

TOP_SIDE_LEFT = 18

Top side right

TOP_SIDE_RIGHT = 19

Top rear right

FRONT_CENTER = 2

Front center

TOP_REAR_CENTER = 20

Top rear center

BOTTOM_FRONT_CENTER = 21

Bottom front center

BOTTOM_FRONT_LEFT = 22

Bottom front left

BOTTOM_FRONT_RIGHT = 23

Bottom front right

WIDE_LEFT = 24

Wide left (between front left and side left)

WIDE_RIGHT = 25

Wide right (between front right and side right)

SURROUND_LEFT = 26

Surround left (between rear left and side left)

SURROUND_RIGHT = 27

Surround right (between rear right and side right)

LFE1 = 3

Low-frequency effects 1 (subwoofer)

REAR_LEFT = 4

Rear left

REAR_RIGHT = 5

Rear right

FRONT_LEFT_OF_CENTER = 6

Front left of center

FRONT_RIGHT_OF_CENTER = 7

Front right of center

REAR_CENTER = 8

Rear center

LFE2 = 9

Low-frequency effects 2 (subwoofer)

class GstAudio.AudioDitherMethod(value)

Bases: GObject.GEnum

Set of available dithering methods.

NONE = 0

No dithering

RPDF = 1

Rectangular dithering

TPDF = 2

Triangular dithering (default)

TPDF_HF = 3

High frequency triangular dithering

class GstAudio.AudioFormat(value)

Bases: GObject.GEnum

Enum value describing the most common audio formats.

classmethod build_integer(sign, endianness, width, depth)[source]
Parameters:
Returns:

a GstAudio.AudioFormat or GstAudio.AudioFormat.UNKNOWN when no audio format exists with the given parameters.

Return type:

GstAudio.AudioFormat

Construct a GstAudio.AudioFormat with given parameters.

classmethod fill_silence(info, dest)[source]
Parameters:

Fill length bytes in dest with silence samples for info.

classmethod from_string(format)[source]
Parameters:format (str) – a format string
Returns:the GstAudio.AudioFormat for format or GstAudio.AudioFormat.UNKNOWN when the string is not a known format.
Return type:GstAudio.AudioFormat

Convert the format string to its GstAudio.AudioFormat.

classmethod get_info(format)[source]
Parameters:format (GstAudio.AudioFormat) – a GstAudio.AudioFormat
Returns:The GstAudio.AudioFormatInfo for format.
Return type:GstAudio.AudioFormatInfo

Get the GstAudio.AudioFormatInfo for format

classmethod to_string(format)[source]
Parameters:format (GstAudio.AudioFormat) –
Return type:str
UNKNOWN = 0

unknown or unset audio format

ENCODED = 1

encoded audio format

U24_32 = 10

24 bits in 32 bits, unsigned, native endianness

U24_32LE = 10

24 bits in 32 bits, unsigned, little endian

U24_32BE = 11

24 bits in 32 bits, unsigned, big endian

S32 = 12

32 bits in 32 bits, signed, native endianness

S32LE = 12

32 bits in 32 bits, signed, little endian

S32BE = 13

32 bits in 32 bits, signed, big endian

U32 = 14

32 bits in 32 bits, unsigned, native endianness

U32LE = 14

32 bits in 32 bits, unsigned, little endian

U32BE = 15

32 bits in 32 bits, unsigned, big endian

S24 = 16

24 bits in 24 bits, signed, native endianness

S24LE = 16

24 bits in 24 bits, signed, little endian

S24BE = 17

24 bits in 24 bits, signed, big endian

U24 = 18

24 bits in 24 bits, unsigned, native endianness

U24LE = 18

24 bits in 24 bits, unsigned, little endian

U24BE = 19

24 bits in 24 bits, unsigned, big endian

S8 = 2

8 bits in 8 bits, signed

S20 = 20

20 bits in 24 bits, signed, native endianness

S20LE = 20

20 bits in 24 bits, signed, little endian

S20BE = 21

20 bits in 24 bits, signed, big endian

U20 = 22

20 bits in 24 bits, unsigned, native endianness

U20LE = 22

20 bits in 24 bits, unsigned, little endian

U20BE = 23

20 bits in 24 bits, unsigned, big endian

S18 = 24

18 bits in 24 bits, signed, native endianness

S18LE = 24

18 bits in 24 bits, signed, little endian

S18BE = 25

18 bits in 24 bits, signed, big endian

U18 = 26

18 bits in 24 bits, unsigned, native endianness

U18LE = 26

18 bits in 24 bits, unsigned, little endian

U18BE = 27

18 bits in 24 bits, unsigned, big endian

F32 = 28

32-bit floating point samples, native endianness

F32LE = 28

32-bit floating point samples, little endian

F32BE = 29

32-bit floating point samples, big endian

U8 = 3

8 bits in 8 bits, unsigned

F64 = 30

64-bit floating point samples, native endianness

F64LE = 30

64-bit floating point samples, little endian

F64BE = 31

64-bit floating point samples, big endian

S16 = 4

16 bits in 16 bits, signed, native endianness

S16LE = 4

16 bits in 16 bits, signed, little endian

S16BE = 5

16 bits in 16 bits, signed, big endian

U16 = 6

16 bits in 16 bits, unsigned, native endianness

U16LE = 6

16 bits in 16 bits, unsigned, little endian

U16BE = 7

16 bits in 16 bits, unsigned, big endian

S24_32 = 8

24 bits in 32 bits, signed, native endianness

S24_32LE = 8

24 bits in 32 bits, signed, little endian

S24_32BE = 9

24 bits in 32 bits, signed, big endian

class GstAudio.AudioLayout(value)

Bases: GObject.GEnum

Layout of the audio samples for the different channels.

INTERLEAVED = 0

interleaved audio

NON_INTERLEAVED = 1

non-interleaved audio

class GstAudio.AudioNoiseShapingMethod(value)

Bases: GObject.GEnum

Set of available noise shaping methods

NONE = 0

No noise shaping (default)

ERROR_FEEDBACK = 1

Error feedback

SIMPLE = 2

Simple 2-pole noise shaping

MEDIUM = 3

Medium 5-pole noise shaping

HIGH = 4

High 8-pole noise shaping

class GstAudio.AudioResamplerFilterInterpolation(value)

Bases: GObject.GEnum

The different filter interpolation methods.

NONE = 0

no interpolation

LINEAR = 1

linear interpolation of the filter coeficients.

CUBIC = 2

cubic interpolation of the filter coeficients.

class GstAudio.AudioResamplerFilterMode(value)

Bases: GObject.GEnum

Select for the filter tables should be set up.

INTERPOLATED = 0

Use interpolated filter tables. This uses less memory but more CPU and is slightly less accurate but it allows for more efficient variable rate resampling with GstAudio.AudioResampler.update().

FULL = 1

Use full filter table. This uses more memory but less CPU.

AUTO = 2

Automatically choose between interpolated and full filter tables.

class GstAudio.AudioResamplerMethod(value)

Bases: GObject.GEnum

Different subsampling and upsampling methods

New in version 1.6.

NEAREST = 0

Duplicates the samples when upsampling and drops when downsampling

LINEAR = 1

Uses linear interpolation to reconstruct missing samples and averaging to downsample

CUBIC = 2

Uses cubic interpolation

BLACKMAN_NUTTALL = 3

Uses Blackman-Nuttall windowed sinc interpolation

KAISER = 4

Uses Kaiser windowed sinc interpolation

class GstAudio.AudioRingBufferFormatType(value)

Bases: GObject.GEnum

The format of the samples in the ringbuffer.

RAW = 0

samples in linear or float

MU_LAW = 1

samples in mulaw

MPEG2_AAC = 10

samples in MPEG-2 AAC ADTS format

MPEG4_AAC = 11

samples in MPEG-4 AAC ADTS format

MPEG2_AAC_RAW = 12

samples in MPEG-2 AAC raw format (Since 1.12)

MPEG4_AAC_RAW = 13

samples in MPEG-4 AAC raw format (Since 1.12)

FLAC = 14

samples in FLAC format (Since 1.12)

A_LAW = 2

samples in alaw

IMA_ADPCM = 3

samples in ima adpcm

MPEG = 4

samples in mpeg audio (but not AAC) format

GSM = 5

samples in gsm format

IEC958 = 6

samples in IEC958 frames (e.g. AC3)

AC3 = 7

samples in AC3 format

EAC3 = 8

samples in EAC3 format

DTS = 9

samples in DTS format

class GstAudio.AudioRingBufferState(value)

Bases: GObject.GEnum

The state of the ringbuffer.

STOPPED = 0

The ringbuffer is stopped

PAUSED = 1

The ringbuffer is paused

STARTED = 2

The ringbuffer is started

ERROR = 3

The ringbuffer has encountered an error after it has been started, e.g. because the device was disconnected (Since 1.2)

class GstAudio.StreamVolumeFormat(value)

Bases: GLib.Enum

Different representations of a stream volume. GstAudio.StreamVolume.convert_volume() allows to convert between the different representations.

Formulas to convert from a linear to a cubic or dB volume are cbrt(val) and 20 * log10 (val).

LINEAR = 0

Linear scale factor, 1.0 = 100%

CUBIC = 1

Cubic volume scale

DB = 2

Logarithmic volume scale (dB, amplitude not power)