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)
–
current_caps
(GstCaps *)
–
The caps set by the subclass
Since : 1.14
Class structure
GstAudioAggregatorClass
Fields
parent_class
(GstAggregatorClass)
–
Since : 1.14
GstAudio.AudioAggregatorClass
Attributes
parent_class
(GstBase.AggregatorClass)
–
Since : 1.14
GstAudio.AudioAggregatorClass
Attributes
parent_class
(GstBase.AggregatorClass)
–
Since : 1.14
GstAudio.AudioAggregator
GObject.Object ╰──GObject.InitiallyUnowned ╰──Gst.Object ╰──Gst.Element ╰──GstBase.Aggregator ╰──GstAudio.AudioAggregator
GstAudioAggregator object
Members
parent
(GstBase.Aggregator)
–
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)
–
current_caps
(Gst.Caps)
–
The caps set by the subclass
Since : 1.14
Methods
gst_audio_aggregator_set_sink_caps
gst_audio_aggregator_set_sink_caps (GstAudioAggregator * aagg, GstAudioAggregatorPad * pad, GstCaps * caps)
Parameters:
aagg
–
pad
–
caps
–
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:
GstAudio.AudioAggregator.set_sink_caps
def GstAudio.AudioAggregator.set_sink_caps (self, pad, caps):
#python wrapper for 'gst_audio_aggregator_set_sink_caps'
Parameters:
Properties
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-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
–
pad
–
inbuf
–
in_offset
–
outbuf
–
out_offset
–
num_frames
–
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:
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:
create_output_buffer
GstBuffer * create_output_buffer (GstAudioAggregator * aagg, guint num_frames)
Create a new output buffer contains num_frames frames.
Parameters:
aagg
–
num_frames
–
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:
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:
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)
–
Since : 1.14
GstAudio.AudioAggregatorConvertPadClass
Attributes
parent_class
(GstAudio.AudioAggregatorPadClass)
–
Since : 1.14
GstAudio.AudioAggregatorConvertPadClass
Attributes
parent_class
(GstAudio.AudioAggregatorPadClass)
–
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
GstAudioAggregatorPad
GObject ╰──GInitiallyUnowned ╰──GstObject ╰──GstPad ╰──GstAggregatorPad ╰──GstAudioAggregatorPad ╰──GstAudioAggregatorConvertPad
The default implementation of GstPad used with GstAudioAggregator
Members
parent
(GstAggregatorPad)
–
info
(GstAudioInfo)
–
The audio info for this pad set from the incoming caps
Since : 1.14
Class structure
GstAudioAggregatorPadClass
Fields
parent_class
(GstAggregatorPadClass)
–
Since : 1.14
GstAudio.AudioAggregatorPadClass
Attributes
parent_class
(GstBase.AggregatorPadClass)
–
Since : 1.14
GstAudio.AudioAggregatorPadClass
Attributes
parent_class
(GstBase.AggregatorPadClass)
–
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)
–
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)
–
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
–
in_info
–
out_info
–
buffer
–
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:
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:
update_conversion_info
update_conversion_info (GstAudioAggregatorPad * pad)
Called when either the input or output formats have changed.
Parameters:
pad
–
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:
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:
The results of the search are