pub trait BaseTransformImpl: BaseTransformImplExt + ElementImpl {
    const MODE: BaseTransformMode;
    const PASSTHROUGH_ON_SAME_CAPS: bool;
    const TRANSFORM_IP_ON_PASSTHROUGH: bool;
Show 22 methods // Provided methods fn start(&self) -> Result<(), ErrorMessage> { ... } fn stop(&self) -> Result<(), ErrorMessage> { ... } fn transform_caps( &self, direction: PadDirection, caps: &Caps, filter: Option<&Caps>, ) -> Option<Caps> { ... } fn fixate_caps( &self, direction: PadDirection, caps: &Caps, othercaps: Caps, ) -> Caps { ... } fn set_caps( &self, incaps: &Caps, outcaps: &Caps, ) -> Result<(), LoggableError> { ... } fn accept_caps(&self, direction: PadDirection, caps: &Caps) -> bool { ... } fn query(&self, direction: PadDirection, query: &mut QueryRef) -> bool { ... } fn transform_size( &self, direction: PadDirection, caps: &Caps, size: usize, othercaps: &Caps, ) -> Option<usize> { ... } fn unit_size(&self, caps: &Caps) -> Option<usize> { ... } fn sink_event(&self, event: Event) -> bool { ... } fn src_event(&self, event: Event) -> bool { ... } fn prepare_output_buffer( &self, inbuf: InputBuffer<'_>, ) -> Result<PrepareOutputBufferSuccess, FlowError> { ... } fn transform( &self, inbuf: &Buffer, outbuf: &mut BufferRef, ) -> Result<FlowSuccess, FlowError> { ... } fn transform_ip( &self, buf: &mut BufferRef, ) -> Result<FlowSuccess, FlowError> { ... } fn transform_ip_passthrough( &self, buf: &Buffer, ) -> Result<FlowSuccess, FlowError> { ... } fn propose_allocation( &self, decide_query: Option<&Allocation>, query: &mut Allocation, ) -> Result<(), LoggableError> { ... } fn decide_allocation( &self, query: &mut Allocation, ) -> Result<(), LoggableError> { ... } fn copy_metadata( &self, inbuf: &BufferRef, outbuf: &mut BufferRef, ) -> Result<(), LoggableError> { ... } fn transform_meta<'a>( &self, outbuf: &mut BufferRef, meta: MetaRef<'a, Meta>, inbuf: &'a BufferRef, ) -> bool { ... } fn before_transform(&self, inbuf: &BufferRef) { ... } fn submit_input_buffer( &self, is_discont: bool, inbuf: Buffer, ) -> Result<FlowSuccess, FlowError> { ... } fn generate_output(&self) -> Result<GenerateOutputSuccess, FlowError> { ... }
}

Required Associated Constants§

Provided Methods§

source

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

Optional. Called when the element starts processing. Allows opening external resources.

source

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

Optional. Called when the element stops processing. Allows closing external resources.

source

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

Optional. Given the pad in this direction and the given caps, what caps are allowed on the other pad in this element ?

source

fn fixate_caps( &self, direction: PadDirection, caps: &Caps, othercaps: Caps, ) -> Caps

source

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

Allows the subclass to be notified of the actual caps set.

source

fn accept_caps(&self, direction: PadDirection, caps: &Caps) -> bool

Optional. Subclasses can override this method to check if caps can be handled by the element. The default implementation might not be the most optimal way to check this in all cases.

source

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

Optional. Handle a requested query. Subclasses that implement this must chain up to the parent if they didn’t handle the query

source

fn transform_size( &self, direction: PadDirection, caps: &Caps, size: usize, othercaps: &Caps, ) -> Option<usize>

source

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

source

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

source

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

source

fn prepare_output_buffer( &self, inbuf: InputBuffer<'_>, ) -> Result<PrepareOutputBufferSuccess, FlowError>

source

fn transform( &self, inbuf: &Buffer, outbuf: &mut BufferRef, ) -> Result<FlowSuccess, FlowError>

Required if the element does not operate in-place. Transforms one incoming buffer to one outgoing buffer. The function is allowed to change size/timestamp/duration of the outgoing buffer.

source

fn transform_ip(&self, buf: &mut BufferRef) -> Result<FlowSuccess, FlowError>

Required if the element operates in-place. Transform the incoming buffer in-place.

source

fn transform_ip_passthrough( &self, buf: &Buffer, ) -> Result<FlowSuccess, FlowError>

source

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

Propose buffer allocation parameters for upstream elements. This function must be implemented if the element reads or writes the buffer content. The query that was passed to the decide_allocation is passed in this method (or None when the element is in passthrough mode). The default implementation will pass the query downstream when in passthrough mode and will copy all the filtered metadata API in non-passthrough mode.

source

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

Setup the allocation parameters for allocating output buffers. The passed in query contains the result of the downstream allocation query. This function is only called when not operating in passthrough mode. The default implementation will remove all memory dependent metadata. If there is a filter_meta method implementation, it will be called for all metadata API in the downstream query, otherwise the metadata API is removed.

source

fn copy_metadata( &self, inbuf: &BufferRef, outbuf: &mut BufferRef, ) -> Result<(), LoggableError>

Optional. Copy the metadata from the input buffer to the output buffer. The default implementation will copy the flags, timestamps and offsets of the buffer.

source

fn transform_meta<'a>( &self, outbuf: &mut BufferRef, meta: MetaRef<'a, Meta>, inbuf: &'a BufferRef, ) -> bool

Optional. Transform the metadata on the input buffer to the output buffer. By default this method copies all meta without tags. Subclasses can implement this method and return true if the metadata is to be copied.

source

fn before_transform(&self, inbuf: &BufferRef)

Optional. This method is called right before the base class will start processing. Dynamic properties or other delayed configuration could be performed in this method.

source

fn submit_input_buffer( &self, is_discont: bool, inbuf: Buffer, ) -> Result<FlowSuccess, FlowError>

Function which accepts a new input buffer and pre-processes it. The default implementation performs caps (re)negotiation, then QoS if needed, and places the input buffer into the queued_buf member variable. If the buffer is dropped due to QoS, it returns GST_BASE_TRANSFORM_FLOW_DROPPED. If this input buffer is not contiguous with any previous input buffer, then is_discont is set to true. (Since: 1.6)

source

fn generate_output(&self) -> Result<GenerateOutputSuccess, FlowError>

Object Safety§

This trait is not object safe.

Implementors§