pub struct VideoConverterConfig(/* private fields */);
Implementations§
Source§impl VideoConverterConfig
impl VideoConverterConfig
pub fn new() -> Self
pub fn set_resampler_method(&mut self, v: VideoResamplerMethod)
pub fn resampler_method(&self) -> VideoResamplerMethod
pub fn set_chroma_resampler_method(&mut self, v: VideoResamplerMethod)
pub fn chroma_resampler_method(&self) -> VideoResamplerMethod
pub fn set_resampler_taps(&mut self, v: u32)
pub fn resampler_taps(&self) -> u32
pub fn set_dither_method(&mut self, v: VideoDitherMethod)
pub fn dither_method(&self) -> VideoDitherMethod
pub fn set_dither_quantization(&mut self, v: u32)
pub fn dither_quantization(&self) -> u32
pub fn set_src_x(&mut self, v: i32)
pub fn src_x(&self) -> i32
pub fn set_src_y(&mut self, v: i32)
pub fn src_y(&self) -> i32
pub fn set_src_width(&mut self, v: Option<i32>)
pub fn src_width(&self) -> Option<i32>
pub fn set_src_height(&mut self, v: Option<i32>)
pub fn src_height(&self) -> Option<i32>
pub fn set_dest_x(&mut self, v: i32)
pub fn dest_x(&self) -> i32
pub fn set_dest_y(&mut self, v: i32)
pub fn dest_y(&self) -> i32
pub fn set_dest_width(&mut self, v: Option<i32>)
pub fn dest_width(&self) -> Option<i32>
pub fn set_dest_height(&mut self, v: Option<i32>)
pub fn dest_height(&self) -> Option<i32>
pub fn set_fill_border(&mut self, v: bool)
pub fn fills_border(&self) -> bool
pub fn set_alpha_value(&mut self, v: f64)
pub fn alpha_value(&self) -> f64
pub fn set_alpha_mode(&mut self, v: VideoAlphaMode)
pub fn alpha_mode(&self) -> VideoAlphaMode
pub fn set_border_argb(&mut self, v: u32)
pub fn border_argb(&self) -> u32
pub fn set_chroma_mode(&mut self, v: VideoChromaMode)
pub fn chroma_mode(&self) -> VideoChromaMode
pub fn set_matrix_mode(&mut self, v: VideoMatrixMode)
pub fn matrix_mode(&self) -> VideoMatrixMode
pub fn set_gamma_mode(&mut self, v: VideoGammaMode)
pub fn gamma_mode(&self) -> VideoGammaMode
pub fn set_primaries_mode(&mut self, v: VideoPrimariesMode)
pub fn primaries_mode(&self) -> VideoPrimariesMode
pub fn set_threads(&mut self, v: u32)
pub fn threads(&self) -> u32
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>,
get_by_id()
insteadpub 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>,
get_optional_by_id()
insteadpub fn value_by_quark( &self, name: Quark, ) -> Result<&SendValue, GetError<Infallible>>
value_by_id()
insteadSourcepub fn set(&mut self, name: impl IntoGStr, value: impl Into<Value> + Send)
pub fn set(&mut self, name: impl IntoGStr, value: impl Into<Value> + Send)
Sets field name
to the given value value
.
Overrides any default or previously defined value for name
.
Sourcepub fn set_with_static(
&mut self,
name: impl AsRef<GStr> + 'static,
value: impl Into<Value> + Send,
)
pub fn set_with_static( &mut self, name: impl AsRef<GStr> + 'static, value: impl Into<Value> + Send, )
Sets field name
to the given value value
.
Overrides any default or previously defined value for name
.
Sourcepub fn set_with_id(
&mut self,
name: impl AsRef<IdStr>,
value: impl Into<Value> + Send,
)
pub fn set_with_id( &mut self, name: impl AsRef<IdStr>, value: impl Into<Value> + Send, )
Sets field name
to the given value value
.
Overrides any default or previously defined value for name
.
Sourcepub fn set_if(
&mut self,
name: impl IntoGStr,
value: impl Into<Value> + Send,
predicate: bool,
)
pub fn set_if( &mut self, name: impl IntoGStr, value: impl Into<Value> + Send, predicate: bool, )
Sets field name
to the given value
if the predicate
evaluates to true
.
This has no effect if the predicate
evaluates to false
,
i.e. default or previous value for name
is kept.
Sourcepub fn set_with_static_if(
&mut self,
name: impl AsRef<GStr> + 'static,
value: impl Into<Value> + Send,
predicate: bool,
)
pub fn set_with_static_if( &mut self, name: impl AsRef<GStr> + 'static, value: impl Into<Value> + Send, predicate: bool, )
Sets field name
to the given value
if the predicate
evaluates to true
.
This has no effect if the predicate
evaluates to false
,
i.e. default or previous value for name
is kept.
Sourcepub fn set_with_id_if(
&mut self,
name: impl AsRef<IdStr>,
value: impl Into<Value> + Send,
predicate: bool,
)
pub fn set_with_id_if( &mut self, name: impl AsRef<IdStr>, value: impl Into<Value> + Send, predicate: bool, )
Sets field name
to the given value
if the predicate
evaluates to true
.
This has no effect if the predicate
evaluates to false
,
i.e. default or previous value for name
is kept.
Sourcepub fn set_if_some(
&mut self,
name: impl IntoGStr,
value: Option<impl Into<Value> + Send>,
)
pub fn set_if_some( &mut self, name: impl IntoGStr, value: Option<impl Into<Value> + Send>, )
Sets field name
to the given inner value if value
is Some
.
This has no effect if the value is None
, i.e. default or previous value for name
is kept.
Sourcepub fn set_with_static_if_some(
&mut self,
name: impl AsRef<GStr> + 'static,
value: Option<impl Into<Value> + Send>,
)
pub fn set_with_static_if_some( &mut self, name: impl AsRef<GStr> + 'static, value: Option<impl Into<Value> + Send>, )
Sets field name
to the given inner value if value
is Some
.
This has no effect if the value is None
, i.e. default or previous value for name
is kept.
Sourcepub fn set_with_id_if_some(
&mut self,
name: impl AsRef<IdStr>,
value: Option<impl Into<Value> + Send>,
)
pub fn set_with_id_if_some( &mut self, name: impl AsRef<IdStr>, value: Option<impl Into<Value> + Send>, )
Sets field name
to the given inner value if value
is Some
.
This has no effect if the value is None
, i.e. default or previous value for name
is kept.
Sourcepub fn set_from_iter<V>(
&mut self,
name: impl IntoGStr,
iter: impl IntoIterator<Item = impl ToSendValue>,
)
pub fn set_from_iter<V>( &mut self, name: impl IntoGStr, iter: impl IntoIterator<Item = impl ToSendValue>, )
Sets field name
using the given ValueType
V
built from iter
’s the Item
s.
Overrides any default or previously defined value for name
.
Sourcepub fn set_with_static_from_iter<V>(
&mut self,
name: impl AsRef<GStr> + 'static,
iter: impl IntoIterator<Item = impl ToSendValue>,
)
pub fn set_with_static_from_iter<V>( &mut self, name: impl AsRef<GStr> + 'static, iter: impl IntoIterator<Item = impl ToSendValue>, )
Sets field name
using the given ValueType
V
built from iter
’s the Item
s.
Overrides any default or previously defined value for name
.
Sourcepub fn set_with_id_from_iter<V>(
&mut self,
name: impl AsRef<IdStr>,
iter: impl IntoIterator<Item = impl ToSendValue>,
)
pub fn set_with_id_from_iter<V>( &mut self, name: impl AsRef<IdStr>, iter: impl IntoIterator<Item = impl ToSendValue>, )
Sets field name
using the given ValueType
V
built from iter
’s the Item
s.
Overrides any default or previously defined value for name
.
Sourcepub fn set_if_not_empty<V>(
&mut self,
name: impl IntoGStr,
iter: impl IntoIterator<Item = impl ToSendValue>,
)
pub fn set_if_not_empty<V>( &mut self, name: impl IntoGStr, iter: impl IntoIterator<Item = impl ToSendValue>, )
Sets field name
using the given ValueType
V
built from iter
’s Items, if
iter` is not empty.
This has no effect if iter
is empty, i.e. previous value for name
is unchanged.
Sourcepub fn set_with_static_if_not_empty<V>(
&mut self,
name: impl AsRef<GStr> + 'static,
iter: impl IntoIterator<Item = impl ToSendValue>,
)
pub fn set_with_static_if_not_empty<V>( &mut self, name: impl AsRef<GStr> + 'static, iter: impl IntoIterator<Item = impl ToSendValue>, )
Sets field name
using the given ValueType
V
built from iter
’s Items, if
iter` is not empty.
This has no effect if iter
is empty, i.e. previous value for name
is unchanged.
Sourcepub fn set_with_id_if_not_empty<V>(
&mut self,
name: impl AsRef<IdStr>,
iter: impl IntoIterator<Item = impl ToSendValue>,
)
pub fn set_with_id_if_not_empty<V>( &mut self, name: impl AsRef<IdStr>, iter: impl IntoIterator<Item = impl ToSendValue>, )
Sets field name
using the given ValueType
V
built from iter
’s Items, if
iter` is not empty.
This has no effect if iter
is empty, i.e. previous value for name
is unchanged.
Sourcepub fn set_value(&mut self, name: impl IntoGStr, value: SendValue)
pub fn set_value(&mut self, name: impl IntoGStr, value: SendValue)
Sets field name
to the given value value
.
Overrides any default or previously defined value for name
.
Sourcepub fn set_value_with_static(
&mut self,
name: impl AsRef<GStr> + 'static,
value: SendValue,
)
pub fn set_value_with_static( &mut self, name: impl AsRef<GStr> + 'static, value: SendValue, )
Sets field name
to the given value value
.
Overrides any default or previously defined value for name
.
Sourcepub fn set_value_with_id(&mut self, name: impl AsRef<IdStr>, value: SendValue)
pub fn set_value_with_id(&mut self, name: impl AsRef<IdStr>, value: SendValue)
Sets field name
to the given value value
.
Overrides any default or previously defined value for name
.
Sourcepub fn set_value_if(
&mut self,
name: impl IntoGStr,
value: SendValue,
predicate: bool,
)
pub fn set_value_if( &mut self, name: impl IntoGStr, value: SendValue, predicate: bool, )
Sets field name
to the given value
if the predicate
evaluates to true
.
This has no effect if the predicate
evaluates to false
,
i.e. default or previous value for name
is kept.
Sourcepub fn set_value_with_static_if(
&mut self,
name: impl AsRef<GStr> + 'static,
value: SendValue,
predicate: bool,
)
pub fn set_value_with_static_if( &mut self, name: impl AsRef<GStr> + 'static, value: SendValue, predicate: bool, )
Sets field name
to the given value
if the predicate
evaluates to true
.
This has no effect if the predicate
evaluates to false
,
i.e. default or previous value for name
is kept.
Sourcepub fn set_value_with_id_if(
&mut self,
name: impl AsRef<IdStr>,
value: SendValue,
predicate: bool,
)
pub fn set_value_with_id_if( &mut self, name: impl AsRef<IdStr>, value: SendValue, predicate: bool, )
Sets field name
to the given value
if the predicate
evaluates to true
.
This has no effect if the predicate
evaluates to false
,
i.e. default or previous value for name
is kept.
Sourcepub fn set_value_if_some(
&mut self,
name: impl IntoGStr,
value: Option<SendValue>,
)
pub fn set_value_if_some( &mut self, name: impl IntoGStr, value: Option<SendValue>, )
Sets field name
to the given inner value if value
is Some
.
This has no effect if the value is None
, i.e. default or previous value for name
is kept.
Sourcepub fn set_value_with_static_if_some(
&mut self,
name: impl AsRef<GStr> + 'static,
value: Option<SendValue>,
)
pub fn set_value_with_static_if_some( &mut self, name: impl AsRef<GStr> + 'static, value: Option<SendValue>, )
Sets field name
to the given inner value if value
is Some
.
This has no effect if the value is None
, i.e. default or previous value for name
is kept.
Sourcepub fn set_value_with_id_if_some(
&mut self,
name: impl AsRef<IdStr>,
value: Option<SendValue>,
)
pub fn set_value_with_id_if_some( &mut self, name: impl AsRef<IdStr>, value: Option<SendValue>, )
Sets field name
to the given inner value if value
is Some
.
This has no effect if the value is None
, i.e. default or previous value for name
is kept.
pub fn set_by_quark(&mut self, name: Quark, value: impl Into<Value> + Send)
set_by_id()
insteadpub fn set_by_quark_if_some( &mut self, name: Quark, value: Option<impl Into<Value> + Send>, )
set_by_id_if_some()
insteadpub fn set_value_by_quark(&mut self, name: Quark, value: SendValue)
set_by_id_value()
insteadpub fn set_value_by_quark_if_some( &mut self, name: Quark, value: Option<SendValue>, )
set_by_id_value_if_some()
insteadpub fn name(&self) -> &GStr
pub fn name_id(&self) -> &IdStr
pub fn name_quark(&self) -> Quark
name()
instead, or name_id()
with feature v1_26pub fn set_name(&mut self, name: impl IntoGStr)
pub fn set_name_from_static(&mut self, name: impl AsRef<GStr> + 'static)
pub fn set_name_from_id(&mut self, name: impl AsRef<IdStr>)
pub fn set_name_if_some(&mut self, name: Option<impl IntoGStr>)
pub fn set_name_from_static_if_some( &mut self, name: Option<impl AsRef<GStr> + 'static>, )
pub fn set_name_from_id_if_some(&mut self, name: Option<impl AsRef<IdStr>>)
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
has_field_by_id()
pub fn has_field_with_type_by_quark(&self, field: Quark, type_: Type) -> bool
has_field_with_type_by_id()
pub fn remove_field(&mut self, field: impl IntoGStr)
pub fn remove_fields(&mut self, fields: impl IntoIterator<Item = impl IntoGStr>)
pub fn remove_field_by_id(&mut self, field: impl AsRef<IdStr>)
pub fn remove_field_by_ids( &mut self, fields: impl IntoIterator<Item = impl AsRef<IdStr>>, )
pub fn remove_all_fields(&mut self)
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 fixate(&mut self)
pub fn fixate_field(&mut self, name: impl IntoGStr) -> bool
pub fn fixate_field_bool(&mut self, name: impl IntoGStr, target: bool) -> bool
pub fn fixate_field_str( &mut self, name: impl IntoGStr, target: impl IntoGStr, ) -> bool
pub fn fixate_field_nearest_double( &mut self, name: impl IntoGStr, target: f64, ) -> bool
pub fn fixate_field_nearest_fraction( &mut self, name: impl IntoGStr, target: impl Into<Fraction>, ) -> bool
pub fn fixate_field_nearest_int( &mut self, name: impl IntoGStr, target: i32, ) -> 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
iter()
instead, or id_iter()
with feature v1_26Sourcepub fn map_in_place_by_id<F>(&mut self, func: F)
pub fn map_in_place_by_id<F>(&mut self, func: F)
Executes the provided func
on each field, possibly modifying the value.
Sourcepub fn filter_map_in_place_by_id<F>(&mut self, func: F)
pub fn filter_map_in_place_by_id<F>(&mut self, func: F)
Executes the provided func
on each field with an owned value.
- If
func
returnsSome(value)
, the field’s value is replaced withvalue
. - If
func
returnsNone
, the field is removed.
Sourcepub fn map_in_place<F>(&mut self, func: F) -> ControlFlow<()>
pub fn map_in_place<F>(&mut self, func: F) -> ControlFlow<()>
Executes the provided func
on each field, possibly modifying the value,
as long as ControlFlow::Continue(())
is returned.
Using Quark
s is deprecated, however this method is kept because there
are no other means to achieve this pre-GStreamer-1.26. With feature v1_26,
use map_in_place_by_id instead.
§Returns:
ControlFlow::Continue(())
iffunc
returned this for all fields,ControlFlow::Break(())
otherwise.
Sourcepub fn filter_map_in_place<F>(&mut self, func: F)
pub fn filter_map_in_place<F>(&mut self, func: F)
Executes the provided func
on each field with an owned value.
- If
func
returnsSome(value)
, the field’s value is replaced withvalue
. - If
func
returnsNone
, the field is removed.
Using Quark
s is deprecated, however this method is kept because there
are no other means to achieve this pre-GStreamer-1.26. With feature v1_26,
use filter_map_in_place_by_id instead.
Trait Implementations§
Source§impl AsMut<StructureRef> for VideoConverterConfig
impl AsMut<StructureRef> for VideoConverterConfig
Source§fn as_mut(&mut self) -> &mut StructureRef
fn as_mut(&mut self) -> &mut StructureRef
Source§impl AsRef<StructureRef> for VideoConverterConfig
impl AsRef<StructureRef> for VideoConverterConfig
Source§fn as_ref(&self) -> &StructureRef
fn as_ref(&self) -> &StructureRef
Source§impl Clone for VideoConverterConfig
impl Clone for VideoConverterConfig
Source§fn clone(&self) -> VideoConverterConfig
fn clone(&self) -> VideoConverterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for VideoConverterConfig
impl Debug for VideoConverterConfig
Source§impl Default for VideoConverterConfig
impl Default for VideoConverterConfig
Source§impl Deref for VideoConverterConfig
impl Deref for VideoConverterConfig
Source§type Target = StructureRef
type Target = StructureRef
Source§fn deref(&self) -> &StructureRef
fn deref(&self) -> &StructureRef
Source§impl DerefMut for VideoConverterConfig
impl DerefMut for VideoConverterConfig
Source§fn deref_mut(&mut self) -> &mut StructureRef
fn deref_mut(&mut self) -> &mut StructureRef
Source§impl From<VideoConverterConfig> for Structure
impl From<VideoConverterConfig> for Structure
Source§fn from(v: VideoConverterConfig) -> Self
fn from(v: VideoConverterConfig) -> Self
Source§impl From<VideoConverterConfig> for Value
impl From<VideoConverterConfig> for Value
Source§fn from(s: VideoConverterConfig) -> Value
fn from(s: VideoConverterConfig) -> Value
Source§impl PartialEq for VideoConverterConfig
impl PartialEq for VideoConverterConfig
Source§impl ToValue for VideoConverterConfig
impl ToValue for VideoConverterConfig
Source§impl ToValueOptional for VideoConverterConfig
impl ToValueOptional for VideoConverterConfig
Source§fn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Option
to a Value
.Source§impl<'a> TryFrom<&'a StructureRef> for VideoConverterConfig
impl<'a> TryFrom<&'a StructureRef> for VideoConverterConfig
Source§impl TryFrom<Structure> for VideoConverterConfig
impl TryFrom<Structure> for VideoConverterConfig
impl Eq for VideoConverterConfig
impl StructuralPartialEq for VideoConverterConfig
Auto Trait Implementations§
impl Freeze for VideoConverterConfig
impl RefUnwindSafe for VideoConverterConfig
impl Send for VideoConverterConfig
impl Sync for VideoConverterConfig
impl Unpin for VideoConverterConfig
impl UnwindSafe for VideoConverterConfig
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> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
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 moreSource§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.