GstStreamVolume
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 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.
GstStreamVolume
GstAudio.StreamVolume
GstAudio.StreamVolume
Methods
gst_stream_volume_get_mute
gboolean gst_stream_volume_get_mute (GstStreamVolume * volume)
Parameters:
volume
–
GstStreamVolume that should be used
Returns TRUE if the stream is muted
GstAudio.StreamVolume.prototype.get_mute
function GstAudio.StreamVolume.prototype.get_mute(): {
// javascript wrapper for 'gst_stream_volume_get_mute'
}
Parameters:
GstAudio.StreamVolume that should be used
GstAudio.StreamVolume.get_mute
def GstAudio.StreamVolume.get_mute (self):
#python wrapper for 'gst_stream_volume_get_mute'
Parameters:
GstAudio.StreamVolume that should be used
gst_stream_volume_get_volume
gdouble gst_stream_volume_get_volume (GstStreamVolume * volume, GstStreamVolumeFormat format)
Parameters:
volume
–
GstStreamVolume that should be used
format
–
GstStreamVolumeFormat which should be returned
The current stream volume as linear factor
GstAudio.StreamVolume.prototype.get_volume
function GstAudio.StreamVolume.prototype.get_volume(format: GstAudio.StreamVolumeFormat): {
// javascript wrapper for 'gst_stream_volume_get_volume'
}
Parameters:
GstAudio.StreamVolume that should be used
GstAudio.StreamVolumeFormat which should be returned
The current stream volume as linear factor
GstAudio.StreamVolume.get_volume
def GstAudio.StreamVolume.get_volume (self, format):
#python wrapper for 'gst_stream_volume_get_volume'
Parameters:
GstAudio.StreamVolume that should be used
GstAudio.StreamVolumeFormat which should be returned
The current stream volume as linear factor
GstAudio.StreamVolume.prototype.set_mute
function GstAudio.StreamVolume.prototype.set_mute(mute: Number): {
// javascript wrapper for 'gst_stream_volume_set_mute'
}
GstAudio.StreamVolume.set_mute
def GstAudio.StreamVolume.set_mute (self, mute):
#python wrapper for 'gst_stream_volume_set_mute'
gst_stream_volume_set_volume
gst_stream_volume_set_volume (GstStreamVolume * volume, GstStreamVolumeFormat format, gdouble val)
Parameters:
volume
–
GstStreamVolume that should be used
format
–
GstStreamVolumeFormat of val
val
–
Linear volume factor that should be set
GstAudio.StreamVolume.prototype.set_volume
function GstAudio.StreamVolume.prototype.set_volume(format: GstAudio.StreamVolumeFormat, val: Number): {
// javascript wrapper for 'gst_stream_volume_set_volume'
}
Parameters:
GstAudio.StreamVolume that should be used
GstAudio.StreamVolumeFormat of val
Linear volume factor that should be set
GstAudio.StreamVolume.set_volume
def GstAudio.StreamVolume.set_volume (self, format, val):
#python wrapper for 'gst_stream_volume_set_volume'
Parameters:
GstAudio.StreamVolume that should be used
GstAudio.StreamVolumeFormat of val
Linear volume factor that should be set
Functions
gst_stream_volume_convert_volume
gdouble gst_stream_volume_convert_volume (GstStreamVolumeFormat from, GstStreamVolumeFormat to, gdouble val)
Parameters:
from
–
GstStreamVolumeFormat to convert from
to
–
GstStreamVolumeFormat to convert to
val
–
Volume in from format that should be converted
the converted volume
GstAudio.prototype.stream_volume_convert_volume
function GstAudio.prototype.stream_volume_convert_volume(from: GstAudio.StreamVolumeFormat, to: GstAudio.StreamVolumeFormat, val: Number): {
// javascript wrapper for 'gst_stream_volume_convert_volume'
}
Parameters:
GstAudio.StreamVolumeFormat to convert from
GstAudio.StreamVolumeFormat to convert to
Volume in from format that should be converted
the converted volume
GstAudio.stream_volume_convert_volume
def GstAudio.stream_volume_convert_volume (from, to, val):
#python wrapper for 'gst_stream_volume_convert_volume'
Parameters:
GstAudio.StreamVolumeFormat to convert from
GstAudio.StreamVolumeFormat to convert to
Volume in from format that should be converted
the converted volume
Properties
Function Macros
GST_STREAM_VOLUME_GET_INTERFACE
#define GST_STREAM_VOLUME_GET_INTERFACE(obj) GST_STREAM_VOLUME_GET_IFACE(obj)
Enumerations
GstStreamVolumeFormat
Different representations of a stream volume. gst_stream_volume_convert_volume allows to convert between the different representations.
Formulas to convert from a linear to a cubic or dB volume are cbrt(val) and 20 * log10 (val).
Members
GST_STREAM_VOLUME_FORMAT_LINEAR
(0)
–
Linear scale factor, 1.0 = 100%
GST_STREAM_VOLUME_FORMAT_CUBIC
(1)
–
Cubic volume scale
GST_STREAM_VOLUME_FORMAT_DB
(2)
–
Logarithmic volume scale (dB, amplitude not power)
GstAudio.StreamVolumeFormat
Different representations of a stream volume. GstAudio.prototype.stream_volume_convert_volume allows to convert between the different representations.
Formulas to convert from a linear to a cubic or dB volume are cbrt(val) and 20 * log10 (val).
Members
GstAudio.StreamVolumeFormat.LINEAR
(0)
–
Linear scale factor, 1.0 = 100%
GstAudio.StreamVolumeFormat.CUBIC
(1)
–
Cubic volume scale
GstAudio.StreamVolumeFormat.DB
(2)
–
Logarithmic volume scale (dB, amplitude not power)
GstAudio.StreamVolumeFormat
Different representations of a stream volume. GstAudio.stream_volume_convert_volume allows to convert between the different representations.
Formulas to convert from a linear to a cubic or dB volume are cbrt(val) and 20 * log10 (val).
Members
GstAudio.StreamVolumeFormat.LINEAR
(0)
–
Linear scale factor, 1.0 = 100%
GstAudio.StreamVolumeFormat.CUBIC
(1)
–
Cubic volume scale
GstAudio.StreamVolumeFormat.DB
(2)
–
Logarithmic volume scale (dB, amplitude not power)
The results of the search are