Trait gstreamer_base::subclass::prelude::AggregatorImpl

source ·
pub trait AggregatorImpl: AggregatorImplExt + ElementImpl {
Show 23 methods // Provided methods fn flush(&self) -> Result<FlowSuccess, FlowError> { ... } fn clip( &self, aggregator_pad: &AggregatorPad, buffer: Buffer, ) -> Option<Buffer> { ... } fn finish_buffer_list( &self, buffer_list: BufferList, ) -> Result<FlowSuccess, FlowError> { ... } fn finish_buffer(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> { ... } fn sink_event(&self, aggregator_pad: &AggregatorPad, event: Event) -> bool { ... } fn sink_event_pre_queue( &self, aggregator_pad: &AggregatorPad, event: Event, ) -> Result<FlowSuccess, FlowError> { ... } fn sink_query( &self, aggregator_pad: &AggregatorPad, query: &mut QueryRef, ) -> bool { ... } fn sink_query_pre_queue( &self, aggregator_pad: &AggregatorPad, query: &mut QueryRef, ) -> bool { ... } fn src_event(&self, event: Event) -> bool { ... } fn src_query(&self, query: &mut QueryRef) -> bool { ... } fn src_activate( &self, mode: PadMode, active: bool, ) -> Result<(), LoggableError> { ... } fn aggregate(&self, timeout: bool) -> Result<FlowSuccess, FlowError> { ... } fn start(&self) -> Result<(), ErrorMessage> { ... } fn stop(&self) -> Result<(), ErrorMessage> { ... } fn next_time(&self) -> Option<ClockTime> { ... } fn create_new_pad( &self, templ: &PadTemplate, req_name: Option<&str>, caps: Option<&Caps>, ) -> Option<AggregatorPad> { ... } fn update_src_caps(&self, caps: &Caps) -> Result<Caps, FlowError> { ... } fn fixate_src_caps(&self, caps: Caps) -> Caps { ... } fn negotiated_src_caps(&self, caps: &Caps) -> Result<(), LoggableError> { ... } fn propose_allocation( &self, pad: &AggregatorPad, decide_query: Option<&Allocation>, query: &mut Allocation, ) -> Result<(), LoggableError> { ... } fn decide_allocation( &self, query: &mut Allocation, ) -> Result<(), LoggableError> { ... } fn negotiate(&self) -> bool { ... } fn peek_next_sample(&self, pad: &AggregatorPad) -> Option<Sample> { ... }
}

Provided Methods§

source

fn flush(&self) -> Result<FlowSuccess, FlowError>

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

source

fn clip(&self, aggregator_pad: &AggregatorPad, buffer: Buffer) -> Option<Buffer>

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 NULL in if the buffer should be dropped.

source

fn finish_buffer_list( &self, buffer_list: BufferList, ) -> Result<FlowSuccess, FlowError>

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.

§bufferlist

the gst::BufferList to push.

source

fn finish_buffer(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>

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.

§buffer

the gst::Buffer to push.

source

fn sink_event(&self, aggregator_pad: &AggregatorPad, event: Event) -> bool

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

source

fn sink_event_pre_queue( &self, aggregator_pad: &AggregatorPad, event: Event, ) -> Result<FlowSuccess, FlowError>

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

source

fn sink_query( &self, aggregator_pad: &AggregatorPad, query: &mut QueryRef, ) -> bool

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

source

fn sink_query_pre_queue( &self, aggregator_pad: &AggregatorPad, query: &mut QueryRef, ) -> bool

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

source

fn src_event(&self, event: Event) -> bool

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

source

fn src_query(&self, query: &mut QueryRef) -> bool

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

source

fn src_activate(&self, mode: PadMode, active: bool) -> Result<(), LoggableError>

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

source

fn aggregate(&self, timeout: bool) -> Result<FlowSuccess, FlowError>

Mandatory. Called when buffers are queued on all sinkpads. Classes should iterate the GstElement->sinkpads and peek or steal buffers from the GstAggregatorPads. If the subclass returns GST_FLOW_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.

source

fn start(&self) -> Result<(), ErrorMessage>

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

source

fn stop(&self) -> Result<(), ErrorMessage>

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

source

fn next_time(&self) -> Option<ClockTime>

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.

source

fn create_new_pad( &self, templ: &PadTemplate, req_name: Option<&str>, caps: Option<&Caps>, ) -> Option<AggregatorPad>

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.

source

fn update_src_caps(&self, caps: &Caps) -> Result<Caps, FlowError>

source

fn fixate_src_caps(&self, caps: Caps) -> Caps

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.

source

fn negotiated_src_caps(&self, caps: &Caps) -> Result<(), LoggableError>

Optional. Notifies subclasses what caps format has been negotiated

source

fn propose_allocation( &self, pad: &AggregatorPad, decide_query: Option<&Allocation>, query: &mut Allocation, ) -> Result<(), LoggableError>

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

source

fn decide_allocation(&self, query: &mut Allocation) -> Result<(), LoggableError>

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.

source

fn negotiate(&self) -> bool

Negotiates src pad caps with downstream elements. Unmarks GST_PAD_FLAG_NEED_RECONFIGURE in any case. But marks it again if GstAggregatorClass::negotiate fails.

§Returns

true if the negotiation succeeded, else false.

source

fn peek_next_sample(&self, pad: &AggregatorPad) -> Option<Sample>

Use this function to determine what input buffers will be aggregated to produce the next output buffer. This should only be called from a samples-selected handler, and can be used to precisely control aggregating parameters for a given set of input samples.

§Returns

The sample that is about to be aggregated. It may hold a gst::Buffer or a gst::BufferList. The contents of its info structure is subclass-dependent, and documented on a subclass basis. The buffers held by the sample are not writable.

Object Safety§

This trait is not object safe.

Implementors§