GstBase.AggregatorClass

Fields

Name

Type

Access

Description

aggregate

object

r

Mandatory. Called when buffers are queued on all sinkpads. Classes should iterate the Gst.Element->sinkpads and peek or steal buffers from the GstBase.AggregatorPads. If the subclass returns Gst.FlowReturn.EOS, sending of the eos event will be taken care of. Once / if a buffer has been constructed from the aggregated buffers, the subclass should call _finish_buffer.

clip

object

r

Optional. Called when a buffer is received on a sink pad, the task of clipping it and translating it to the current segment falls on the subclass. The function should use the segment of data and the negotiated media type on the pad to perform clipping of input buffer. This function takes ownership of buf and should output a buffer or return None in if the buffer should be dropped.

create_new_pad

object

r

Optional. Called when a new pad needs to be created. Allows subclass that don’t have a single sink pad template to provide a pad based on the provided information.

decide_allocation

object

r

Optional. Allows the subclass to influence the allocation choices. Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query.

finish_buffer

object

r

Optional. Called when a subclass calls GstBase.Aggregator.finish_buffer() from their aggregate function to push out a buffer. Subclasses can override this to modify or decorate buffers before they get pushed out. This function takes ownership of the buffer passed. Subclasses that override this method should always chain up to the parent class virtual method.

finish_buffer_list

object

r

fixate_src_caps

object

r

Optional. Fixate and return the src pad caps provided. The function takes ownership of caps and returns a fixated version of caps. caps is not guaranteed to be writable.

flush

object

r

Optional. Called after a successful flushing seek, once all the flush stops have been received. Flush pad-specific data in GstBase.AggregatorPad->flush.

get_next_time

object

r

Optional. Called when the element needs to know the running time of the next rendered buffer for live pipelines. This causes deadline based aggregation to occur. Defaults to returning Gst.CLOCK_TIME_NONE causing the element to wait for buffers on all sink pads before aggregating.

negotiate

object

r

Optional. Negotiate the caps with the peer

negotiated_src_caps

object

r

Optional. Notifies subclasses what caps format has been negotiated

parent_class

Gst.ElementClass

r

peek_next_sample

object

r

propose_allocation

object

r

Optional. Allows the subclass to handle the allocation query from upstream.

sink_event

object

r

Optional. Called when an event is received on a sink pad, the subclass should always chain up.

sink_event_pre_queue

object

r

Optional. Called when an event is received on a sink pad before queueing up serialized events. The subclass should always chain up

sink_query

object

r

Optional. Called when a query is received on a sink pad, the subclass should always chain up.

sink_query_pre_queue

object

r

Optional. Called when a query is received on a sink pad before queueing up serialized queries. The subclass should always chain up

src_activate

object

r

Optional. Called when the src pad is activated, it will start/stop its pad task right after that call.

src_event

object

r

Optional. Called when an event is received on the src pad, the subclass should always chain up.

src_query

object

r

Optional. Called when a query is received on the src pad, the subclass should always chain up.

start

object

r

Optional. Called when the element goes from READY to PAUSED. The subclass should get ready to process aggregated buffers.

stop

object

r

Optional. Called when the element goes from PAUSED to READY. The subclass should free all resources and reset its state.

update_src_caps

object

r

Lets subclasses update the Gst.Caps representing the src pad caps before usage. The result should end up in ret. Return %GST_AGGREGATOR_FLOW_NEED_DATA to indicate that the element needs more information (caps, a buffer, etc) to choose the correct caps. Should return ANY caps if the stream has not caps at all.

Methods

None

Details

class GstBase.AggregatorClass

The aggregator base class will handle in a thread-safe way all manners of concurrent flushes, seeks, pad additions and removals, leaving to the subclass the responsibility of clipping buffers, and aggregating buffers in the way the implementor sees fit.

It will also take care of event ordering (stream-start, segment, eos).

Basically, a simple implementation will override aggregate, and call _finish_buffer from inside that function.

New in version 1.14.