Skip to main content

VideoInfoDmaDrm

Struct 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 duplicate of the value. Read more
1.0.0 (const: unstable) · 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

Source§

type Target = VideoInfo

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl Eq for VideoInfoDmaDrm

Source§

impl PartialEq for VideoInfoDmaDrm

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Send for VideoInfoDmaDrm

Source§

impl StaticType for VideoInfoDmaDrm

Source§

fn static_type() -> Type

Returns the type identifier of Self.
Source§

impl Sync for VideoInfoDmaDrm

Source§

impl ValueType for VideoInfoDmaDrm

Source§

type Type = VideoInfoDmaDrm

Type to get the Type from. Read more

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§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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,

Source§

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>,

Source§

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>,

Source§

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.