Struct gstreamer_audio::StreamVolume [−]
pub struct StreamVolume(_, _);
This interface is implemented by elements that provide a stream volume. Examples for
such elements are volume and playbin.
Applications can use this interface to get or set the current stream volume. For this
the "volume" gobject::Object property can be used or the helper functions StreamVolume::set_volume
and StreamVolume::get_volume. This volume is always a linear factor, i.e. 0.0 is muted
1.0 is 100%. For showing the volume in a GUI it might make sense to convert it to
a different format by using StreamVolume::convert_volume. Volume sliders should usually
use a cubic volume.
Separate from the volume the stream can also be muted by the "mute" gobject::Object property or
StreamVolume::set_mute and StreamVolume::get_mute.
Elements that provide some kind of stream volume should implement the "volume" and
"mute" gobject::Object properties and handle setting and getting of them properly.
The volume property is defined to be a linear volume factor.
Implements
Methods
impl StreamVolume[src]
impl StreamVolumepub fn convert_volume(
from: StreamVolumeFormat,
to: StreamVolumeFormat,
val: f64
) -> f64[src]
pub fn convert_volume(
from: StreamVolumeFormat,
to: StreamVolumeFormat,
val: f64
) -> f64Trait Implementations
impl Clone for StreamVolume
impl Clone for StreamVolumefn clone(&self) -> StreamVolume
fn clone(&self) -> StreamVolumeReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Hash for StreamVolume
impl Hash for StreamVolumefn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl Ord for StreamVolume
impl Ord for StreamVolumefn cmp(&self, other: &StreamVolume) -> Ordering
fn cmp(&self, other: &StreamVolume) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl StaticType for StreamVolume
impl StaticType for StreamVolumefn static_type() -> Type
fn static_type() -> TypeReturns the type identifier of Self.
impl<T: IsA<Object>> PartialEq<T> for StreamVolume
impl<T: IsA<Object>> PartialEq<T> for StreamVolumefn eq(&self, other: &T) -> bool
fn eq(&self, other: &T) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
#[must_use]
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Eq for StreamVolume
impl Eq for StreamVolumeimpl<T: IsA<Object>> PartialOrd<T> for StreamVolume
impl<T: IsA<Object>> PartialOrd<T> for StreamVolumefn partial_cmp(&self, other: &T) -> Option<Ordering>
fn partial_cmp(&self, other: &T) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Debug for StreamVolume
impl Debug for StreamVolumeimpl IsA<Object> for StreamVolume
impl IsA<Object> for StreamVolumeimpl Send for StreamVolume[src]
impl Send for StreamVolumeimpl Sync for StreamVolume[src]
impl Sync for StreamVolume