pub struct ConsumptionLink { /* private fields */ }
Expand description

Link between a StreamProducer and a consumer, disconnecting the link on Drop. The producer and consumer will stay alive while the link is.

Implementations§

source

pub fn disconnected(consumer: AppSrc) -> ConsumptionLink

Create a new disconnected ConsumptionLink.

source

pub fn change_producer( &mut self, new_producer: &StreamProducer, reset_stats: bool ) -> Result<(), AddConsumerError>

Replace the producer by a new one, keeping the existing consumer.

source

pub fn disconnect(&mut self)

Disconnect the consumer from the producer

source

pub fn dropped(&self) -> u64

number of dropped buffers because the consumer internal queue was full

source

pub fn pushed(&self) -> u64

number of buffers pushed through this link

source

pub fn discard(&self) -> bool

if buffers are currently pushed through this link

source

pub fn set_discard(&self, discard: bool)

If set to true then no buffers will be pushed through this link

source

pub fn appsrc(&self) -> &AppSrc

Get the GStreamer appsrc wrapped by this link

Trait Implementations§

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.