Enum cognitive_qualia::surface::DataSource
[−]
[src]
pub enum DataSource { Shm { source: MemoryView, time_stamp: Instant, }, EglImage { source: EglAttributes, time_stamp: Instant, }, Dmabuf { source: DmabufAttributes, time_stamp: Instant, }, None, }
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.
Fields of Shm
source: MemoryView | |
time_stamp: Instant |
EglImage
EGL image stored in graphic card memory.
Fields of EglImage
source: EglAttributes | |
time_stamp: Instant |
Dmabuf
Image stored in some graphic device (webcam, GPU, etc...).
Fields of Dmabuf
source: DmabufAttributes | |
time_stamp: Instant |
None
Source unspecified.
Methods
impl DataSource
[src]
fn new_shm(buffer: MemoryView) -> Self
Constructs new shared memory DataSource
.
fn new_egl_image(attrs: EglAttributes) -> Self
Constructs new EGL image DataSource
.
fn new_dmabuf(attrs: DmabufAttributes) -> Self
Constructs new dmabuf DataSource
.
fn is_none(&self) -> bool
Returns true if data source is unspecified, false otherwise.
fn as_image(&self) -> Option<&Image>
Returns data as Image
if available.
Trait Implementations
impl Clone for DataSource
[src]
fn clone(&self) -> DataSource
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more