Struct gstreamer_video::VideoInfo [−][src]
pub struct VideoInfo(_);
Expand description
Information describing image properties. This information can be filled
in from GstCaps with from_caps()
. The information is also used
to store the specific video info when mapping a video frame with
VideoFrame::from_buffer_readable()
.
Use the provided macros to access the info in this structure.
Implementations
v1_16
only.v1_12
only.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 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
Returns
TRUE if the conversion was successful.
dest_value
pointer to destination value
pub fn convert_generic<V: Into<GenericFormattedValue>>(
&self,
src_val: V,
dest_fmt: Format
) -> Option<GenericFormattedValue>
[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)
This is supported on crate feature v1_18
only.
v1_18
only.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.
This variant of 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
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
plane_size
array used to store the plane sizes
Trait Implementations
Returns the type identifier of Self
.
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more
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]