This method will push the provided output buffer downstream. If needed, mandatory events such as stream-start, caps, and segment events will be sent before pushing the buffer.
This method will push the provided output buffer list downstream. If needed, mandatory events such as stream-start, caps, and segment events will be sent before pushing the buffer.
Lets #GstAggregator sub-classes get the memory allocator acquired by the base class and its params.
Subclasses may use the return value to inform whether they should return gst.types.FlowReturn.Eos from their aggregate implementation.
Retrieves the latency values reported by self in response to the latency query, or GST_CLOCK_TIME_NONE if there is not live source connected and the element will not wait for the clock.
Negotiates src pad caps with downstream elements. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if #GstAggregatorClass::negotiate fails.
Use this function to determine what input buffers will be aggregated to produce the next output buffer. This should only be called from a #GstAggregator::samples-selected handler, and can be used to precisely control aggregating parameters for a given set of input samples.
Subclasses should call this when they have prepared the buffers they will aggregate for each of their sink pads, but before using any of the properties of the pads that govern *how* aggregation should be performed, for example z-index for video aggregators.
Subclasses should call this at construction time in order for self to aggregate on a timeout even when no live source is connected.
Subclasses should call this when they don't want to time out waiting for a pad that hasn't yet received any buffers in live mode.
Lets #GstAggregator sub-classes tell the baseclass what their internal latency is. Will also post a LATENCY message on the bus so the pipeline can reconfigure its global latency if the values changed.
Sets the caps to be used on the src pad.
This is a simple #GstAggregatorClass::get_next_time implementation that just looks at the #GstSegment on the srcpad of the aggregator and bases the next time on the running time there.
Subclasses should use this to update the segment on their source pad, instead of directly pushing new segment events downstream.
Connect to SamplesSelected signal.
Subclasses must use (a subclass of) #GstAudioAggregatorPad for both their source and sink pads, gst.element_class.ElementClass.addStaticPadTemplateWithGtype 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).
The #GstAggregator::samples-selected signal is provided with some additional information about the output buffer:
In addition the gstbase.aggregator.Aggregator.peekNextSample function returns additional information in the info #GstStructure of the returned sample: