[][src]Trait gstreamer_base::prelude::BaseSrcExt

pub trait BaseSrcExt: 'static {
    fn get_blocksize(&self) -> u32;
fn get_buffer_pool(&self) -> Option<BufferPool>;
fn get_do_timestamp(&self) -> bool;
fn is_async(&self) -> bool;
fn is_live(&self) -> bool;
fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool;
fn set_async(&self, async: bool);
fn set_automatic_eos(&self, automatic_eos: bool);
fn set_blocksize(&self, blocksize: u32);
fn set_caps(&self, caps: &Caps) -> Result<(), BoolError>;
fn set_do_timestamp(&self, timestamp: bool);
fn set_dynamic_size(&self, dynamic: bool);
fn set_format(&self, format: Format);
fn set_live(&self, live: bool);
fn get_property_num_buffers(&self) -> i32;
fn set_property_num_buffers(&self, num_buffers: i32);
fn get_property_typefind(&self) -> bool;
fn set_property_typefind(&self, typefind: bool);
fn connect_property_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_do_timestamp_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_num_buffers_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_typefind_notify<F: Fn(&Self) + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all BaseSrc methods.

Implementors

BaseSrc, PushSrc

Required methods

fn get_blocksize(&self) -> u32

Get the number of bytes that self will push out with each buffer.

Returns

the number of bytes pushed with each buffer.

fn get_buffer_pool(&self) -> Option<BufferPool>

Returns

the instance of the gst::BufferPool used by the src; unref it after usage.

fn get_do_timestamp(&self) -> bool

Query if self timestamps outgoing buffers based on the current running_time.

Returns

true if the base class will automatically timestamp outgoing buffers.

fn is_async(&self) -> bool

Get the current async behaviour of self. See also BaseSrcExt::set_async.

Returns

true if self is operating in async mode.

fn is_live(&self) -> bool

Check if an element is in live mode.

Returns

true if element is in live mode.

fn new_seamless_segment(&self, start: i64, stop: i64, time: i64) -> bool

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

The format for the new segment will be the current format of the source, as configured with BaseSrcExt::set_format

start

The new start value for the segment

stop

Stop value for the new segment

time

The new time value for the start of the new segment

Returns

true if preparation of the seamless segment succeeded.

fn set_async(&self, async: bool)

Configure async behaviour in self, no state change will block. The open, close, start, stop, play and pause virtual methods will be executed in a different thread and are thus allowed to perform blocking operations. Any blocking operation should be unblocked with the unlock vmethod.

async

new async mode

fn set_automatic_eos(&self, automatic_eos: bool)

If automatic_eos is true, self will automatically go EOS if a buffer after the total size is returned. By default this is true but sources that can't return an authoritative size and only know that they're EOS when trying to read more should set this to false.

When self operates in gst::Format::Time, BaseSrc will send an EOS when a buffer outside of the currently configured segment is pushed if automatic_eos is true. Since 1.16, if automatic_eos is false an EOS will be pushed only when the BaseSrc.create implementation returns gst::FlowReturn::Eos.

automatic_eos

automatic eos

fn set_blocksize(&self, blocksize: u32)

Set the number of bytes that self will push out with each buffer. When blocksize is set to -1, a default length will be used.

blocksize

the new blocksize in bytes

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

Set new caps on the basesrc source pad.

caps

a gst::Caps

Returns

true if the caps could be set

fn set_do_timestamp(&self, timestamp: bool)

Configure self to automatically timestamp outgoing buffers based on the current running_time of the pipeline. This property is mostly useful for live sources.

timestamp

enable or disable timestamping

fn set_dynamic_size(&self, dynamic: bool)

If not dynamic, size is only updated when needed, such as when trying to read past current tracked size. Otherwise, size is checked for upon each read.

dynamic

new dynamic size mode

fn set_format(&self, format: Format)

Sets the default format of the source. This will be the format used for sending SEGMENT events and for performing seeks.

If a format of GST_FORMAT_BYTES is set, the element will be able to operate in pull mode if the BaseSrcClass.is_seekable() returns true.

This function must only be called in states < gst::State::Paused.

format

the format to use

fn set_live(&self, live: bool)

If the element listens to a live source, live should be set to true.

A live source will not produce data in the PAUSED state and will therefore not be able to participate in the PREROLL phase of a pipeline. To signal this fact to the application and the pipeline, the state change return value of the live source will be GST_STATE_CHANGE_NO_PREROLL.

live

new live-mode

fn get_property_num_buffers(&self) -> i32

fn set_property_num_buffers(&self, num_buffers: i32)

fn get_property_typefind(&self) -> bool

fn set_property_typefind(&self, typefind: bool)

fn connect_property_blocksize_notify<F: Fn(&Self) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_do_timestamp_notify<F: Fn(&Self) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_num_buffers_notify<F: Fn(&Self) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_typefind_notify<F: Fn(&Self) + Send + Sync + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<BaseSrc>> BaseSrcExt for O[src]

Loading content...