Struct Consumption Link 
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.
The consumer will use the default configuration (see StreamProducer::configure_consumer). If you need different settings, call ConsumptionLink::disconnected_with instead.
Sourcepub fn disconnected_with(
    consumer: AppSrc,
    settings: ConsumerSettings,
) -> ConsumptionLink
 
pub fn disconnected_with( consumer: AppSrc, settings: ConsumerSettings, ) -> 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
Sourcepub fn wait_for_keyframe(&self) -> bool
 
pub fn wait_for_keyframe(&self) -> bool
if the link will drop frames until the next keyframe on discont
Sourcepub fn set_wait_for_keyframe(&self, wait: bool)
 
pub fn set_wait_for_keyframe(&self, wait: bool)
If set to true then the link will drop delta-frames until the next
keyframe on discont (default behavior).
Sourcepub fn stream_producer(&self) -> Option<&StreamProducer>
 
pub fn stream_producer(&self) -> Option<&StreamProducer>
Get the StreamProducer currently by this link, if any.
Sourcepub fn settings(&self) -> ConsumerSettings
 
pub fn settings(&self) -> ConsumerSettings
Get the settings for this Consumer.
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
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>
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>
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