#[repr(C)]pub struct VSVideoFormat {
pub color_family: VSColorFamily,
pub sample_type: VSSampleType,
pub bits_per_sample: c_int,
pub bytes_per_sample: c_int,
pub sub_sampling_w: c_int,
pub sub_sampling_h: c_int,
pub num_planes: c_int,
}
Expand description
Describes the format of a clip.
Use queryVideoFormat()
to fill it in with proper error checking.
Manually filling out the struct is allowed but discouraged
since illegal combinations of values will cause undefined behavior.
Fields§
§color_family: VSColorFamily
See VSColorFamily
.
sample_type: VSSampleType
See VSSampleType
.
bits_per_sample: c_int
Number of significant bits.
bytes_per_sample: c_int
Number of bytes needed for a sample. This is always a power of 2 and the smallest possible that can fit the number of bits used per sample.
sub_sampling_w: c_int
log2 subsampling factor, applied to second and third plane
sub_sampling_h: c_int
log2 subsampling factor, applied to second and third plane.
Convenient numbers that can be used like so:
uv_width = y_width >> subSamplingW;
num_planes: c_int
Number of planes, implicit from colorFamily
Trait Implementations§
Source§impl Clone for VSVideoFormat
impl Clone for VSVideoFormat
Source§fn clone(&self) -> VSVideoFormat
fn clone(&self) -> VSVideoFormat
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 VSVideoFormat
impl Debug for VSVideoFormat
Source§impl Hash for VSVideoFormat
impl Hash for VSVideoFormat
Source§impl PartialEq for VSVideoFormat
impl PartialEq for VSVideoFormat
impl Eq for VSVideoFormat
impl StructuralPartialEq for VSVideoFormat
Auto Trait Implementations§
impl Freeze for VSVideoFormat
impl RefUnwindSafe for VSVideoFormat
impl Send for VSVideoFormat
impl Sync for VSVideoFormat
impl Unpin for VSVideoFormat
impl UnwindSafe for VSVideoFormat
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