pub trait BaseSrcImpl: BaseSrcImplExt + ElementImpl {
Show 18 methods // Provided methods fn start(&self) -> Result<(), ErrorMessage> { ... } fn stop(&self) -> Result<(), ErrorMessage> { ... } fn is_seekable(&self) -> bool { ... } fn size(&self) -> Option<u64> { ... } fn times( &self, buffer: &BufferRef ) -> (Option<ClockTime>, Option<ClockTime>) { ... } fn fill( &self, offset: u64, length: u32, buffer: &mut BufferRef ) -> Result<FlowSuccess, FlowError> { ... } fn alloc(&self, offset: u64, length: u32) -> Result<Buffer, FlowError> { ... } fn create( &self, offset: u64, buffer: Option<&mut BufferRef>, length: u32 ) -> Result<CreateSuccess, FlowError> { ... } fn do_seek(&self, segment: &mut Segment) -> bool { ... } fn query(&self, query: &mut QueryRef) -> bool { ... } fn event(&self, event: &Event) -> bool { ... } fn caps(&self, filter: Option<&Caps>) -> Option<Caps> { ... } fn negotiate(&self) -> Result<(), LoggableError> { ... } fn set_caps(&self, caps: &Caps) -> Result<(), LoggableError> { ... } fn fixate(&self, caps: Caps) -> Caps { ... } fn unlock(&self) -> Result<(), ErrorMessage> { ... } fn unlock_stop(&self) -> Result<(), ErrorMessage> { ... } fn decide_allocation( &self, query: &mut Allocation ) -> Result<(), LoggableError> { ... }
}

Provided Methods§

source

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

source

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

source

fn is_seekable(&self) -> bool

source

fn size(&self) -> Option<u64>

Get the total size of the resource in the format set by BaseSrcExt::set_format().

§Returns

true if the size is available and has been set.

source

fn times(&self, buffer: &BufferRef) -> (Option<ClockTime>, Option<ClockTime>)

Given buffer, return start and end time when it should be pushed out. The base class will sync on the clock using these times.

§Returns
source

fn fill( &self, offset: u64, length: u32, buffer: &mut BufferRef ) -> Result<FlowSuccess, FlowError>

source

fn alloc(&self, offset: u64, length: u32) -> Result<Buffer, FlowError>

Ask the subclass to allocate an output buffer with offset and size, the default implementation will use the negotiated allocator.

§Returns
source

fn create( &self, offset: u64, buffer: Option<&mut BufferRef>, length: u32 ) -> Result<CreateSuccess, FlowError>

Ask the subclass to create a buffer with offset and size, the default implementation will call alloc if no allocated buf is provided and then call fill.

source

fn do_seek(&self, segment: &mut Segment) -> bool

source

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

source

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

source

fn caps(&self, filter: Option<&Caps>) -> Option<Caps>

Called to get the caps to report.

source

fn negotiate(&self) -> Result<(), LoggableError>

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

Do not call this in the GstBaseSrcClass::fill vmethod. Call this in GstBaseSrcClass::create or in GstBaseSrcClass::alloc, before any buffer is allocated.

§Returns

true if the negotiation succeeded, else false.

source

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

Set new caps on the basesrc source pad.

§caps

a gst::Caps

§Returns

true if the caps could be set

source

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

Called if, in negotiation, caps need fixating.

§Returns

the fixated caps

source

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

source

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

source

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

Object Safety§

This trait is not object safe.

Implementors§