Struct gstreamer_utils::ConsumptionLink
source · 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§impl ConsumptionLink
impl ConsumptionLink
sourcepub fn disconnected(consumer: AppSrc) -> ConsumptionLink
pub fn disconnected(consumer: AppSrc) -> ConsumptionLink
Create a new disconnected ConsumptionLink
.
sourcepub fn change_producer(
&mut self,
new_producer: &StreamProducer,
reset_stats: bool,
) -> Result<(), AddConsumerError>
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.
sourcepub fn disconnect(&mut self)
pub fn disconnect(&mut self)
Disconnect the consumer from the producer
sourcepub fn dropped(&self) -> u64
pub fn dropped(&self) -> u64
number of dropped buffers because the consumer internal queue was full
sourcepub fn set_discard(&self, discard: bool)
pub fn set_discard(&self, discard: bool)
If set to true
then no buffers will be pushed through this link
Trait Implementations§
source§impl Debug for ConsumptionLink
impl Debug for ConsumptionLink
Auto Trait Implementations§
impl Freeze for ConsumptionLink
impl RefUnwindSafe for ConsumptionLink
impl Send for ConsumptionLink
impl Sync for ConsumptionLink
impl Unpin for ConsumptionLink
impl UnwindSafe for ConsumptionLink
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more