Trait gstreamer_base::prelude::AggregatorExt

source ·
pub trait AggregatorExt: IsA<Aggregator> + Sealed + 'static {
Show 23 methods // Provided methods fn finish_buffer(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError> { ... } fn finish_buffer_list( &self, bufferlist: BufferList, ) -> Result<FlowSuccess, FlowError> { ... } fn buffer_pool(&self) -> Option<BufferPool> { ... } fn is_force_live(&self) -> bool { ... } fn ignores_inactive_pads(&self) -> bool { ... } fn latency(&self) -> Option<ClockTime> { ... } fn negotiate(&self) -> bool { ... } fn peek_next_sample(&self, pad: &impl IsA<AggregatorPad>) -> Option<Sample> { ... } fn set_force_live(&self, force_live: bool) { ... } fn set_ignore_inactive_pads(&self, ignore: bool) { ... } fn set_latency( &self, min_latency: ClockTime, max_latency: impl Into<Option<ClockTime>>, ) { ... } fn set_src_caps(&self, caps: &Caps) { ... } fn simple_get_next_time(&self) -> Option<ClockTime> { ... } fn emits_signals(&self) -> bool { ... } fn set_emit_signals(&self, emit_signals: bool) { ... } fn start_time(&self) -> u64 { ... } fn set_start_time(&self, start_time: u64) { ... } fn start_time_selection(&self) -> AggregatorStartTimeSelection { ... } fn set_start_time_selection( &self, start_time_selection: AggregatorStartTimeSelection, ) { ... } fn connect_emit_signals_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_latency_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId { ... } fn connect_start_time_selection_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all Aggregator methods.

§Implementors

Aggregator

Provided Methods§

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 finish_buffer_list( &self, bufferlist: 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 buffer_pool(&self) -> Option<BufferPool>

§Returns

the instance of the gst::BufferPool used by trans; free it after use it

source

fn is_force_live(&self) -> bool

Subclasses may use the return value to inform whether they should return gst::FlowReturn::Eos from their aggregate implementation.

§Returns

whether live status was forced on self.

source

fn ignores_inactive_pads(&self) -> bool

§Returns

whether inactive pads will not be waited on

source

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

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.

Typically only called by subclasses.

§Returns

The latency or GST_CLOCK_TIME_NONE if the element does not sync

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: &impl IsA<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.

source

fn set_force_live(&self, force_live: bool)

Subclasses should call this at construction time in order for self to aggregate on a timeout even when no live source is connected.

source

fn set_ignore_inactive_pads(&self, ignore: bool)

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.

Aggregator will still wait once on each newly-added pad, making sure upstream has had a fair chance to start up.

§ignore

whether inactive pads should not be waited on

source

fn set_latency( &self, min_latency: ClockTime, max_latency: impl Into<Option<ClockTime>>, )

Lets Aggregator 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.

§min_latency

minimum latency

§max_latency

maximum latency

source

fn set_src_caps(&self, caps: &Caps)

Sets the caps to be used on the src pad.

§caps

The gst::Caps to set on the src pad.

source

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

This is a simple GstAggregatorClass::get_next_time implementation that just looks at the gst::Segment on the srcpad of the aggregator and bases the next time on the running time there.

This is the desired behaviour in most cases where you have a live source and you have a dead line based aggregator subclass.

§Returns

The running time based on the position

source

fn emits_signals(&self) -> bool

Enables the emission of signals such as samples-selected

source

fn set_emit_signals(&self, emit_signals: bool)

Enables the emission of signals such as samples-selected

source

fn start_time(&self) -> u64

source

fn set_start_time(&self, start_time: u64)

source

fn start_time_selection(&self) -> AggregatorStartTimeSelection

source

fn set_start_time_selection( &self, start_time_selection: AggregatorStartTimeSelection, )

source

fn connect_emit_signals_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source

fn connect_latency_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source

fn connect_start_time_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

source

fn connect_start_time_selection_notify<F: Fn(&Self) + Send + Sync + 'static>( &self, f: F, ) -> SignalHandlerId

Object Safety§

This trait is not object safe.

Implementors§