Struct Meta Transform Ref
Source pub struct MetaTransformRef<'a> { /* private fields */ }Expand description
The transform a meta is asked to perform, as passed to a transform function.
A transform is identified by a glib::Quark and carries data whose type
that quark determines. get pairs the two: it hands back the
data typed as the requested MetaTransform, or None if this is a
different transform.
ⓘ
if let Some(scale) = transform.get::<gst_video::VideoMetaTransformScale>() {
// rescale between scale.in_info() and scale.out_info()
} else if transform.is::<gst::meta::MetaTransformCopy>() {
// plain copy
}Implementations§
Source§impl<'a> MetaTransformRef<'a>
impl<'a> MetaTransformRef<'a>
Sourcepub fn is<MT: MetaTransform>(self) -> bool
pub fn is<MT: MetaTransform>(self) -> bool
Whether this is a MT transform.
Sourcepub fn get<MT: MetaTransform>(self) -> Option<&'a MT>
pub fn get<MT: MetaTransform>(self) -> Option<&'a MT>
This transform’s data as a MT, or None if this is a different
transform.
Sourcepub fn data(self) -> gpointer
pub fn data(self) -> gpointer
This transform’s raw data, for a transform with no MetaTransform
implementation yet. Null if it carries none.
Prefer get; the caller must know what quark() means.
Trait Implementations§
Source§impl<'a> Clone for MetaTransformRef<'a>
impl<'a> Clone for MetaTransformRef<'a>
impl<'a> Copy for MetaTransformRef<'a>
Auto Trait Implementations§
impl<'a> !Send for MetaTransformRef<'a>
impl<'a> !Sync for MetaTransformRef<'a>
impl<'a> Forget for MetaTransformRef<'a>
impl<'a> Freeze for MetaTransformRef<'a>
impl<'a> Move for MetaTransformRef<'a>
impl<'a> RefUnwindSafe for MetaTransformRef<'a>
impl<'a> Unpin for MetaTransformRef<'a>
impl<'a> UnsafeUnpin for MetaTransformRef<'a>
impl<'a> UnwindSafe for MetaTransformRef<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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 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> ⓘ
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