Struct gstreamer_video::VideoInfo [−][src]
pub struct VideoInfo(_);
Information describing image properties. This information can be filled
in from GstCaps with Self::from_caps()
. The information is also used
to store the specific video info when mapping a video frame with
[crate::VideoFrame::map()
].
Use the provided macros to access the info in this structure.
Implementations
impl VideoInfo
[src]
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 to_caps(&self) -> Result<Caps, BoolError>
[src]
pub fn to_caps(&self) -> Result<Caps, BoolError>
[src]Convert the values of self
into a crate::gst::Caps
.
Returns
a new crate::gst::Caps
containing the info of self
.
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]
v1_16
only.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]
v1_12
only.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]
pub fn convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
&self,
src_val: V
) -> Option<U>
[src]Converts among various crate::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
crate::gst::Format
of the src_value
src_value
value to convert
dest_format
crate::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) -> Result<(), BoolError>
[src]
pub fn align(&mut self, align: &mut VideoAlignment) -> Result<(), BoolError>
[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]
This is supported on crate feature v1_18
only.
pub fn align_full(
&mut self,
align: &mut VideoAlignment
) -> Result<[usize; 4], BoolError>
[src]v1_18
only.This variant of Self::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.
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
pub fn range_offsets(&self, range: VideoColorRange) -> ([i32; 4], [i32; 4])
[src]
Trait Implementations
impl StaticType for VideoInfo
[src]
impl StaticType for VideoInfo
[src]fn static_type() -> Type
[src]
fn static_type() -> Type
[src]Returns the type identifier of Self
.
impl Eq for VideoInfo
[src]
impl Send for VideoInfo
[src]
impl Sync for VideoInfo
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
[src]
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
[src]pub fn to_send_value(&self) -> SendValue
[src]
pub fn to_send_value(&self) -> SendValue
[src]Returns a SendValue
clone of self
.
impl<'a, T, C> FromValueOptional<'a> for T where
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,
[src]
C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
T: FromValue<'a, Checker = C>,