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_by_id<'a, T>(
&'a self,
name: impl AsRef<IdStr>,
) -> 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 get_optional_by_id<'a, T>(
&'a self,
name: impl AsRef<IdStr>,
) -> 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 value_by_id( &self, name: impl AsRef<IdStr>, ) -> 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>,
use get_by_id() instead
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>,
use get_optional_by_id() instead
pub fn value_by_quark( &self, name: Quark, ) -> Result<&SendValue, GetError<Infallible>>
use value_by_id() instead
pub fn name(&self) -> &GStr
pub fn name_id(&self) -> &IdStr
pub fn name_quark(&self) -> Quark
use name() instead, or name_id() with feature v1_26
pub fn has_name(&self, name: &str) -> bool
pub fn has_field(&self, field: impl IntoGStr) -> bool
pub fn has_field_by_id(&self, field: impl AsRef<IdStr>) -> bool
pub fn has_field_with_type(&self, field: impl IntoGStr, type_: Type) -> bool
pub fn has_field_with_type_by_id( &self, field: impl AsRef<IdStr>, type_: Type, ) -> bool
pub fn has_field_by_quark(&self, field: Quark) -> bool
use has_field_by_id()
pub fn has_field_with_type_by_quark(&self, field: Quark, type_: Type) -> bool
use has_field_with_type_by_id()
pub fn fields(&self) -> FieldIterator<'_>
pub fn iter(&self) -> Iter<'_>
pub fn field_ids(&self) -> FieldIdIterator<'_>
pub fn id_iter(&self) -> IdIter<'_>
pub fn nth_field_name(&self, idx: usize) -> Option<&GStr>
pub fn nth_field_by_id(&self, idx: usize) -> Option<&IdStr>
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
Use iter() instead, or id_iter() with feature v1_26
Trait Implementations§
Source§impl Clone for ElementProperties
impl Clone for ElementProperties
Source§fn clone(&self) -> ElementProperties
fn clone(&self) -> ElementProperties
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl PartialEq for ElementProperties
impl PartialEq for ElementProperties
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 UnsafeUnpin 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
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>
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 more