#[repr(u32)]pub enum Format {
Show 105 variants
Abgr1555 = 892_420_673,
Abgr16161616f = 1_211_384_385,
Abgr2101010 = 808_665_665,
Abgr4444 = 842_089_025,
Abgr8888 = 875_708_993,
Argb1555 = 892_424_769,
Argb16161616f = 1_211_388_481,
Argb2101010 = 808_669_761,
Argb4444 = 842_093_121,
Argb8888 = 875_713_089,
Axbxgxrx106106106106 = 808_534_593,
Ayuv = 1_448_433_985,
Bgr233 = 944_916_290,
Bgr565 = 909_199_170,
Bgr565_a8 = 943_797_570,
Bgr888 = 875_710_274,
Bgr888_a8 = 943_798_338,
Bgra1010102 = 808_665_410,
Bgra4444 = 842_088_770,
Bgra5551 = 892_420_418,
Bgra8888 = 875_708_738,
Bgrx1010102 = 808_671_298,
Bgrx4444 = 842_094_658,
Bgrx5551 = 892_426_306,
Bgrx8888 = 875_714_626,
Bgrx8888_a8 = 943_806_530,
Big_endian = 2_147_483_648,
C8 = 538_982_467,
Gr1616 = 842_224_199,
Gr88 = 943_215_175,
Nv12 = 842_094_158,
Nv15 = 892_425_806,
Nv16 = 909_203_022,
Nv21 = 825_382_478,
Nv24 = 875_714_126,
Nv42 = 842_290_766,
Nv61 = 825_644_622,
P010 = 808_530_000,
P012 = 842_084_432,
P016 = 909_193_296,
P210 = 808_530_512,
Q401 = 825_242_705,
Q410 = 808_531_025,
R16 = 540_422_482,
R8 = 538_982_482,
Rg1616 = 842_221_394,
Rg88 = 943_212_370,
Rgb332 = 943_867_730,
Rgb565 = 909_199_186,
Rgb565_a8 = 943_797_586,
Rgb888 = 875_710_290,
Rgb888_a8 = 943_798_354,
Rgba1010102 = 808_665_426,
Rgba4444 = 842_088_786,
Rgba5551 = 892_420_434,
Rgba8888 = 875_708_754,
Rgbx1010102 = 808_671_314,
Rgbx4444 = 842_094_674,
Rgbx5551 = 892_426_322,
Rgbx8888 = 875_714_642,
Rgbx8888_a8 = 943_806_546,
Uyvy = 1_498_831_189,
Vuy101010 = 808_670_550,
Vuy888 = 875_713_878,
Vyuy = 1_498_765_654,
X0l0 = 810_299_480,
X0l2 = 843_853_912,
Xbgr1555 = 892_420_696,
Xbgr16161616f = 1_211_384_408,
Xbgr2101010 = 808_665_688,
Xbgr4444 = 842_089_048,
Xbgr8888 = 875_709_016,
Xbgr8888_a8 = 943_800_920,
Xrgb1555 = 892_424_792,
Xrgb16161616f = 1_211_388_504,
Xrgb2101010 = 808_669_784,
Xrgb4444 = 842_093_144,
Xrgb8888 = 875_713_112,
Xrgb8888_a8 = 943_805_016,
Xvyu12_16161616 = 909_334_104,
Xvyu16161616 = 942_954_072,
Xvyu2101010 = 808_670_808,
Xyuv8888 = 1_448_434_008,
Y0l0 = 810_299_481,
Y0l2 = 843_853_913,
Y210 = 808_530_521,
Y212 = 842_084_953,
Y216 = 909_193_817,
Y410 = 808_531_033,
Y412 = 842_085_465,
Y416 = 909_194_329,
Yuv410 = 961_959_257,
Yuv411 = 825_316_697,
Yuv420 = 842_093_913,
Yuv420_10bit = 808_539_481,
Yuv420_8bit = 942_691_673,
Yuv422 = 909_202_777,
Yuv444 = 875_713_881,
Yuyv = 1_448_695_129,
Yvu410 = 961_893_977,
Yvu411 = 825_316_953,
Yvu420 = 842_094_169,
Yvu422 = 909_203_033,
Yvu444 = 875_714_137,
Yvyu = 1_431_918_169,
}
Variants§
Abgr1555 = 892_420_673
Abgr16161616f = 1_211_384_385
Abgr2101010 = 808_665_665
Abgr4444 = 842_089_025
Abgr8888 = 875_708_993
Argb1555 = 892_424_769
Argb16161616f = 1_211_388_481
Argb2101010 = 808_669_761
Argb4444 = 842_093_121
Argb8888 = 875_713_089
Axbxgxrx106106106106 = 808_534_593
Ayuv = 1_448_433_985
Bgr233 = 944_916_290
Bgr565 = 909_199_170
Bgr565_a8 = 943_797_570
Bgr888 = 875_710_274
Bgr888_a8 = 943_798_338
Bgra1010102 = 808_665_410
Bgra4444 = 842_088_770
Bgra5551 = 892_420_418
Bgra8888 = 875_708_738
Bgrx1010102 = 808_671_298
Bgrx4444 = 842_094_658
Bgrx5551 = 892_426_306
Bgrx8888 = 875_714_626
Bgrx8888_a8 = 943_806_530
Big_endian = 2_147_483_648
C8 = 538_982_467
Gr1616 = 842_224_199
Gr88 = 943_215_175
Nv12 = 842_094_158
Nv15 = 892_425_806
Nv16 = 909_203_022
Nv21 = 825_382_478
Nv24 = 875_714_126
Nv42 = 842_290_766
Nv61 = 825_644_622
P010 = 808_530_000
P012 = 842_084_432
P016 = 909_193_296
P210 = 808_530_512
Q401 = 825_242_705
Q410 = 808_531_025
R16 = 540_422_482
R8 = 538_982_482
Rg1616 = 842_221_394
Rg88 = 943_212_370
Rgb332 = 943_867_730
Rgb565 = 909_199_186
Rgb565_a8 = 943_797_586
Rgb888 = 875_710_290
Rgb888_a8 = 943_798_354
Rgba1010102 = 808_665_426
Rgba4444 = 842_088_786
Rgba5551 = 892_420_434
Rgba8888 = 875_708_754
Rgbx1010102 = 808_671_314
Rgbx4444 = 842_094_674
Rgbx5551 = 892_426_322
Rgbx8888 = 875_714_642
Rgbx8888_a8 = 943_806_546
Uyvy = 1_498_831_189
Vuy101010 = 808_670_550
Vuy888 = 875_713_878
Vyuy = 1_498_765_654
X0l0 = 810_299_480
X0l2 = 843_853_912
Xbgr1555 = 892_420_696
Xbgr16161616f = 1_211_384_408
Xbgr2101010 = 808_665_688
Xbgr4444 = 842_089_048
Xbgr8888 = 875_709_016
Xbgr8888_a8 = 943_800_920
Xrgb1555 = 892_424_792
Xrgb16161616f = 1_211_388_504
Xrgb2101010 = 808_669_784
Xrgb4444 = 842_093_144
Xrgb8888 = 875_713_112
Xrgb8888_a8 = 943_805_016
Xvyu12_16161616 = 909_334_104
Xvyu16161616 = 942_954_072
Xvyu2101010 = 808_670_808
Xyuv8888 = 1_448_434_008
Y0l0 = 810_299_481
Y0l2 = 843_853_913
Y210 = 808_530_521
Y212 = 842_084_953
Y216 = 909_193_817
Y410 = 808_531_033
Y412 = 842_085_465
Y416 = 909_194_329
Yuv410 = 961_959_257
Yuv411 = 825_316_697
Yuv420 = 842_093_913
Yuv420_10bit = 808_539_481
Yuv420_8bit = 942_691_673
Yuv422 = 909_202_777
Yuv444 = 875_713_881
Yuyv = 1_448_695_129
Yvu410 = 961_893_977
Yvu411 = 825_316_953
Yvu420 = 842_094_169
Yvu422 = 909_203_033
Yvu444 = 875_714_137
Yvyu = 1_431_918_169
Implementations§
§impl DrmFourcc
impl DrmFourcc
pub fn string_form(&self) -> String
👎Deprecated since 2.2.0: Use ToString::to_string
instead
pub fn string_form(&self) -> String
ToString::to_string
insteadGet the string representation of the format’s fourcc.
Trait Implementations§
§impl TryFrom<u32> for DrmFourcc
impl TryFrom<u32> for DrmFourcc
§fn try_from(value: u32) -> Result<DrmFourcc, <DrmFourcc as TryFrom<u32>>::Error>
fn try_from(value: u32) -> Result<DrmFourcc, <DrmFourcc as TryFrom<u32>>::Error>
Convert from an u32
assert_eq!(DrmFourcc::try_from(875710274).unwrap(), DrmFourcc::Bgr888);
assert!(DrmFourcc::try_from(0).is_err());
// If the u32 is in the valid format to be a fourcc, you can see its string form
assert_eq!(DrmFourcc::try_from(828601953).unwrap_err().string_form(), Some("avc1".to_string()));
impl Copy for DrmFourcc
impl Eq for DrmFourcc
impl StructuralPartialEq for DrmFourcc
Auto Trait Implementations§
impl Freeze for DrmFourcc
impl RefUnwindSafe for DrmFourcc
impl Send for DrmFourcc
impl Sync for DrmFourcc
impl Unpin for DrmFourcc
impl UnwindSafe for DrmFourcc
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
)source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Prepares an output buffer, then turns this buffer into an
Owned
.
User-provided closure F
must only write to and not read from &mut Self
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.