GstAudio.AudioAggregator

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Element Gst.Element GstBase.Aggregator GstBase.Aggregator Gst.Element->GstBase.Aggregator Gst.Object->Gst.Element GstAudio.AudioAggregator GstAudio.AudioAggregator GstBase.Aggregator->GstAudio.AudioAggregator

Subclasses:None

Virtual Methods

Inherited:GstBase.Aggregator (17), Gst.Element (16), Gst.Object (1), GObject.Object (7)
  do_aggregate_one_buffer (pad, inbuf, in_offset, outbuf, out_offset, num_frames)
  do_create_output_buffer (num_frames)

Properties

Inherited:GstBase.Aggregator (3), Gst.Object (2)
Name Type Flags Short Description
alignment-threshold int r/w Timestamp alignment threshold in nanoseconds
discont-wait int r/w Window of time in nanoseconds to wait before creating a discontinuity
output-buffer-duration int r/w Output block size in nanoseconds

Fields

Inherited:Gst.Element (3), Gst.Object (1), GObject.Object (1)
Name Type Access Description
current_caps Gst.Caps r The caps set by the subclass
parent GstBase.Aggregator r The parent GstBase.Aggregator

Class Details

class GstAudio.AudioAggregator(**kwargs)
Bases:GstBase.Aggregator
Abstract:Yes
Structure:GstAudio.AudioAggregatorClass

Subclasses must use (a subclass of) GstAudio.AudioAggregatorPad for both their source and sink pads, Gst.ElementClass.add_static_pad_template_with_gtype() is a convenient helper.

GstAudio.AudioAggregator can perform conversion on the data arriving on its sink pads, based on the format expected downstream: in order to enable that behaviour, the GObject.GType of the sink pads must either be a (subclass of) GstAudio.AudioAggregatorConvertPad to use the default GstAudio.AudioConverter implementation, or a subclass of GstAudio.AudioAggregatorPad implementing GstAudio.AudioAggregatorPad.convert_buffer.

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

See #GstAudioMixer for an example.

When conversion is enabled, GstAudio.AudioAggregator 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).

set_sink_caps(pad, caps)[source]
Parameters:
do_aggregate_one_buffer(pad, inbuf, in_offset, outbuf, out_offset, num_frames) virtual
Parameters:
Return type:

bool

do_create_output_buffer(num_frames) virtual
Parameters:num_frames (int) –
Return type:Gst.Buffer

Property Details

GstAudio.AudioAggregator.props.alignment_threshold
Name:alignment-threshold
Type:int
Default Value:40000000
Flags:READABLE, WRITABLE

Timestamp alignment threshold in nanoseconds

GstAudio.AudioAggregator.props.discont_wait
Name:discont-wait
Type:int
Default Value:1000000000
Flags:READABLE, WRITABLE

Window of time in nanoseconds to wait before creating a discontinuity

GstAudio.AudioAggregator.props.output_buffer_duration
Name:output-buffer-duration
Type:int
Default Value:10000000
Flags:READABLE, WRITABLE

Output block size in nanoseconds