pub trait BaseSrcExtManual: 'static {
    fn allocator(&self) -> (Option<Allocator>, AllocationParams);
fn segment(&self) -> Segment;
fn query_latency(
        &self
    ) -> Result<(bool, Option<ClockTime>, Option<ClockTime>), BoolError>;
fn new_segment(&self, segment: &Segment) -> Result<(), BoolError>;
fn src_pad(&self) -> Pad; }

Required methods

Lets BaseSrc sub-classes to know the memory allocator used by the base class and its params.

Unref the allocator after usage.

Returns
allocator

the gst::Allocator used

params

the gst::AllocationParams of allocator

Query the source for the latency parameters. live will be true when self is configured as a live source. min_latency and max_latency will be set to the difference between the running time and the timestamp of the first buffer.

This function is mostly used by subclasses.

Returns

true if the query succeeded.

live

if the source is live

min_latency

the min latency of the source

max_latency

the max latency of the source

This is supported on crate feature v1_18 only.

Prepare a new segment for emission downstream. This function must only be called by derived sub-classes, and only from the GstBaseSrcClass::create function, as the stream-lock needs to be held.

The format for the segment must be identical with the current format of the source, as configured with BaseSrcExt::set_format().

The format of self must not be gst::Format::Undefined and the format should be configured via BaseSrcExt::set_format() before calling this method.

segment

a pointer to a gst::Segment

Returns

true if preparation of new segment succeeded.

Implementors