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
Provided Methods§
sourcefn finish_buffer(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>
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.
sourcefn finish_buffer_list(
&self,
bufferlist: BufferList,
) -> Result<FlowSuccess, FlowError>
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.
sourcefn buffer_pool(&self) -> Option<BufferPool>
fn buffer_pool(&self) -> Option<BufferPool>
§Returns
the instance of the gst::BufferPool
used
by trans
; free it after use it
sourcefn is_force_live(&self) -> bool
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
.
sourcefn ignores_inactive_pads(&self) -> bool
fn ignores_inactive_pads(&self) -> bool
§Returns
whether inactive pads will not be waited on
sourcefn latency(&self) -> Option<ClockTime>
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
sourcefn peek_next_sample(&self, pad: &impl IsA<AggregatorPad>) -> Option<Sample>
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.
sourcefn set_force_live(&self, force_live: bool)
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.
sourcefn set_ignore_inactive_pads(&self, ignore: bool)
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
sourcefn set_latency(
&self,
min_latency: ClockTime,
max_latency: impl Into<Option<ClockTime>>,
)
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
sourcefn set_src_caps(&self, caps: &Caps)
fn set_src_caps(&self, caps: &Caps)
sourcefn simple_get_next_time(&self) -> Option<ClockTime>
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
sourcefn emits_signals(&self) -> bool
fn emits_signals(&self) -> bool
Enables the emission of signals such as samples-selected
sourcefn set_emit_signals(&self, emit_signals: bool)
fn set_emit_signals(&self, emit_signals: bool)
Enables the emission of signals such as samples-selected