pub trait PadExtManual: 'static {
Show 51 methods fn add_probe<F>(&self, mask: PadProbeType, func: F) -> Option<PadProbeId>
    where
        F: Fn(&Self, &mut PadProbeInfo<'_>) -> PadProbeReturn + Send + Sync + 'static
;
fn remove_probe(&self, id: PadProbeId);
fn chain(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>;
fn push(&self, buffer: Buffer) -> Result<FlowSuccess, FlowError>;
fn chain_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
fn push_list(&self, list: BufferList) -> Result<FlowSuccess, FlowError>;
fn pull_range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError>;
fn pull_range_fill(
        &self,
        offset: u64,
        buffer: &mut BufferRef,
        size: u32
    ) -> Result<(), FlowError>;
fn range(&self, offset: u64, size: u32) -> Result<Buffer, FlowError>;
fn range_fill(
        &self,
        offset: u64,
        buffer: &mut BufferRef,
        size: u32
    ) -> Result<(), FlowError>;
fn peer_query(&self, query: &mut QueryRef) -> bool;
fn query(&self, query: &mut QueryRef) -> bool;
fn query_default<P: IsA<Object>>(
        &self,
        parent: Option<&P>,
        query: &mut QueryRef
    ) -> bool;
fn proxy_query_caps(&self, query: &mut QueryRef) -> bool;
fn proxy_query_accept_caps(&self, query: &mut QueryRef) -> bool;
fn event_default<P: IsA<Object>>(
        &self,
        parent: Option<&P>,
        event: impl Into<Event>
    ) -> bool;
fn push_event(&self, event: impl Into<Event>) -> bool;
fn send_event(&self, event: impl Into<Event>) -> bool;
fn iterate_internal_links(&self) -> Iterator<Pad>;
fn iterate_internal_links_default<P: IsA<Object>>(
        &self,
        parent: Option<&P>
    ) -> Iterator<Pad>;
fn stream_lock(&self) -> StreamLock<'_>;
unsafe fn set_activate_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>) -> Result<(), LoggableError> + Send + Sync + 'static
;
unsafe fn set_activatemode_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, PadMode, bool) -> Result<(), LoggableError> + Send + Sync + 'static
;
unsafe fn set_chain_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, Buffer) -> Result<FlowSuccess, FlowError> + Send + Sync + 'static
;
unsafe fn set_chain_list_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, BufferList) -> Result<FlowSuccess, FlowError> + Send + Sync + 'static
;
unsafe fn set_event_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, Event) -> bool + Send + Sync + 'static
;
unsafe fn set_event_full_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, Event) -> Result<FlowSuccess, FlowError> + Send + Sync + 'static
;
unsafe fn set_getrange_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, u64, Option<&mut BufferRef>, u32) -> Result<PadGetRangeSuccess, FlowError> + Send + Sync + 'static
;
unsafe fn set_iterate_internal_links_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>) -> Iterator<Pad> + Send + Sync + 'static
;
unsafe fn set_link_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, &Pad) -> Result<PadLinkSuccess, PadLinkError> + Send + Sync + 'static
;
unsafe fn set_query_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>, &mut QueryRef) -> bool + Send + Sync + 'static
;
unsafe fn set_unlink_function<F>(&self, func: F)
    where
        F: Fn(&Self, Option<&Object>) + Send + Sync + 'static
;
fn start_task<F: FnMut() + Send + 'static>(
        &self,
        func: F
    ) -> Result<(), BoolError>;
fn peer_query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
        &self,
        src_val: V
    ) -> Option<U>;
fn peer_query_convert_generic<V: Into<GenericFormattedValue>>(
        &self,
        src_val: V,
        dest_format: Format
    ) -> Option<GenericFormattedValue>;
fn peer_query_duration<T: SpecificFormattedValueIntrinsic>(
        &self
    ) -> Option<T>;
fn peer_query_duration_generic(
        &self,
        format: Format
    ) -> Option<GenericFormattedValue>;
fn peer_query_position<T: SpecificFormattedValueIntrinsic>(
        &self
    ) -> Option<T>;
fn peer_query_position_generic(
        &self,
        format: Format
    ) -> Option<GenericFormattedValue>;
fn query_convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
        &self,
        src_val: V
    ) -> Option<U>;
fn query_convert_generic<V: Into<GenericFormattedValue>>(
        &self,
        src_val: V,
        dest_format: Format
    ) -> Option<GenericFormattedValue>;
fn query_duration<T: SpecificFormattedValueIntrinsic>(&self) -> Option<T>;
fn query_duration_generic(
        &self,
        format: Format
    ) -> Option<GenericFormattedValue>;
fn query_position<T: SpecificFormattedValueIntrinsic>(&self) -> Option<T>;
fn query_position_generic(
        &self,
        format: Format
    ) -> Option<GenericFormattedValue>;
fn mode(&self) -> PadMode;
fn sticky_events_foreach<F: FnMut(&Event) -> ControlFlow<EventForeachAction, EventForeachAction>>(
        &self,
        func: F
    );
fn sticky_event<T: StickyEventType>(&self, idx: u32) -> Option<T>;
fn set_pad_flags(&self, flags: PadFlags);
fn unset_pad_flags(&self, flags: PadFlags);
fn pad_flags(&self) -> PadFlags;
}

Required methods

Be notified of different states of pads. The provided callback is called for every state that matches mask.

Probes are called in groups: First GST_PAD_PROBE_TYPE_BLOCK probes are called, then others, then finally GST_PAD_PROBE_TYPE_IDLE. The only exception here are GST_PAD_PROBE_TYPE_IDLE probes that are called immediately if the pad is already idle while calling add_probe(). In each of the groups, probes are called in the order in which they were added.

mask

the probe mask

callback

GstPadProbeCallback that will be called with notifications of the pad state

destroy_data

GDestroyNotify for user_data

Returns

an id or 0 if no probe is pending. The id can be used to remove the probe with remove_probe(). When using GST_PAD_PROBE_TYPE_IDLE it can happen that the probe can be run immediately and if the probe returns GST_PAD_PROBE_REMOVE this functions returns 0.

MT safe.

Remove the probe with id from self.

MT safe.

id

the probe id to remove

Chain a buffer to self.

The function returns FlowReturn::Flushing if the pad was flushing.

If the buffer type is not acceptable for self (as negotiated with a preceding GST_EVENT_CAPS event), this function returns FlowReturn::NotNegotiated.

The function proceeds calling the chain function installed on self (see gst_pad_set_chain_function()) and the return value of that function is returned to the caller. FlowReturn::NotSupported is returned if self has no chain function.

In all cases, success or failure, the caller loses its reference to buffer after calling this function.

buffer

the Buffer to send, return GST_FLOW_ERROR if not.

Returns

a FlowReturn from the pad.

MT safe.

Pushes a buffer to the peer of self.

This function will call installed block probes before triggering any installed data probes.

The function proceeds calling chain() on the peer pad and returns the value from that function. If self has no peer, FlowReturn::NotLinked will be returned.

In all cases, success or failure, the caller loses its reference to buffer after calling this function.

buffer

the Buffer to push returns GST_FLOW_ERROR if not.

Returns

a FlowReturn from the peer pad.

MT safe.

Chain a bufferlist to self.

The function returns FlowReturn::Flushing if the pad was flushing.

If self was not negotiated properly with a CAPS event, this function returns FlowReturn::NotNegotiated.

The function proceeds calling the chainlist function installed on self (see gst_pad_set_chain_list_function()) and the return value of that function is returned to the caller. FlowReturn::NotSupported is returned if self has no chainlist function.

In all cases, success or failure, the caller loses its reference to list after calling this function.

MT safe.

list

the BufferList to send, return GST_FLOW_ERROR if not.

Returns

a FlowReturn from the pad.

Pushes a buffer list to the peer of self.

This function will call installed block probes before triggering any installed data probes.

The function proceeds calling the chain function on the peer pad and returns the value from that function. If self has no peer, FlowReturn::NotLinked will be returned. If the peer pad does not have any installed chainlist function every group buffer of the list will be merged into a normal Buffer and chained via chain().

In all cases, success or failure, the caller loses its reference to list after calling this function.

list

the BufferList to push returns GST_FLOW_ERROR if not.

Returns

a FlowReturn from the peer pad.

MT safe.

Pulls a buffer from the peer pad or fills up a provided buffer.

This function will first trigger the pad block signal if it was installed.

When self is not linked FlowReturn::NotLinked is returned else this function returns the result of range() on the peer pad. See range() for a list of return values and for the semantics of the arguments of this function.

If buffer points to a variable holding None, a valid new Buffer will be placed in buffer when this function returns FlowReturn::Ok. The new buffer must be freed with gst_buffer_unref() after usage. When this function returns any other result value, buffer will still point to None.

When buffer points to a variable that points to a valid Buffer, the buffer will be filled with the result data when this function returns FlowReturn::Ok. When this function returns any other result value, buffer will be unchanged. If the provided buffer is larger than size, only size bytes will be filled in the result buffer and its size will be updated accordingly.

Note that less than size bytes can be returned in buffer when, for example, an EOS condition is near or when buffer is not large enough to hold size bytes. The caller should check the result buffer size to get the result size.

offset

The start offset of the buffer

size

The length of the buffer

Returns

a FlowReturn from the peer pad.

MT safe.

buffer

a pointer to hold the Buffer, returns GST_FLOW_ERROR if None.

When self is flushing this function returns FlowReturn::Flushing immediately and buffer is None.

Calls the getrange function of self, see GstPadGetRangeFunction for a description of a getrange function. If self has no getrange function installed (see gst_pad_set_getrange_function()) this function returns FlowReturn::NotSupported.

If buffer points to a variable holding None, a valid new Buffer will be placed in buffer when this function returns FlowReturn::Ok. The new buffer must be freed with gst_buffer_unref() after usage.

When buffer points to a variable that points to a valid Buffer, the buffer will be filled with the result data when this function returns FlowReturn::Ok. If the provided buffer is larger than size, only size bytes will be filled in the result buffer and its size will be updated accordingly.

Note that less than size bytes can be returned in buffer when, for example, an EOS condition is near or when buffer is not large enough to hold size bytes. The caller should check the result buffer size to get the result size.

When this function returns any other result value than FlowReturn::Ok, buffer will be unchanged.

This is a lowlevel function. Usually pull_range() is used.

offset

The start offset of the buffer

size

The length of the buffer

Returns

a FlowReturn from the pad.

MT safe.

buffer

a pointer to hold the Buffer, returns FlowReturn::Error if None.

Performs query() on the peer of self.

The caller is responsible for both the allocation and deallocation of the query structure.

query

the Query to perform.

Returns

true if the query could be performed. This function returns false if self has no peer.

Dispatches a query to a pad. The query should have been allocated by the caller via one of the type-specific allocation functions. The element that the pad belongs to is responsible for filling the query with an appropriate response, which should then be parsed with a type-specific query parsing function.

Again, the caller is responsible for both the allocation and deallocation of the query structure.

Please also note that some queries might need a running pipeline to work.

query

the Query to perform.

Returns

true if the query could be performed.

Invokes the default query handler for the given pad. The query is sent to all pads internally linked to self. Note that if there are many possible sink pads that are internally linked to self, only one will be sent the query. Multi-sinkpad elements should implement custom query handlers.

parent

the parent of self or None

query

the Query to handle.

Returns

true if the query was performed successfully.

Calls PadExt::query_caps() for all internally linked pads of self and returns the intersection of the results.

This function is useful as a default caps query function for an element that can handle any stream format, but requires all its pads to have the same caps. Two such elements are tee and adder.

query

a CAPS Query.

Returns

true if query could be executed

Checks if all internally linked pads of self accepts the caps in query and returns the intersection of the results.

This function is useful as a default accept caps query function for an element that can handle any stream format, but requires caps that are acceptable for all opposite pads.

query

an ACCEPT_CAPS Query.

Returns

true if query could be executed

Invokes the default event handler for the given pad.

The EOS event will pause the task associated with self before it is forwarded to all internally linked pads,

The event is sent to all pads internally linked to self. This function takes ownership of event.

parent

the parent of self or None

event

the Event to handle.

Returns

true if the event was sent successfully.

Implementors