gstreamermm
0.10.11
|
An interface for elements that provide mixer operations. More...
Public Member Functions | |
virtual | ~Mixer () |
GstMixer* | gobj () |
Provides access to the underlying C GObject. | |
const GstMixer* | gobj () const |
Provides access to the underlying C GObject. | |
std::vector< Glib::RefPtr < Gst::MixerTrack > > | list_tracks () |
Returns a list of available tracks for this mixer/element. | |
std::vector< Glib::RefPtr < const Gst::MixerTrack > > | list_tracks () const |
Returns a list of available tracks for this mixer/element. | |
std::vector< int > | get_volume (const Glib::RefPtr< const Gst::MixerTrack >& track) const |
Get the current volume(s) on the given track. | |
void | set_volume (const Glib::RefPtr< Gst::MixerTrack >& track, const std::vector< int >& volumes) |
Sets the volume on each channel in a track. | |
void | set_mute (const Glib::RefPtr< Gst::MixerTrack >& track, bool mute) |
Mutes or unmutes the given channel. | |
void | set_record (const Glib::RefPtr< Gst::MixerTrack >& track, bool record) |
Enables or disables recording on the given track. | |
void | set_option (const Glib::RefPtr< Gst::MixerOptions >& opts, const Glib::ustring&value) |
Sets a name/value option in the mixer to the requested value. | |
void | mute_toggled (const Glib::RefPtr< Gst::MixerTrack >& track, bool mute) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the given track has changed mute state. | |
void | record_toggled (const Glib::RefPtr< Gst::MixerTrack >& track, bool record) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the given track has changed recording state. | |
void | volume_changed (const Glib::RefPtr< Gst::MixerTrack >& track, const std::vector< int >& volumes) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the volume(s) for the given track have changed. | |
void | option_changed (const Glib::RefPtr< Gst::MixerOptions >& opts, const Glib::ustring&value) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the given options object has changed state. | |
void | options_list_changed (const Glib::RefPtr< Gst::MixerOptions >& opts) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the list of possible options of a given options object has changed. | |
Glib::ustring | get_option (const Glib::RefPtr< const Gst::MixerOptions >& opts) const |
Get the current value of a name/value option in the mixer. | |
void | mixer_changed () |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the list of available mixer tracks for a given mixer object has changed. | |
Gst::MixerFlags | get_mixer_flags () const |
Get the set of supported flags for this mixer implementation. | |
Gst::MixerType | get_mixer_type () const |
Get the Gst::MixerType of this mixer implementation. | |
virtual std::vector< int > | get_volume_vfunc (const Glib::RefPtr< const Gst::MixerTrack >& track) const |
virtual std::vector < Glib::RefPtr < Gst::MixerTrack > > | list_tracks_vfunc () |
virtual void | set_volume_vfunc (const Glib::RefPtr< Gst::MixerTrack >& track, const std::vector< int >& volumes) |
virtual void | set_mute_vfunc (const Glib::RefPtr< Gst::MixerTrack >& track, bool mute) |
virtual void | set_record_vfunc (const Glib::RefPtr< Gst::MixerTrack >& track, bool record) |
virtual void | set_option_vfunc (const Glib::RefPtr< Gst::MixerOptions >& opts, const Glib::ustring&value) |
virtual Glib::ustring | get_option_vfunc (const Glib::RefPtr< const Gst::MixerOptions >& opts) const |
virtual Gst::MixerFlags | get_mixer_flags_vfunc () const |
Static Public Member Functions | |
static void | add_interface (GType gtype_implementer) |
static GType | get_type () |
Get the GType for this class, for use with the underlying GObject type system. | |
static Gst::MixerMessageType | get_message_type (const Glib::RefPtr< Gst::Message >& message) |
Check a bus message to see if it is a GstMixer notification message and return the GstMixerMessageType identifying which type of notification it is. | |
Protected Member Functions | |
Mixer () | |
You should derive from this class to use it. | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gst::Mixer > | wrap (GstMixer* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
An interface for elements that provide mixer operations.
Gst::Mixer::Mixer | ( | ) | [protected] |
You should derive from this class to use it.
virtual Gst::Mixer::~Mixer | ( | ) | [virtual] |
static void Gst::Mixer::add_interface | ( | GType | gtype_implementer | ) | [static] |
static Gst::MixerMessageType Gst::Mixer::get_message_type | ( | const Glib::RefPtr< Gst::Message >& | message | ) | [static] |
Check a bus message to see if it is a GstMixer notification message and return the GstMixerMessageType identifying which type of notification it is.
message | A GstMessage to inspect. |
Gst::MixerFlags Gst::Mixer::get_mixer_flags | ( | ) | const |
Get the set of supported flags for this mixer implementation.
virtual Gst::MixerFlags Gst::Mixer::get_mixer_flags_vfunc | ( | ) | const [virtual] |
Gst::MixerType Gst::Mixer::get_mixer_type | ( | ) | const |
Get the Gst::MixerType of this mixer implementation.
Glib::ustring Gst::Mixer::get_option | ( | const Glib::RefPtr< const Gst::MixerOptions >& | opts | ) | const |
Get the current value of a name/value option in the mixer.
opts | The Gst::MixerOptions that we operate on. |
virtual Glib::ustring Gst::Mixer::get_option_vfunc | ( | const Glib::RefPtr< const Gst::MixerOptions >& | opts | ) | const [virtual] |
static GType Gst::Mixer::get_type | ( | ) | [static] |
Get the GType for this class, for use with the underlying GObject type system.
Reimplemented in Gst::AlsaMixer, Gst::AlsaSrc, and Gst::Volume.
std::vector<int> Gst::Mixer::get_volume | ( | const Glib::RefPtr< const Gst::MixerTrack >& | track | ) | const |
Get the current volume(s) on the given track.
track | the Gst::MixerTrack to get the volume from. |
virtual std::vector<int> Gst::Mixer::get_volume_vfunc | ( | const Glib::RefPtr< const Gst::MixerTrack >& | track | ) | const [virtual] |
GstMixer* Gst::Mixer::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::Interface.
Reimplemented in Gst::AlsaMixer, Gst::AlsaSrc, and Gst::Volume.
const GstMixer* Gst::Mixer::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::Interface.
Reimplemented in Gst::AlsaMixer, Gst::AlsaSrc, and Gst::Volume.
Returns a list of available tracks for this mixer/element.
Note that it is allowed for sink (output) elements to only provide the output tracks in this list. Likewise, for sources (inputs), it is allowed to only provide input elements in this list.
std::vector< Glib::RefPtr<const Gst::MixerTrack> > Gst::Mixer::list_tracks | ( | ) | const |
Returns a list of available tracks for this mixer/element.
Note that it is allowed for sink (output) elements to only provide the output tracks in this list. Likewise, for sources (inputs), it is allowed to only provide input elements in this list.
virtual std::vector< Glib::RefPtr<Gst::MixerTrack> > Gst::Mixer::list_tracks_vfunc | ( | ) | [virtual] |
void Gst::Mixer::mixer_changed | ( | ) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the list of available mixer tracks for a given mixer object has changed.
Applications should rebuild their interface when they receive this message.
This function only works for GstElements that are implementing the GstMixer interface, and the element needs to have been provided a bus.
void Gst::Mixer::mute_toggled | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
bool | mute | ||
) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the given track has changed mute state.
This function only works for GstElements that are implementing the GstMixer interface, and the element needs to have been provided a bus.
track | The GstMixerTrack that has change mute state. |
mute | The new state of the mute flag on the track. |
void Gst::Mixer::option_changed | ( | const Glib::RefPtr< Gst::MixerOptions >& | opts, |
const Glib::ustring & | value | ||
) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the given options object has changed state.
This function only works for GstElements that are implementing the GstMixer interface, and the element needs to have been provided a bus.
opts | The GstMixerOptions that has changed value. |
value | The new value of the GstMixerOptions. |
void Gst::Mixer::options_list_changed | ( | const Glib::RefPtr< Gst::MixerOptions >& | opts | ) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the list of possible options of a given options object has changed.
The new options are not contained in the message on purpose. Applications should call get_values() on opts to make opts update its internal state and obtain the new list of values.
This function only works for GstElements that are implementing the GstMixer interface, and the element needs to have been provided a bus for this to work.
opts | The GstMixerOptions whose list of values has changed. |
void Gst::Mixer::record_toggled | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
bool | record | ||
) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the given track has changed recording state.
This function only works for GstElements that are implementing the GstMixer interface, and the element needs to have been provided a bus.
track | The GstMixerTrack that has changed recording state. |
record | The new state of the record flag on the track. |
void Gst::Mixer::set_mute | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
bool | mute | ||
) |
Mutes or unmutes the given channel.
To find out whether a track is currently muted, use GST_MIXER_TRACK_HAS_FLAG ().
track | The Gst::MixerTrack to operate on. |
mute | A boolean value indicating whether to turn on or off muting. |
virtual void Gst::Mixer::set_mute_vfunc | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
bool | mute | ||
) | [virtual] |
void Gst::Mixer::set_option | ( | const Glib::RefPtr< Gst::MixerOptions >& | opts, |
const Glib::ustring & | value | ||
) |
Sets a name/value option in the mixer to the requested value.
opts | The Gst::MixerOptions that we operate on. |
value | The requested new option value. |
virtual void Gst::Mixer::set_option_vfunc | ( | const Glib::RefPtr< Gst::MixerOptions >& | opts, |
const Glib::ustring & | value | ||
) | [virtual] |
void Gst::Mixer::set_record | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
bool | record | ||
) |
Enables or disables recording on the given track.
Note that this is only possible on input tracks, not on output tracks (see GST_MIXER_TRACK_HAS_FLAG () and the GST_MIXER_TRACK_INPUT flag).
track | The Gst::MixerTrack to operate on. |
record | A boolean value that indicates whether to turn on or off recording. |
virtual void Gst::Mixer::set_record_vfunc | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
bool | record | ||
) | [virtual] |
void Gst::Mixer::set_volume | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
const std::vector< int > & | volumes | ||
) |
Sets the volume on each channel in a track.
Short note about naming: a track is defined as one separate stream owned by the mixer/element, such as 'Line-in' or 'Microphone'. A channel is said to be a mono-stream inside this track. A stereo track thus contains two channels.
track | The Gst::MixerTrack to set the volume on. |
volumes | An array of integers (of size track->num_channels) that gives the wanted volume for each channel in this track. |
virtual void Gst::Mixer::set_volume_vfunc | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
const std::vector< int > & | volumes | ||
) | [virtual] |
void Gst::Mixer::volume_changed | ( | const Glib::RefPtr< Gst::MixerTrack >& | track, |
const std::vector< int > & | volumes | ||
) |
This function is called by the mixer implementation to produce a notification message on the bus indicating that the volume(s) for the given track have changed.
This function only works for GstElements that are implementing the GstMixer interface, and the element needs to have been provided a bus.
track | The GstMixerTrack that has changed. |
volumes | Array of volume values, one per channel on the mixer track. |
Glib::RefPtr< Gst::Mixer > wrap | ( | GstMixer * | object, |
bool | take_copy = false |
||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |