Top | ![]() |
![]() |
![]() |
![]() |
GstAudioAggregatorGstAudioAggregator — Base class that manages a set of audio input pads with the purpose of aggregating or mixing their raw audio input buffers |
guint64 | alignment-threshold | Read / Write |
guint64 | discont-wait | Read / Write |
guint64 | output-buffer-duration | Read / Write |
GstStructure * | converter-config | Read / Write |
struct | GstAudioAggregator |
struct | GstAudioAggregatorClass |
struct | GstAudioAggregatorPad |
struct | GstAudioAggregatorPadClass |
struct | GstAudioAggregatorConvertPad |
struct | GstAudioAggregatorConvertPadClass |
GObject ╰── GInitiallyUnowned ╰── GstObject ├── GstElement │ ╰── GstAggregator │ ╰── GstAudioAggregator ╰── GstPad ╰── GstAggregatorPad ╰── GstAudioAggregatorPad ╰── GstAudioAggregatorConvertPad
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 GstAudioAggregatorPadClass.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).
void gst_audio_aggregator_set_sink_caps (GstAudioAggregator *aagg
,GstAudioAggregatorPad *pad
,GstCaps *caps
);
struct GstAudioAggregator { GstCaps *current_caps; };
GstAudioAggregator object
struct GstAudioAggregatorClass { GstAggregatorClass parent_class; GstBuffer * (* create_output_buffer) (GstAudioAggregator * aagg, guint num_frames); gboolean (* aggregate_one_buffer) (GstAudioAggregator * aagg, GstAudioAggregatorPad * pad, GstBuffer * inbuf, guint in_offset, GstBuffer * outbuf, guint out_offset, guint num_frames); };
struct GstAudioAggregatorPad { /* read-only, with OBJECT_LOCK */ GstAudioInfo info; };
The default implementation of GstPad used with GstAudioAggregator
struct GstAudioAggregatorPadClass { GstAggregatorPadClass parent_class; GstBuffer * (* convert_buffer) (GstAudioAggregatorPad * pad, GstAudioInfo *in_info, GstAudioInfo *out_info, GstBuffer * buffer); void (* update_conversion_info) (GstAudioAggregatorPad *pad); };
struct GstAudioAggregatorConvertPad;
An implementation of GstPad that can be used with GstAudioAggregator.
See GstAudioAggregator for more details.
“alignment-threshold”
property “alignment-threshold” guint64
Timestamp alignment threshold in nanoseconds.
Flags: Read / Write
Allowed values: <= 18446744073709551614
Default value: 40000000
“discont-wait”
property “discont-wait” guint64
Window of time in nanoseconds to wait before creating a discontinuity.
Flags: Read / Write
Allowed values: <= 18446744073709551614
Default value: 1000000000
“output-buffer-duration”
property “output-buffer-duration” guint64
Output block size in nanoseconds.
Flags: Read / Write
Allowed values: >= 1
Default value: 10000000