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

source

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().

source

pub fn is_valid(&self) -> bool

source

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

a gst::Caps

§Returns

A VideoInfoDmaDrm, or None if caps couldn’t be parsed.

source

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.

source

pub fn from_video_info( video_info: &VideoInfo, modifier: u64, ) -> Result<Self, BoolError>

Fills drm_info if info’s format has a valid drm format and modifier is also valid

§info

a VideoInfo

§modifier

the associated modifier value.

§Returns

true if drm_info is filled correctly.

§drm_info

VideoInfoDmaDrm

source

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

VideoInfo

source

pub fn fourcc(&self) -> u32

source

pub fn modifier(&self) -> u64

Methods from Deref<Target = VideoInfo>§

source

pub fn is_valid(&self) -> bool

source

pub fn to_caps(&self) -> Result<Caps, BoolError>

Convert the values of self into a gst::Caps.

§Returns

a new gst::Caps containing the info of self.

source

pub fn format(&self) -> VideoFormat

source

pub fn format_info(&self) -> VideoFormatInfo

source

pub fn name<'a>(&self) -> &'a str

source

pub fn width(&self) -> u32

source

pub fn height(&self) -> u32

source

pub fn field_height(&self) -> u32

source

pub fn interlace_mode(&self) -> VideoInterlaceMode

source

pub fn flags(&self) -> VideoFlags

source

pub fn size(&self) -> usize

source

pub fn views(&self) -> u32

source

pub fn chroma_site(&self) -> VideoChromaSite

source

pub fn colorimetry(&self) -> VideoColorimetry

source

pub fn comp_depth(&self, component: u8) -> u32

source

pub fn comp_height(&self, component: u8) -> u32

source

pub fn comp_width(&self, component: u8) -> u32

source

pub fn comp_offset(&self, component: u8) -> usize

source

pub fn comp_plane(&self, component: u8) -> u32

source

pub fn comp_poffset(&self, component: u8) -> u32

source

pub fn comp_pstride(&self, component: u8) -> i32

source

pub fn comp_stride(&self, component: u8) -> i32

source

pub fn par(&self) -> Fraction

source

pub fn fps(&self) -> Fraction

source

pub fn field_rate(&self) -> Fraction

source

pub fn offset(&self) -> &[usize]

source

pub fn stride(&self) -> &[i32]

source

pub fn multiview_mode(&self) -> VideoMultiviewMode

source

pub fn multiview_flags(&self) -> VideoMultiviewFlags

source

pub fn field_order(&self) -> VideoFieldOrder

source

pub fn has_alpha(&self) -> bool

source

pub fn is_gray(&self) -> bool

source

pub fn is_rgb(&self) -> bool

source

pub fn is_yuv(&self) -> bool

source

pub fn is_interlaced(&self) -> bool

source

pub fn n_planes(&self) -> u32

source

pub fn n_components(&self) -> u32

source

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

source

pub fn convert_generic( &self, src_val: impl FormattedValue, dest_fmt: Format, ) -> Option<GenericFormattedValue>

source

pub fn range_offsets(&self, range: VideoColorRange) -> ([i32; 4], [i32; 4])

Trait Implementations§

source§

impl Clone for VideoInfoDmaDrm

source§

fn clone(&self) -> VideoInfoDmaDrm

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VideoInfoDmaDrm

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Deref for VideoInfoDmaDrm

§

type Target = VideoInfo

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl PartialEq for VideoInfoDmaDrm

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StaticType for VideoInfoDmaDrm

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl ValueType for VideoInfoDmaDrm

§

type Type = VideoInfoDmaDrm

Type to get the Type from. Read more
source§

impl Eq for VideoInfoDmaDrm

source§

impl Send for VideoInfoDmaDrm

source§

impl Sync for VideoInfoDmaDrm

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize, ) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,