pub enum DataSource {
Shm {
source: MemoryView,
time_stamp: Instant,
},
EglImage {
source: EglAttributes,
time_stamp: Instant,
},
Dmabuf {
source: DmabufAttributes,
time_stamp: Instant,
},
None,
}Expand description
This enum gathers information about source of data to be used when drawing surface.
Must be easy to copy and ensure data is not destroyed during use.
Variants§
Shm
View on shared memory pool or buffer.
EglImage
EGL image stored in graphic card memory.
Dmabuf
Image stored in some graphic device (webcam, GPU, etc…).
None
Source unspecified.
Implementations§
Source§impl DataSource
impl DataSource
Sourcepub fn new_shm(buffer: MemoryView) -> Self
pub fn new_shm(buffer: MemoryView) -> Self
Constructs new shared memory DataSource.
Sourcepub fn new_egl_image(attrs: EglAttributes) -> Self
pub fn new_egl_image(attrs: EglAttributes) -> Self
Constructs new EGL image DataSource.
Sourcepub fn new_dmabuf(attrs: DmabufAttributes) -> Self
pub fn new_dmabuf(attrs: DmabufAttributes) -> Self
Constructs new dmabuf DataSource.
Trait Implementations§
Source§impl Clone for DataSource
impl Clone for DataSource
Source§fn clone(&self) -> DataSource
fn clone(&self) -> DataSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DataSource
impl RefUnwindSafe for DataSource
impl Send for DataSource
impl Sync for DataSource
impl Unpin for DataSource
impl UnwindSafe for DataSource
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