Struct libcamera::pixel_format::PixelFormat
source · pub struct PixelFormat(/* private fields */);
Expand description
Represents libcamera::PixelFormat
, which itself is a pair of fourcc code and u64 modifier as defined in libdrm
.
Implementations§
source§impl PixelFormat
impl PixelFormat
sourcepub const fn new(fourcc: u32, modifier: u64) -> Self
pub const fn new(fourcc: u32, modifier: u64) -> Self
Constructs new PixelFormat from given fourcc code and modifier.
§Examples
use libcamera::pixel_format::PixelFormat;
// Constructs MJPEG pixel format
const PIXEL_FORMAT_MJPEG: PixelFormat =
PixelFormat::new(u32::from_le_bytes([b'M', b'J', b'P', b'G']), 0);
pub fn fourcc(&self) -> u32
pub fn set_fourcc(&mut self, fourcc: u32)
pub fn modifier(&self) -> u64
pub fn set_modifier(&mut self, modifier: u64)
Trait Implementations§
source§impl Clone for PixelFormat
impl Clone for PixelFormat
source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
Returns a copy 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 moresource§impl Debug for PixelFormat
impl Debug for PixelFormat
source§impl From<DrmFormat> for PixelFormat
impl From<DrmFormat> for PixelFormat
source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
source§impl TryFrom<PixelFormat> for DrmFormat
impl TryFrom<PixelFormat> for DrmFormat
impl Copy for PixelFormat
impl Eq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnwindSafe for PixelFormat
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)