Interface StreamVolume
- All Superinterfaces:
Proxy
- All Known Implementing Classes:
StreamVolume.StreamVolumeImpl
volume
and playbin
.
Applications can use this interface to get or set the current stream volume. For this
the "volume" GObject
property can be used or the helper functions gst_stream_volume_set_volume()
and gst_stream_volume_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 gst_stream_volume_convert_volume(). Volume sliders should usually
use a cubic volume.
Separate from the volume the stream can also be muted by the "mute" GObject
property or
gst_stream_volume_set_mute() and gst_stream_volume_get_mute().
Elements that provide some kind of stream volume should implement the "volume" and
"mute" GObject
properties and handle setting and getting of them properly.
The volume property is defined to be a linear volume factor.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
StreamVolume.Builder<B extends Builder<B>>
static class
The StreamVolumeImpl type represents a native instance of the StreamVolume interface.static class
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
convertVolume
(StreamVolumeFormat from, StreamVolumeFormat to, double val) default boolean
getMute()
static Type
getType()
Get the GType of the StreamVolume classdefault double
getVolume
(StreamVolumeFormat format) default void
setMute
(boolean mute) default void
setVolume
(StreamVolumeFormat format, double val)
-
Method Details
-
getType
-
convertVolume
-
getMute
default boolean getMute() -
getVolume
-
setMute
default void setMute(boolean mute) -
setVolume
-