Struct gstreamer_video::VideoInfoDmaDrm
source · pub struct VideoInfoDmaDrm(/* private fields */);
Expand description
Information describing a DMABuf image properties. It wraps VideoInfo
and
adds DRM information such as drm-fourcc and drm-modifier, required for
negotiation and mapping.
Implementations§
source§impl VideoInfoDmaDrm
impl VideoInfoDmaDrm
sourcepub fn new(info: VideoInfo, fourcc: u32, modifier: u64) -> VideoInfoDmaDrm
pub fn new(info: VideoInfo, fourcc: u32, modifier: u64) -> VideoInfoDmaDrm
Allocate a new VideoInfoDmaDrm
that is also initialized with
[init()
][Self::init()].
§Returns
a new VideoInfoDmaDrm
.
Free it with gst_video_info_dma_drm_free()
.
pub fn is_valid(&self) -> bool
sourcepub fn from_caps(caps: &CapsRef) -> Result<Self, BoolError>
pub fn from_caps(caps: &CapsRef) -> Result<Self, BoolError>
Parse caps
to generate a VideoInfoDmaDrm
. Please note that the
caps
should be a dma drm caps. The gst_video_is_dma_drm_caps()
can
be used to verify it before calling this function.
§caps
§Returns
A VideoInfoDmaDrm
,
or None
if caps
couldn’t be parsed.
sourcepub fn to_caps(&self) -> Result<Caps, BoolError>
pub fn to_caps(&self) -> Result<Caps, BoolError>
Convert the values of self
into a gst::Caps
. Please note that the
caps
returned will be a dma drm caps which sets format field to DMA_DRM,
and contains a new drm-format field. The value of drm-format field is
composed of a drm fourcc and a modifier, such as NV12:0x0100000000000002.
§Returns
a new gst::Caps
containing the
info in self
.
sourcepub fn to_video_info(&self) -> Result<VideoInfo, BoolError>
pub fn to_video_info(&self) -> Result<VideoInfo, BoolError>
Convert the VideoInfoDmaDrm
into a traditional VideoInfo
with
recognized video format. For DMA kind memory, the non linear DMA format
should be recognized as VideoFormat::DmaDrm
. This helper function
sets info
’s video format into the default value according to self
’s
drm_fourcc field.
§Returns
true
if info
is converted correctly.
§info
pub fn fourcc(&self) -> u32
pub fn modifier(&self) -> u64
Methods from Deref<Target = VideoInfo>§
pub fn is_valid(&self) -> bool
pub fn format(&self) -> VideoFormat
pub fn format_info(&self) -> VideoFormatInfo
pub fn name<'a>(&self) -> &'a str
pub fn width(&self) -> u32
pub fn height(&self) -> u32
pub fn field_height(&self) -> u32
pub fn interlace_mode(&self) -> VideoInterlaceMode
pub fn flags(&self) -> VideoFlags
pub fn size(&self) -> usize
pub fn views(&self) -> u32
pub fn chroma_site(&self) -> VideoChromaSite
pub fn colorimetry(&self) -> VideoColorimetry
pub fn comp_depth(&self, component: u8) -> u32
pub fn comp_height(&self, component: u8) -> u32
pub fn comp_width(&self, component: u8) -> u32
pub fn comp_offset(&self, component: u8) -> usize
pub fn comp_plane(&self, component: u8) -> u32
pub fn comp_poffset(&self, component: u8) -> u32
pub fn comp_pstride(&self, component: u8) -> i32
pub fn comp_stride(&self, component: u8) -> i32
pub fn par(&self) -> Fraction
pub fn fps(&self) -> Fraction
pub fn field_rate(&self) -> Fraction
pub fn offset(&self) -> &[usize]
pub fn stride(&self) -> &[i32]
pub fn multiview_mode(&self) -> VideoMultiviewMode
pub fn multiview_flags(&self) -> VideoMultiviewFlags
pub fn field_order(&self) -> VideoFieldOrder
pub fn has_alpha(&self) -> bool
pub fn is_gray(&self) -> bool
pub fn is_rgb(&self) -> bool
pub fn is_yuv(&self) -> bool
pub fn is_interlaced(&self) -> bool
pub fn n_planes(&self) -> u32
pub fn n_components(&self) -> u32
sourcepub fn convert<U: SpecificFormattedValueFullRange>(
&self,
src_val: impl FormattedValue,
) -> Option<U>
pub fn convert<U: SpecificFormattedValueFullRange>( &self, src_val: impl FormattedValue, ) -> 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
§Returns
TRUE if the conversion was successful.
§dest_value
pointer to destination value
pub fn convert_generic( &self, src_val: impl FormattedValue, dest_fmt: Format, ) -> Option<GenericFormattedValue>
pub fn range_offsets(&self, range: VideoColorRange) -> ([i32; 4], [i32; 4])
Trait Implementations§
source§impl Clone for VideoInfoDmaDrm
impl Clone for VideoInfoDmaDrm
source§fn clone(&self) -> VideoInfoDmaDrm
fn clone(&self) -> VideoInfoDmaDrm
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VideoInfoDmaDrm
impl Debug for VideoInfoDmaDrm
source§impl Deref for VideoInfoDmaDrm
impl Deref for VideoInfoDmaDrm
source§impl PartialEq for VideoInfoDmaDrm
impl PartialEq for VideoInfoDmaDrm
source§impl StaticType for VideoInfoDmaDrm
impl StaticType for VideoInfoDmaDrm
source§fn static_type() -> Type
fn static_type() -> Type
Self
.source§impl ValueType for VideoInfoDmaDrm
impl ValueType for VideoInfoDmaDrm
§type Type = VideoInfoDmaDrm
type Type = VideoInfoDmaDrm
Type
from. Read moreimpl Eq for VideoInfoDmaDrm
impl Send for VideoInfoDmaDrm
impl Sync for VideoInfoDmaDrm
Auto Trait Implementations§
impl Freeze for VideoInfoDmaDrm
impl RefUnwindSafe for VideoInfoDmaDrm
impl Unpin for VideoInfoDmaDrm
impl UnwindSafe for VideoInfoDmaDrm
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>
unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.