# GstAudioAggregator

Subclasses must use (a subclass of) GstAudioAggregatorPad for both their source and sink pads, gst_element_class_add_static_pad_template_with_gtype is a convenient helper.

GstAudioAggregator can perform conversion on the data arriving on its sink pads, based on the format expected downstream: in order to enable that behaviour, the GType of the sink pads must either be a (subclass of) GstAudioAggregatorConvertPad to use the default GstAudioConverter implementation, or a subclass of GstAudioAggregatorPad implementing convert_buffer.

To allow for the output caps to change, the mechanism is the same as above, with the GType of the source pad.

See GstAudioMixer for an example.

When conversion is enabled, GstAudioAggregator will accept any type of raw audio caps and perform conversion on the data arriving on its sink pads, with whatever downstream expects as the target format.

In case downstream caps are not fully fixated, it will use the first configured sink pad to finish fixating its source pad caps.

A notable exception for now is the sample rate, sink pads must have the same sample rate as either the downstream requirement, or the first configured pad, or a combination of both (when downstream specifies a range or a set of acceptable rates).

The samples-selected signal is provided with some additional information about the output buffer:

- "offset" G_TYPE_UINT64 Offset in samples since segment start for the position that is next to be filled in the output buffer.
- "frames" G_TYPE_UINT Number of frames per output buffer.

In addition the gst_aggregator_peek_next_sample function returns additional information in the info GstStructure of the returned sample:

- "output-offset" G_TYPE_UINT64 Sample offset in output segment relative to the output segment's start where the current position of this input buffer would be placed
- "position" G_TYPE_UINT current position in the input buffer in samples
- "size" G_TYPE_UINT size of the input buffer in samples

## GstAudioAggregator

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──GstAggregator
                        ╰──GstAudioAggregator

GstAudioAggregator object

### Members

`parent` (GstAggregator) –
No description available
`current_caps` (GstCaps *) –

The caps set by the subclass

Since : 1.14

### Class structure

#### GstAudioAggregatorClass

##### Fields

`parent_class` (GstAggregatorClass) –
No description available

Since : 1.14

### GstAudio.AudioAggregatorClass

##### Attributes

`parent_class` (GstBase.AggregatorClass) –
No description available

Since : 1.14

### GstAudio.AudioAggregatorClass

##### Attributes

`parent_class` (GstBase.AggregatorClass) –
No description available

Since : 1.14

## GstAudio.AudioAggregator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Element
                    ╰──GstBase.Aggregator
                        ╰──GstAudio.AudioAggregator

GstAudioAggregator object

### Members

`parent` (GstBase.Aggregator) –
No description available
`current_caps` (Gst.Caps) –

The caps set by the subclass

Since : 1.14

## GstAudio.AudioAggregator

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Element
                    ╰──GstBase.Aggregator
                        ╰──GstAudio.AudioAggregator

GstAudioAggregator object

### Members

`parent` (GstBase.Aggregator) –
No description available
`current_caps` (Gst.Caps) –

The caps set by the subclass

Since : 1.14

### Methods

#### gst_audio_aggregator_has_current_output_buffer

    gboolean
    gst_audio_aggregator_has_current_output_buffer (GstAudioAggregator * self)

This can be used by subclasses to delay renegotiation until the current output buffer is finished to avoid dropping/converting it.

Parameters:

`self` –

A GstAudioAggregator

Returns –

TRUE if there's currently a pending output buffer.

Since : 1.30

#### GstAudio.AudioAggregator.prototype.has_current_output_buffer

    function GstAudio.AudioAggregator.prototype.has_current_output_buffer(): {
        // javascript wrapper for 'gst_audio_aggregator_has_current_output_buffer'
    }

This can be used by subclasses to delay renegotiation until the current output buffer is finished to avoid dropping/converting it.

Parameters:

`self` (GstAudio.AudioAggregator) –

A GstAudio.AudioAggregator

Returns (Number) –

true if there's currently a pending output buffer.

Since : 1.30

#### GstAudio.AudioAggregator.has_current_output_buffer

    def GstAudio.AudioAggregator.has_current_output_buffer (self):
        #python wrapper for 'gst_audio_aggregator_has_current_output_buffer'

This can be used by subclasses to delay renegotiation until the current output buffer is finished to avoid dropping/converting it.

Parameters:

`self` (GstAudio.AudioAggregator) –

A GstAudio.AudioAggregator

Returns (bool) –

True if there's currently a pending output buffer.

Since : 1.30

#### gst_audio_aggregator_set_sink_caps

    gst_audio_aggregator_set_sink_caps (GstAudioAggregator * aagg,
                                        GstAudioAggregatorPad * pad,
                                        GstCaps * caps)

Parameters:

`aagg` –
No description available
`pad` –
No description available
`caps` –
No description available

#### GstAudio.AudioAggregator.prototype.set_sink_caps

    function GstAudio.AudioAggregator.prototype.set_sink_caps(pad: GstAudio.AudioAggregatorPad, caps: Gst.Caps): {
        // javascript wrapper for 'gst_audio_aggregator_set_sink_caps'
    }

Parameters:

`aagg` (GstAudio.AudioAggregator) –
No description available
`pad` (GstAudio.AudioAggregatorPad) –
No description available
`caps` (Gst.Caps) –
No description available

#### GstAudio.AudioAggregator.set_sink_caps

    def GstAudio.AudioAggregator.set_sink_caps (self, pad, caps):
        #python wrapper for 'gst_audio_aggregator_set_sink_caps'

Parameters:

`aagg` (GstAudio.AudioAggregator) –
No description available
`pad` (GstAudio.AudioAggregatorPad) –
No description available
`caps` (Gst.Caps) –
No description available

### Properties

#### alignment-threshold

    “alignment-threshold” guint64

Flags : Read / Write

#### alignment-threshold

    “alignment-threshold” Number

Flags : Read / Write

#### alignment_threshold

    “self.props.alignment_threshold” int

Flags : Read / Write

#### discont-wait

    “discont-wait” guint64

Flags : Read / Write

#### discont-wait

    “discont-wait” Number

Flags : Read / Write

#### discont_wait

    “self.props.discont_wait” int

Flags : Read / Write

#### force-live

    “force-live” gboolean

Causes the element to aggregate on a timeout even when no live source is connected to its sinks. See min-upstream-latency for a companion property: in the vast majority of cases where you plan to plug in live sources with a non-zero latency, you should set it to a non-zero value.

Flags : Read / Write / Construct Only

Since : 1.22

#### force-live

    “force-live” Number

Causes the element to aggregate on a timeout even when no live source is connected to its sinks. See min-upstream-latency for a companion property: in the vast majority of cases where you plan to plug in live sources with a non-zero latency, you should set it to a non-zero value.

Flags : Read / Write / Construct Only

Since : 1.22

#### force_live

    “self.props.force_live” bool

Causes the element to aggregate on a timeout even when no live source is connected to its sinks. See min_upstream_latency for a companion property: in the vast majority of cases where you plan to plug in live sources with a non-zero latency, you should set it to a non-zero value.

Flags : Read / Write / Construct Only

Since : 1.22

#### ignore-inactive-pads

    “ignore-inactive-pads” gboolean

Don't wait for inactive pads when live. An inactive pad is a pad that hasn't yet received a buffer, but that has been waited on at least once.

The purpose of this property is to avoid aggregating on timeout when new pads are requested in advance of receiving data flow, for example the user may decide to connect it later, but wants to configure it already.

Flags : Read / Write

Since : 1.20

#### ignore-inactive-pads

    “ignore-inactive-pads” Number

Don't wait for inactive pads when live. An inactive pad is a pad that hasn't yet received a buffer, but that has been waited on at least once.

The purpose of this property is to avoid aggregating on timeout when new pads are requested in advance of receiving data flow, for example the user may decide to connect it later, but wants to configure it already.

Flags : Read / Write

Since : 1.20

#### ignore_inactive_pads

    “self.props.ignore_inactive_pads” bool

Don't wait for inactive pads when live. An inactive pad is a pad that hasn't yet received a buffer, but that has been waited on at least once.

The purpose of this property is to avoid aggregating on timeout when new pads are requested in advance of receiving data flow, for example the user may decide to connect it later, but wants to configure it already.

Flags : Read / Write

Since : 1.20

#### output-buffer-duration

    “output-buffer-duration” guint64

Flags : Read / Write

#### output-buffer-duration

    “output-buffer-duration” Number

Flags : Read / Write

#### output_buffer_duration

    “self.props.output_buffer_duration” int

Flags : Read / Write

#### output-buffer-duration-fraction

    “output-buffer-duration-fraction” GstFraction *

Output block size in nanoseconds, expressed as a fraction.

Flags : Read / Write

Since : 1.18

#### output-buffer-duration-fraction

    “output-buffer-duration-fraction” Gst.Fraction

Output block size in nanoseconds, expressed as a fraction.

Flags : Read / Write

Since : 1.18

#### output_buffer_duration_fraction

    “self.props.output_buffer_duration_fraction” Gst.Fraction

Output block size in nanoseconds, expressed as a fraction.

Flags : Read / Write

Since : 1.18

### Virtual Methods

#### aggregate_one_buffer

    gboolean
    aggregate_one_buffer (GstAudioAggregator * aagg,
                          GstAudioAggregatorPad * pad,
                          GstBuffer * inbuf,
                          guint in_offset,
                          GstBuffer * outbuf,
                          guint out_offset,
                          guint num_frames)

Aggregates one input buffer to the output buffer. The in_offset and out_offset are in "frames", which is the size of a sample times the number of channels. Returns TRUE if any non-silence was added to the buffer

Parameters:

`aagg` –
No description available
`pad` –
No description available
`inbuf` –
No description available
`in_offset` –
No description available
`outbuf` –
No description available
`out_offset` –
No description available
`num_frames` –
No description available
Returns –
No description available

#### vfunc_aggregate_one_buffer

    function vfunc_aggregate_one_buffer(aagg: GstAudio.AudioAggregator, pad: GstAudio.AudioAggregatorPad, inbuf: Gst.Buffer, in_offset: Number, outbuf: Gst.Buffer, out_offset: Number, num_frames: Number): {
        // javascript implementation of the 'aggregate_one_buffer' virtual method
    }

Aggregates one input buffer to the output buffer. The in_offset and out_offset are in "frames", which is the size of a sample times the number of channels. Returns TRUE if any non-silence was added to the buffer

Parameters:

`aagg` (GstAudio.AudioAggregator) –
No description available
`pad` (GstAudio.AudioAggregatorPad) –
No description available
`inbuf` (Gst.Buffer) –
No description available
`in_offset` (Number) –
No description available
`outbuf` (Gst.Buffer) –
No description available
`out_offset` (Number) –
No description available
`num_frames` (Number) –
No description available
Returns (Number) –
No description available

#### do_aggregate_one_buffer

    def do_aggregate_one_buffer (aagg, pad, inbuf, in_offset, outbuf, out_offset, num_frames):
        #python implementation of the 'aggregate_one_buffer' virtual method

Aggregates one input buffer to the output buffer. The in_offset and out_offset are in "frames", which is the size of a sample times the number of channels. Returns TRUE if any non-silence was added to the buffer

Parameters:

`aagg` (GstAudio.AudioAggregator) –
No description available
`pad` (GstAudio.AudioAggregatorPad) –
No description available
`inbuf` (Gst.Buffer) –
No description available
`in_offset` (int) –
No description available
`outbuf` (Gst.Buffer) –
No description available
`out_offset` (int) –
No description available
`num_frames` (int) –
No description available
Returns (bool) –
No description available

#### create_output_buffer

    GstBuffer *
    create_output_buffer (GstAudioAggregator * aagg,
                          guint num_frames)

Create a new output buffer contains num_frames frames.

Parameters:

`aagg` –
No description available
`num_frames` –
No description available
Returns –
No description available

#### vfunc_create_output_buffer

    function vfunc_create_output_buffer(aagg: GstAudio.AudioAggregator, num_frames: Number): {
        // javascript implementation of the 'create_output_buffer' virtual method
    }

Create a new output buffer contains num_frames frames.

Parameters:

`aagg` (GstAudio.AudioAggregator) –
No description available
`num_frames` (Number) –
No description available
Returns (Gst.Buffer) –
No description available

#### do_create_output_buffer

    def do_create_output_buffer (aagg, num_frames):
        #python implementation of the 'create_output_buffer' virtual method

Create a new output buffer contains num_frames frames.

Parameters:

`aagg` (GstAudio.AudioAggregator) –
No description available
`num_frames` (int) –
No description available
Returns (Gst.Buffer) –
No description available

## GstAudioAggregatorConvertPad

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstPad
                    ╰──GstAggregatorPad
                        ╰──GstAudioAggregatorPad
                            ╰──GstAudioAggregatorConvertPad

An implementation of GstPad that can be used with GstAudioAggregator.

See GstAudioAggregator for more details.

Since : 1.14

### Class structure

#### GstAudioAggregatorConvertPadClass

##### Fields

`parent_class` (GstAudioAggregatorPadClass) –
No description available

Since : 1.14

### GstAudio.AudioAggregatorConvertPadClass

##### Attributes

`parent_class` (GstAudio.AudioAggregatorPadClass) –
No description available

Since : 1.14

### GstAudio.AudioAggregatorConvertPadClass

##### Attributes

`parent_class` (GstAudio.AudioAggregatorPadClass) –
No description available

Since : 1.14

## GstAudio.AudioAggregatorConvertPad

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Pad
                    ╰──GstBase.AggregatorPad
                        ╰──GstAudio.AudioAggregatorPad
                            ╰──GstAudio.AudioAggregatorConvertPad

An implementation of GstPad that can be used with GstAudio.AudioAggregator.

See GstAudio.AudioAggregator for more details.

Since : 1.14

## GstAudio.AudioAggregatorConvertPad

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Pad
                    ╰──GstBase.AggregatorPad
                        ╰──GstAudio.AudioAggregatorPad
                            ╰──GstAudio.AudioAggregatorConvertPad

An implementation of GstPad that can be used with GstAudio.AudioAggregator.

See GstAudio.AudioAggregator for more details.

Since : 1.14

### Properties

#### converter-config

    “converter-config” GstStructure *

Flags : Read / Write

#### converter-config

    “converter-config” Gst.Structure

Flags : Read / Write

#### converter_config

    “self.props.converter_config” Gst.Structure

Flags : Read / Write

## GstAudioAggregatorPad

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstPad
                    ╰──GstAggregatorPad
                        ╰──GstAudioAggregatorPad
                            ╰──GstAudioAggregatorConvertPad

The default implementation of GstPad used with GstAudioAggregator

### Members

`parent` (GstAggregatorPad) –
No description available
`info` (GstAudioInfo) –

The audio info for this pad set from the incoming caps

Since : 1.14

### Class structure

#### GstAudioAggregatorPadClass

##### Fields

`parent_class` (GstAggregatorPadClass) –
No description available

Since : 1.14

### GstAudio.AudioAggregatorPadClass

##### Attributes

`parent_class` (GstBase.AggregatorPadClass) –
No description available

Since : 1.14

### GstAudio.AudioAggregatorPadClass

##### Attributes

`parent_class` (GstBase.AggregatorPadClass) –
No description available

Since : 1.14

## GstAudio.AudioAggregatorPad

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Pad
                    ╰──GstBase.AggregatorPad
                        ╰──GstAudio.AudioAggregatorPad
                            ╰──GstAudio.AudioAggregatorConvertPad

The default implementation of GstPad used with GstAudio.AudioAggregator

### Members

`parent` (GstBase.AggregatorPad) –
No description available
`info` (GstAudio.AudioInfo) –

The audio info for this pad set from the incoming caps

Since : 1.14

## GstAudio.AudioAggregatorPad

    GObject.Object
        ╰──GObject.InitiallyUnowned
            ╰──Gst.Object
                ╰──Gst.Pad
                    ╰──GstBase.AggregatorPad
                        ╰──GstAudio.AudioAggregatorPad
                            ╰──GstAudio.AudioAggregatorConvertPad

The default implementation of GstPad used with GstAudio.AudioAggregator

### Members

`parent` (GstBase.AggregatorPad) –
No description available
`info` (GstAudio.AudioInfo) –

The audio info for this pad set from the incoming caps

Since : 1.14

### Properties

#### qos-messages

    “qos-messages” gboolean

Emit QoS messages when dropping buffers.

Flags : Read / Write

Since : 1.20

#### qos-messages

    “qos-messages” Number

Emit QoS messages when dropping buffers.

Flags : Read / Write

Since : 1.20

#### qos_messages

    “self.props.qos_messages” bool

Emit QoS messages when dropping buffers.

Flags : Read / Write

Since : 1.20

### Virtual Methods

#### convert_buffer

    GstBuffer *
    convert_buffer (GstAudioAggregatorPad * pad,
                    GstAudioInfo * in_info,
                    GstAudioInfo * out_info,
                    GstBuffer * buffer)

Convert a buffer from one format to another.

Parameters:

`pad` –
No description available
`in_info` –
No description available
`out_info` –
No description available
`buffer` –
No description available
Returns –
No description available

#### vfunc_convert_buffer

    function vfunc_convert_buffer(pad: GstAudio.AudioAggregatorPad, in_info: GstAudio.AudioInfo, out_info: GstAudio.AudioInfo, buffer: Gst.Buffer): {
        // javascript implementation of the 'convert_buffer' virtual method
    }

Convert a buffer from one format to another.

Parameters:

`pad` (GstAudio.AudioAggregatorPad) –
No description available
`in_info` (GstAudio.AudioInfo) –
No description available
`out_info` (GstAudio.AudioInfo) –
No description available
`buffer` (Gst.Buffer) –
No description available
Returns (Gst.Buffer) –
No description available

#### do_convert_buffer

    def do_convert_buffer (pad, in_info, out_info, buffer):
        #python implementation of the 'convert_buffer' virtual method

Convert a buffer from one format to another.

Parameters:

`pad` (GstAudio.AudioAggregatorPad) –
No description available
`in_info` (GstAudio.AudioInfo) –
No description available
`out_info` (GstAudio.AudioInfo) –
No description available
`buffer` (Gst.Buffer) –
No description available
Returns (Gst.Buffer) –
No description available

#### update_conversion_info

    update_conversion_info (GstAudioAggregatorPad * pad)

Called when either the input or output formats have changed.

Parameters:

`pad` –
No description available

#### vfunc_update_conversion_info

    function vfunc_update_conversion_info(pad: GstAudio.AudioAggregatorPad): {
        // javascript implementation of the 'update_conversion_info' virtual method
    }

Called when either the input or output formats have changed.

Parameters:

`pad` (GstAudio.AudioAggregatorPad) –
No description available

#### do_update_conversion_info

    def do_update_conversion_info (pad):
        #python implementation of the 'update_conversion_info' virtual method

Called when either the input or output formats have changed.

Parameters:

`pad` (GstAudio.AudioAggregatorPad) –
No description available

The results of the search are