[−][src]Struct gstreamer_video::VideoInfo
Information describing image properties. This information can be filled
in from GstCaps with VideoInfo::from_caps
. The information is also used
to store the specific video info when mapping a video frame with
VideoFrame::map
.
Use the provided macros to access the info in this structure.
Implementations
impl VideoInfo
[src]
pub fn builder<'a>(
format: VideoFormat,
width: u32,
height: u32
) -> VideoInfoBuilder<'a>
[src]
format: VideoFormat,
width: u32,
height: u32
) -> VideoInfoBuilder<'a>
pub fn is_valid(&self) -> bool
[src]
pub fn from_caps(caps: &CapsRef) -> Result<Self, BoolError>
[src]
pub fn to_caps(&self) -> Result<Caps, BoolError>
[src]
pub fn format(&self) -> VideoFormat
[src]
pub fn format_info(&self) -> VideoFormatInfo
[src]
pub fn width(&self) -> u32
[src]
pub fn height(&self) -> u32
[src]
pub fn field_height(&self) -> u32
[src]
pub fn interlace_mode(&self) -> VideoInterlaceMode
[src]
pub fn flags(&self) -> VideoFlags
[src]
pub fn size(&self) -> usize
[src]
pub fn views(&self) -> u32
[src]
pub fn chroma_site(&self) -> VideoChromaSite
[src]
pub fn colorimetry(&self) -> VideoColorimetry
[src]
pub fn par(&self) -> Fraction
[src]
pub fn fps(&self) -> Fraction
[src]
pub fn offset(&self) -> &[usize]
[src]
pub fn stride(&self) -> &[i32]
[src]
pub fn multiview_mode(&self) -> VideoMultiviewMode
[src]
pub fn multiview_flags(&self) -> VideoMultiviewFlags
[src]
pub fn field_order(&self) -> VideoFieldOrder
[src]
pub fn has_alpha(&self) -> bool
[src]
pub fn is_gray(&self) -> bool
[src]
pub fn is_rgb(&self) -> bool
[src]
pub fn is_yuv(&self) -> bool
[src]
pub fn is_interlaced(&self) -> bool
[src]
pub fn n_planes(&self) -> u32
[src]
pub fn n_components(&self) -> u32
[src]
pub fn convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
&self,
src_val: V
) -> Option<U>
[src]
&self,
src_val: V
) -> Option<U>
Converts among various gst::Format
types. This function handles
GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For
raw video, GST_FORMAT_DEFAULT corresponds to video frames. This
function can be used to handle pad queries of the type GST_QUERY_CONVERT.
src_format
gst::Format
of the src_value
src_value
value to convert
dest_format
gst::Format
of the dest_value
dest_value
pointer to destination value
Returns
TRUE if the conversion was successful.
pub fn convert_generic<V: Into<GenericFormattedValue>>(
&self,
src_val: V,
dest_fmt: Format
) -> Option<GenericFormattedValue>
[src]
&self,
src_val: V,
dest_fmt: Format
) -> Option<GenericFormattedValue>
pub fn align(&mut self, align: &mut VideoAlignment) -> bool
[src]
Adjust the offset and stride fields in self
so that the padding and
stride alignment in align
is respected.
Extra padding will be added to the right side when stride alignment padding
is required and align
will be updated with the new padding values.
align
alignment parameters
Returns
false
if alignment could not be applied, e.g. because the
size of a frame can't be represented as a 32 bit integer (Since: 1.12)
pub fn align_full(
&mut self,
align: &mut VideoAlignment
) -> Result<[usize; 4], BoolError>
[src]
&mut self,
align: &mut VideoAlignment
) -> Result<[usize; 4], BoolError>
v1_18
only.This variant of VideoInfo::align
provides the updated size, in bytes,
of each video plane after the alignment, including all horizontal and vertical
paddings.
In case of GST_VIDEO_INTERLACE_MODE_ALTERNATE info, the returned sizes are the ones used to hold a single field, not the full frame.
Feature: v1_18
align
alignment parameters
plane_size
array used to store the plane sizes
Returns
false
if alignment could not be applied, e.g. because the
size of a frame can't be represented as a 32 bit integer
Trait Implementations
impl Clone for VideoInfo
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for VideoInfo
[src]
impl Eq for VideoInfo
[src]
impl PartialEq<VideoInfo> for VideoInfo
[src]
impl Send for VideoInfo
[src]
impl StaticType for VideoInfo
[src]
fn static_type() -> Type
[src]
impl Sync for VideoInfo
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToSendValue for T where
T: ToValue + SetValue + Send + ?Sized,
[src]
T: ToValue + SetValue + Send + ?Sized,
fn to_send_value(&self) -> SendValue
[src]
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,