Struct CallPictures
pub struct CallPictures { /* private fields */ }Expand description
Decodes a call’s pictures; see the module docs.
Implementations§
§impl CallPictures
impl CallPictures
pub fn new() -> CallPictures
pub fn new() -> CallPictures
A decoder that wakes the component being built (or handling an event) when a picture is ready.
pub fn receive(&mut self, pictures: Vec<Picture>)
pub fn receive(&mut self, pictures: Vec<Picture>)
Hand over the pictures of one Pictures answer, oldest first.
pub fn poll(&mut self)
pub fn poll(&mut self)
Collect pictures a decoder finished after the unit that completed them was handed over (a page’s decoder works on its own schedule; a quiet stream’s last picture). Skipped while the decoding job holds the decoders: the UI thread never waits for it, and the job hands over what it decodes itself.
pub fn pending(&self) -> usize
pub fn pending(&self) -> usize
Pictures handed over and still being decoded: a screenshot waits for them.
pub fn feed_test_pattern(
&mut self,
person: &str,
source: PictureSource,
_: (u16, u16),
variant: u8,
) -> bool
pub fn feed_test_pattern( &mut self, person: &str, source: PictureSource, _: (u16, u16), variant: u8, ) -> bool
Code a short run of a moving test picture (colour bars with a block
sweeping across, shaded by variant) exactly as a call codes a
camera or screen, and decode it for person’s source: screenshots
and tests show pictures that went through the real encoder and
decoder. False when this build or machine has no encoder (a page
has none).
pub fn insert(&mut self, person: &str, source: PictureSource, image: ImageData)
pub fn insert(&mut self, person: &str, source: PictureSource, image: ImageData)
Put a picture decoded elsewhere in place (a browser’s page decodes its own).
pub fn picture(&self, person: &str, source: PictureSource) -> Option<ImageData>
pub fn picture(&self, person: &str, source: PictureSource) -> Option<ImageData>
The newest picture of person’s camera or screen.
pub fn pictures(&self) -> Vec<(String, PictureSource, ImageData)>
pub fn take_changed(&mut self) -> bool
pub fn take_changed(&mut self) -> bool
Whether a picture arrived since this was last asked.
pub fn retain(&mut self, keep: impl Fn(&str, PictureSource) -> bool)
pub fn retain(&mut self, keep: impl Fn(&str, PictureSource) -> bool)
Keep only the pictures keep still shows (a camera turned off, a
person who left): their tiles go back to showing the person.
pub fn clear(&mut self)
pub fn clear(&mut self)
Forget everything: the call ended.
Trait Implementations§
§impl Default for CallPictures
impl Default for CallPictures
§fn default() -> CallPictures
fn default() -> CallPictures
Auto Trait Implementations§
impl Freeze for CallPictures
impl RefUnwindSafe for CallPictures
impl Send for CallPictures
impl Sync for CallPictures
impl Unpin for CallPictures
impl UnsafeUnpin for CallPictures
impl UnwindSafe for CallPictures
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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