pub struct ElementProperties(/* private fields */);
Expand description
Wrapper around gst::Structure
for element-properties
property of EncodingProfile
.
§Examples
ElementProperties::builder_general()
.field("threads", 16)
.build();
ElementProperties::builder_map()
.item(
ElementPropertiesMapItem::builder("vp8enc")
.field("max-quantizer", 17)
.field("buffer-size", 20000)
.field("threads", 16)
.build(),
)
.build();
Implementations§
source§impl ElementProperties
impl ElementProperties
sourcepub fn builder_general() -> ElementPropertiesGeneralBuilder
pub fn builder_general() -> ElementPropertiesGeneralBuilder
Creates an ElementProperties
builder that build into
something similar to the following:
[element-properties, boolean-prop=true, string-prop=“hi”]
sourcepub fn builder_map() -> ElementPropertiesMapBuilder
pub fn builder_map() -> ElementPropertiesMapBuilder
Creates an ElementProperties
builder that build into
something similar to the following:
element-properties-map, map = { [openh264enc, gop-size=32, ], [x264enc, key-int-max=32, tune=zerolatency], }
sourcepub fn is_general(&self) -> bool
pub fn is_general(&self) -> bool
Returns true if self is built with ElementPropertiesGeneralBuilder
.
sourcepub fn map(&self) -> Option<Vec<ElementPropertiesMapItem>>
pub fn map(&self) -> Option<Vec<ElementPropertiesMapItem>>
Returns the inner vec of ElementPropertiesMapItem
if self is_map()
or None
if self is_general().
pub fn into_inner(self) -> Structure
Methods from Deref<Target = StructureRef>§
pub fn as_ptr(&self) -> *const GstStructure
pub fn as_mut_ptr(&self) -> *mut GstStructure
pub fn get<'a, T>(
&'a self,
name: impl IntoGStr,
) -> Result<T, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>where
T: FromValue<'a>,
pub fn get_optional<'a, T>(
&'a self,
name: impl IntoGStr,
) -> Result<Option<T>, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>where
T: FromValue<'a>,
pub fn value( &self, name: impl IntoGStr, ) -> Result<&SendValue, GetError<Infallible>>
pub fn get_by_quark<'a, T>(
&'a self,
name: Quark,
) -> Result<T, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>where
T: FromValue<'a>,
pub fn get_optional_by_quark<'a, T>(
&'a self,
name: Quark,
) -> Result<Option<T>, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>where
T: FromValue<'a>,
pub fn value_by_quark( &self, name: Quark, ) -> Result<&SendValue, GetError<Infallible>>
pub fn name<'a>(&self) -> &'a GStr
pub fn name_quark(&self) -> Quark
pub fn has_name(&self, name: &str) -> bool
pub fn has_field(&self, field: impl IntoGStr) -> bool
pub fn has_field_with_type(&self, field: impl IntoGStr, type_: Type) -> bool
pub fn has_field_by_quark(&self, field: Quark) -> bool
pub fn has_field_with_type_by_quark(&self, field: Quark, type_: Type) -> bool
pub fn fields(&self) -> FieldIterator<'_>
pub fn iter(&self) -> Iter<'_>
pub fn nth_field_name<'a>(&self, idx: usize) -> Option<&'a GStr>
pub fn n_fields(&self) -> usize
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn can_intersect(&self, other: &StructureRef) -> bool
pub fn intersect(&self, other: &StructureRef) -> Option<Structure>
pub fn is_subset(&self, superset: &StructureRef) -> bool
pub fn serialize(&self, flags: SerializeFlags) -> GString
pub fn serialize_strict( &self, flags: SerializeFlags, ) -> Result<GString, BoolError>
pub fn foreach<F>(&self, func: F) -> bool
Trait Implementations§
source§impl Clone for ElementProperties
impl Clone for ElementProperties
source§fn clone(&self) -> ElementProperties
fn clone(&self) -> ElementProperties
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ElementProperties
impl Debug for ElementProperties
source§impl Default for ElementProperties
impl Default for ElementProperties
source§impl Deref for ElementProperties
impl Deref for ElementProperties
source§impl From<ElementProperties> for Structure
impl From<ElementProperties> for Structure
source§fn from(e: ElementProperties) -> Self
fn from(e: ElementProperties) -> Self
Converts to this type from the input type.
source§impl PartialEq for ElementProperties
impl PartialEq for ElementProperties
source§fn eq(&self, other: &ElementProperties) -> bool
fn eq(&self, other: &ElementProperties) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for ElementProperties
impl StructuralPartialEq for ElementProperties
Auto Trait Implementations§
impl Freeze for ElementProperties
impl RefUnwindSafe for ElementProperties
impl Send for ElementProperties
impl Sync for ElementProperties
impl Unpin for ElementProperties
impl UnwindSafe for ElementProperties
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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