GstAudioInfo

Information describing audio properties. This information can be filled in from GstCaps with gst_audio_info_from_caps.

Use the provided macros to access the info in this structure.

Members

finfo (const GstAudioFormatInfo *) –

the format info of the audio

flags (GstAudioFlags) –

additional audio flags

layout (GstAudioLayout) –

audio layout

rate (gint) –

the audio sample rate

channels (gint) –

the number of channels

bpf (gint) –

the number of bytes for one frame, this is the size of one sample * channels

position (GstAudioChannelPosition *) –

the positions for each channel


GstAudio.AudioInfo

Information describing audio properties. This information can be filled in from GstCaps with GstAudio.prototype.audio_info_from_caps.

Use the provided macros to access the info in this structure.

Members

the format info of the audio

flags (GstAudio.AudioFlags) –

additional audio flags

layout (GstAudio.AudioLayout) –

audio layout

rate (Number) –

the audio sample rate

channels (Number) –

the number of channels

bpf (Number) –

the number of bytes for one frame, this is the size of one sample * channels

position ([ GstAudio.AudioChannelPosition ]) –

the positions for each channel


GstAudio.AudioInfo

Information describing audio properties. This information can be filled in from GstCaps with GstAudio.audio_info_from_caps.

Use the provided macros to access the info in this structure.

Members

the format info of the audio

flags (GstAudio.AudioFlags) –

additional audio flags

layout (GstAudio.AudioLayout) –

audio layout

rate (int) –

the audio sample rate

channels (int) –

the number of channels

bpf (int) –

the number of bytes for one frame, this is the size of one sample * channels

position ([ GstAudio.AudioChannelPosition ]) –

the positions for each channel


Constructors

gst_audio_info_new

GstAudioInfo *
gst_audio_info_new ()

Allocate a new GstAudioInfo that is also initialized with gst_audio_info_init.

Returns

a new GstAudioInfo. free with gst_audio_info_free.


GstAudio.AudioInfo.prototype.new

function GstAudio.AudioInfo.prototype.new(): {
    // javascript wrapper for 'gst_audio_info_new'
}

Allocate a new GstAudio.AudioInfo that is also initialized with GstAudio.prototype.audio_info_init.


GstAudio.AudioInfo.new

def GstAudio.AudioInfo.new ():
    #python wrapper for 'gst_audio_info_new'

Allocate a new GstAudio.AudioInfo that is also initialized with GstAudio.audio_info_init.


gst_audio_info_new_from_caps

GstAudioInfo *
gst_audio_info_new_from_caps (const GstCaps * caps)

Parse caps to generate a GstAudioInfo.

Parameters:

caps

a GstCaps

Returns ( [nullable])

A GstAudioInfo, or NULL if caps couldn't be parsed

Since : 1.20


GstAudio.AudioInfo.prototype.new_from_caps

function GstAudio.AudioInfo.prototype.new_from_caps(caps: Gst.Caps): {
    // javascript wrapper for 'gst_audio_info_new_from_caps'
}

Parse caps to generate a GstAudio.AudioInfo.

Parameters:

caps (Gst.Caps)

a Gst.Caps

Returns (GstAudio.AudioInfo)

A GstAudio.AudioInfo, or null if caps couldn't be parsed

Since : 1.20


GstAudio.AudioInfo.new_from_caps

def GstAudio.AudioInfo.new_from_caps (caps):
    #python wrapper for 'gst_audio_info_new_from_caps'

Parse caps to generate a GstAudio.AudioInfo.

Parameters:

caps (Gst.Caps)

a Gst.Caps

Returns (GstAudio.AudioInfo)

A GstAudio.AudioInfo, or None if caps couldn't be parsed

Since : 1.20


Methods

gst_audio_info_convert

gboolean
gst_audio_info_convert (const GstAudioInfo * info,
                        GstFormat src_fmt,
                        gint64 src_val,
                        GstFormat dest_fmt,
                        gint64 * dest_val)

Converts among various GstFormat types. This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw audio, GST_FORMAT_DEFAULT corresponds to audio frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

Parameters:

info

a GstAudioInfo

src_fmt

GstFormat of the src_val

src_val

value to convert

dest_fmt

GstFormat of the dest_val

dest_val ( [out])

pointer to destination value

Returns

TRUE if the conversion was successful.


GstAudio.AudioInfo.prototype.convert

function GstAudio.AudioInfo.prototype.convert(src_fmt: Gst.Format, src_val: Number, dest_fmt: Gst.Format): {
    // javascript wrapper for 'gst_audio_info_convert'
}

Converts among various Gst.Format types. This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw audio, GST_FORMAT_DEFAULT corresponds to audio frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

Parameters:

src_fmt (Gst.Format)

Gst.Format of the src_val

src_val (Number)

value to convert

dest_fmt (Gst.Format)

Gst.Format of the dest_val

Returns a tuple made of:

(Number )

TRUE if the conversion was successful.

dest_val (Number )

TRUE if the conversion was successful.


GstAudio.AudioInfo.convert

def GstAudio.AudioInfo.convert (self, src_fmt, src_val, dest_fmt):
    #python wrapper for 'gst_audio_info_convert'

Converts among various Gst.Format types. This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw audio, GST_FORMAT_DEFAULT corresponds to audio frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

Parameters:

src_fmt (Gst.Format)

Gst.Format of the src_val

src_val (int)

value to convert

dest_fmt (Gst.Format)

Gst.Format of the dest_val

Returns a tuple made of:

(bool )

TRUE if the conversion was successful.

dest_val (int )

TRUE if the conversion was successful.


gst_audio_info_copy

GstAudioInfo *
gst_audio_info_copy (const GstAudioInfo * info)

Copy a GstAudioInfo structure.

Parameters:

info

a GstAudioInfo

Returns

a new GstAudioInfo. free with gst_audio_info_free.


GstAudio.AudioInfo.prototype.copy

function GstAudio.AudioInfo.prototype.copy(): {
    // javascript wrapper for 'gst_audio_info_copy'
}

Copy a GstAudioInfo structure.

Parameters:

Returns (GstAudio.AudioInfo)

a new GstAudio.AudioInfo. free with gst_audio_info_free.


GstAudio.AudioInfo.copy

def GstAudio.AudioInfo.copy (self):
    #python wrapper for 'gst_audio_info_copy'

Copy a GstAudioInfo structure.

Parameters:

Returns (GstAudio.AudioInfo)

a new GstAudio.AudioInfo. free with gst_audio_info_free.


gst_audio_info_free

gst_audio_info_free (GstAudioInfo * info)

Free a GstAudioInfo structure previously allocated with gst_audio_info_new or gst_audio_info_copy.

Parameters:

info

a GstAudioInfo


GstAudio.AudioInfo.prototype.free

function GstAudio.AudioInfo.prototype.free(): {
    // javascript wrapper for 'gst_audio_info_free'
}

Free a GstAudioInfo structure previously allocated with GstAudio.AudioInfo.prototype.new or GstAudio.AudioInfo.prototype.copy.

Parameters:


GstAudio.AudioInfo.free

def GstAudio.AudioInfo.free (self):
    #python wrapper for 'gst_audio_info_free'

Free a GstAudioInfo structure previously allocated with GstAudio.AudioInfo.new or GstAudio.AudioInfo.copy.

Parameters:


gst_audio_info_is_equal

gboolean
gst_audio_info_is_equal (const GstAudioInfo * info,
                         const GstAudioInfo * other)

Compares two GstAudioInfo and returns whether they are equal or not

Parameters:

info

a GstAudioInfo

other

a GstAudioInfo

Returns

TRUE if info and other are equal, else FALSE.

Since : 1.2


GstAudio.AudioInfo.prototype.is_equal

function GstAudio.AudioInfo.prototype.is_equal(other: GstAudio.AudioInfo): {
    // javascript wrapper for 'gst_audio_info_is_equal'
}

Compares two GstAudio.AudioInfo and returns whether they are equal or not

Returns (Number)

true if info and other are equal, else false.

Since : 1.2


GstAudio.AudioInfo.is_equal

def GstAudio.AudioInfo.is_equal (self, other):
    #python wrapper for 'gst_audio_info_is_equal'

Compares two GstAudio.AudioInfo and returns whether they are equal or not

Returns (bool)

True if info and other are equal, else False.

Since : 1.2


gst_audio_info_set_format

gst_audio_info_set_format (GstAudioInfo * info,
                           GstAudioFormat format,
                           gint rate,
                           gint channels,
                           const GstAudioChannelPosition * position)

Set the default info for the audio info of format and rate and channels.

Note: This initializes info first, no values are preserved.

Parameters:

info

a GstAudioInfo

format

the format

rate

the samplerate

channels

the number of channels

position ( [arrayfixed-size=64][nullable])

the channel positions


GstAudio.AudioInfo.prototype.set_format

function GstAudio.AudioInfo.prototype.set_format(format: GstAudio.AudioFormat, rate: Number, channels: Number, position: [ GstAudio.AudioChannelPosition ]): {
    // javascript wrapper for 'gst_audio_info_set_format'
}

Set the default info for the audio info of format and rate and channels.

Note: This initializes info first, no values are preserved.

Parameters:

format (GstAudio.AudioFormat)

the format

rate (Number)

the samplerate

channels (Number)

the number of channels

position ([ GstAudio.AudioChannelPosition ])

the channel positions


GstAudio.AudioInfo.set_format

def GstAudio.AudioInfo.set_format (self, format, rate, channels, position):
    #python wrapper for 'gst_audio_info_set_format'

Set the default info for the audio info of format and rate and channels.

Note: This initializes info first, no values are preserved.

Parameters:

format (GstAudio.AudioFormat)

the format

rate (int)

the samplerate

channels (int)

the number of channels

position ([ GstAudio.AudioChannelPosition ])

the channel positions


gst_audio_info_to_caps

GstCaps *
gst_audio_info_to_caps (const GstAudioInfo * info)

Convert the values of info into a GstCaps.

Parameters:

info

a GstAudioInfo

Returns ( [transfer: full])

the new GstCaps containing the info of info.


GstAudio.AudioInfo.prototype.to_caps

function GstAudio.AudioInfo.prototype.to_caps(): {
    // javascript wrapper for 'gst_audio_info_to_caps'
}

Convert the values of info into a Gst.Caps.

Parameters:

Returns (Gst.Caps)

the new Gst.Caps containing the info of info.


GstAudio.AudioInfo.to_caps

def GstAudio.AudioInfo.to_caps (self):
    #python wrapper for 'gst_audio_info_to_caps'

Convert the values of info into a Gst.Caps.

Parameters:

Returns (Gst.Caps)

the new Gst.Caps containing the info of info.


Functions

gst_audio_info_from_caps

gboolean
gst_audio_info_from_caps (GstAudioInfo * info,
                          const GstCaps * caps)

Parse caps and update info.

Parameters:

info ( [out])

a GstAudioInfo

caps

a GstCaps

Returns

TRUE if caps could be parsed


GstAudio.prototype.audio_info_from_caps

function GstAudio.prototype.audio_info_from_caps(caps: Gst.Caps): {
    // javascript wrapper for 'gst_audio_info_from_caps'
}

Parse caps and update info.

Parameters:

caps (Gst.Caps)

a Gst.Caps

Returns a tuple made of:

(Number )

TRUE if caps could be parsed

info (GstAudio.AudioInfo )

TRUE if caps could be parsed


GstAudio.audio_info_from_caps

def GstAudio.audio_info_from_caps (caps):
    #python wrapper for 'gst_audio_info_from_caps'

Parse caps and update info.

Parameters:

caps (Gst.Caps)

a Gst.Caps

Returns a tuple made of:

(bool )

TRUE if caps could be parsed

info (GstAudio.AudioInfo )

TRUE if caps could be parsed


gst_audio_info_init

gst_audio_info_init (GstAudioInfo * info)

Initialize info with default values.

Parameters:

info ( [out])

a GstAudioInfo


GstAudio.prototype.audio_info_init

function GstAudio.prototype.audio_info_init(): {
    // javascript wrapper for 'gst_audio_info_init'
}

Initialize info with default values.


GstAudio.audio_info_init

def GstAudio.audio_info_init ():
    #python wrapper for 'gst_audio_info_init'

Initialize info with default values.


Function Macros

GST_AUDIO_INFO_BPF

#define GST_AUDIO_INFO_BPF(info)             ((info)->bpf)

GST_AUDIO_INFO_BPS

#define GST_AUDIO_INFO_BPS(info)             (GST_AUDIO_INFO_DEPTH(info) >> 3)

GST_AUDIO_INFO_CHANNELS

#define GST_AUDIO_INFO_CHANNELS(info)        ((info)->channels)

GST_AUDIO_INFO_DEPTH

#define GST_AUDIO_INFO_DEPTH(i)              (GST_AUDIO_FORMAT_INFO_DEPTH((i)->finfo))

GST_AUDIO_INFO_ENDIANNESS

#define GST_AUDIO_INFO_ENDIANNESS(i)         (GST_AUDIO_FORMAT_INFO_ENDIANNESS((i)->finfo))

GST_AUDIO_INFO_FLAGS

#define GST_AUDIO_INFO_FLAGS(info)           ((info)->flags)

GST_AUDIO_INFO_FORMAT

#define GST_AUDIO_INFO_FORMAT(i)             (GST_AUDIO_FORMAT_INFO_FORMAT((i)->finfo))

GST_AUDIO_INFO_IS_BIG_ENDIAN

#define GST_AUDIO_INFO_IS_BIG_ENDIAN(i)      (GST_AUDIO_FORMAT_INFO_IS_BIG_ENDIAN((i)->finfo))

GST_AUDIO_INFO_IS_FLOAT

#define GST_AUDIO_INFO_IS_FLOAT(i)           (GST_AUDIO_FORMAT_INFO_IS_FLOAT((i)->finfo))

GST_AUDIO_INFO_IS_INTEGER

#define GST_AUDIO_INFO_IS_INTEGER(i)         (GST_AUDIO_FORMAT_INFO_IS_INTEGER((i)->finfo))

GST_AUDIO_INFO_IS_LITTLE_ENDIAN

#define GST_AUDIO_INFO_IS_LITTLE_ENDIAN(i)   (GST_AUDIO_FORMAT_INFO_IS_LITTLE_ENDIAN((i)->finfo))

GST_AUDIO_INFO_IS_SIGNED

#define GST_AUDIO_INFO_IS_SIGNED(i)          (GST_AUDIO_FORMAT_INFO_IS_SIGNED((i)->finfo))

GST_AUDIO_INFO_IS_UNPOSITIONED

#define GST_AUDIO_INFO_IS_UNPOSITIONED(info) (((info)->flags & GST_AUDIO_FLAG_UNPOSITIONED) != 0)

GST_AUDIO_INFO_IS_VALID

#define GST_AUDIO_INFO_IS_VALID(i)           ((i)->finfo != NULL && (i)->rate > 0 && (i)->channels > 0 && (i)->bpf > 0)

GST_AUDIO_INFO_LAYOUT

#define GST_AUDIO_INFO_LAYOUT(info)          ((info)->layout)

GST_AUDIO_INFO_NAME

#define GST_AUDIO_INFO_NAME(i)               (GST_AUDIO_FORMAT_INFO_NAME((i)->finfo))

GST_AUDIO_INFO_POSITION

#define GST_AUDIO_INFO_POSITION(info,c)      ((info)->position[c])

GST_AUDIO_INFO_RATE

#define GST_AUDIO_INFO_RATE(info)            ((info)->rate)

GST_AUDIO_INFO_WIDTH

#define GST_AUDIO_INFO_WIDTH(i)              (GST_AUDIO_FORMAT_INFO_WIDTH((i)->finfo))

Enumerations

GstAudioFlags

Extra audio flags

Members
GST_AUDIO_FLAG_NONE (0) –

no valid flag

GST_AUDIO_FLAG_UNPOSITIONED (1) –

the position array explicitly contains unpositioned channels.


GstAudio.AudioFlags

Extra audio flags

Members
GstAudio.AudioFlags.NONE (0) –

no valid flag

GstAudio.AudioFlags.UNPOSITIONED (1) –

the position array explicitly contains unpositioned channels.


GstAudio.AudioFlags

Extra audio flags

Members
GstAudio.AudioFlags.NONE (0) –

no valid flag

GstAudio.AudioFlags.UNPOSITIONED (1) –

the position array explicitly contains unpositioned channels.


The results of the search are