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

StreamVolumeExt

Methods

impl StreamVolume
[src]

from

StreamVolumeFormat to convert from

to

StreamVolumeFormat to convert to

val

Volume in from format that should be converted

Returns

the converted volume

Trait Implementations

impl Clone for StreamVolume

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for StreamVolume

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Ord for StreamVolume

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl StaticType for StreamVolume

Returns the type identifier of Self.

impl<T: IsA<Object>> PartialEq<T> for StreamVolume

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for StreamVolume

impl<T: IsA<Object>> PartialOrd<T> for StreamVolume

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Debug for StreamVolume

Formats the value using the given formatter. Read more

impl IsA<Object> for StreamVolume

impl Send for StreamVolume
[src]

impl Sync for StreamVolume
[src]