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
GstAudioAggregator will perform conversion on the data arriving on its sink pads, based on the format expected downstream.
Subclasses can opt out of the conversion behaviour by setting
GstAudioAggregatorClass.convert_buffer()
to NULL
.
Subclasses that wish to use the default conversion implementation should use a (subclass of) GstAudioAggregatorConvertPad as their GstAggregatorClass.sinkpads_type, as it will cache the created GstAudioConverter and install a property allowing to configure it, “converter-config”.
Subclasses that wish to perform custom conversion should override
GstAudioAggregatorClass.convert_buffer()
.
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.
Additionally, handling audio conversion directly in the element means that this base class supports safely reconfiguring its source pad.
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 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); GstBuffer * (* convert_buffer) (GstAudioAggregator *aagg, GstPad * pad, GstAudioInfo *in_info, GstAudioInfo *out_info, GstBuffer * buffer); };
Create a new output buffer contains num_frames 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 |
||
Convert a buffer from one format to another. The pad is either a sinkpad, when converting an input buffer, or the source pad, when converting the output buffer after a downstream format change is requested. |
struct GstAudioAggregatorPad;
The default implementation of GstPad used with GstAudioAggregator
struct GstAudioAggregatorPadClass { GstAggregatorPadClass parent_class; };
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
“converter-config”
property“converter-config” GstStructure *
A GstStructure describing the configuration that should be used when converting this pad's audio buffers.
Flags: Read / Write