gstreamermm: Gst::Mixer Class Reference

Public Member Functions | Static Public Member Functions | Related Functions

# Gst::Mixer Class Reference
[gstreamermm Interfaces]

An interface for elements that provide mixer operations. More...

Inherits Glib::Interface.

Inherited by Gst::AlsaMixer, Gst::AlsaSrc, and Gst::Volume.

Collaboration diagram for Gst::Mixer:
[legend]

List of all members.

## 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.
Glib::ListHandle< Glib::RefPtr < Gst::MixerTrack > > | list_tracks ()
| Returns a list of available tracks for this mixer/element.
Glib::ListHandle< Glib::RefPtr < const Gst::MixerTrack > > | list_tracks () const
| Returns a list of available tracks for this mixer/element.
Glib::ArrayHandle< 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 Glib::ArrayHandle< 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 Glib::ArrayHandle< 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 Glib::ArrayHandle< int > | get_volume_vfunc (const Glib::RefPtr< const Gst::MixerTrack >& track) const
virtual Glib::ListHandle < Glib::RefPtr < Gst::MixerTrack > > | list_tracks_vfunc () const
virtual void | set_volume_vfunc (const Glib::RefPtr< Gst::MixerTrack >& track, const Glib::ArrayHandle< 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 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.
## 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.

## Detailed Description

An interface for elements that provide mixer operations.

## Constructor & Destructor Documentation

virtual Gst::Mixer::~Mixer | ( |  | ) | `[virtual]`

## Member Function Documentation

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.

Since gstreamermm 0.10:
  .14

Parameters:

  | message | A GstMessage to inspect.

Returns:
  The type of the GstMixerMessage, or GST_MIXER_MESSAGE_INVALID if the message is not a GstMixer notification.

Gst::MixerFlags Gst::Mixer::get_mixer_flags | ( |  | ) | const

Get the set of supported flags for this mixer implementation.

Returns:
  A set of or-ed GstMixerFlags for supported features.

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.

Since gstreamermm 0.10:
  .24

Returns:
  A the Gst::MixerType.

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.

Parameters:

  | opts | The Gst::MixerOptions that we operate on.

Returns:
  Current value of the name/value option.

virtual Glib::ustring Gst::Mixer::get_option_vfunc | ( | const Glib::RefPtr< const Gst::MixerOptions >& | opts | ) | const`[virtual]`

Glib::ArrayHandle<int> Gst::Mixer::get_volume | ( | const Glib::RefPtr< const Gst::MixerTrack >& | track | ) | const

Get the current volume(s) on the given track.

Parameters:

  | track | the Gst::MixerTrack to get the volume from.

Returns:
  an array of integers (of size track->num_channels) to with the current volume of each channel in the given track.

virtual Glib::ArrayHandle<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.

const GstMixer* Gst::Mixer::gobj | ( |  | ) | const`[inline]`

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Glib::ListHandle< Glib::RefPtr<Gst::MixerTrack> > Gst::Mixer::list_tracks | ( |  | ) |

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.

Returns:
  A Glib::ListHandle<> consisting of zero or more Gst::MixerTrack.

Glib::ListHandle< 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.

Returns:
  A Glib::ListHandle<> consisting of zero or more Gst::MixerTrack.

virtual Glib::ListHandle< Glib::RefPtr<Gst::MixerTrack> > Gst::Mixer::list_tracks_vfunc | ( |  | ) | const`[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.

Since gstreamermm 0.10:
  .18

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.

Parameters:

  | 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.

Parameters:

  | 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 gst_mixer_option_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.

Since gstreamermm 0.10:
  .18

Parameters:

  | 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.

Parameters:

  | 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 ().

Parameters:

  | 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.

Parameters:

  | 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).

Parameters:

  | 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 Glib::ArrayHandle< 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.

Parameters:

  | 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 Glib::ArrayHandle< int > & | volumes |
| ) |  |  | `[virtual]`

void Gst::Mixer::volume_changed | ( | const Glib::RefPtr< Gst::MixerTrack >& | track,
|  | const Glib::ArrayHandle< 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.

Parameters:

  | track | The GstMixerTrack that has changed.
  | volumes | Array of volume values, one per channel on the mixer track.

## Friends And Related Function Documentation

Glib::RefPtr< Gst::Mixer > wrap | ( | GstMixer * | object,
|  | bool | take_copy = `false` |
| ) |  |  | `[related]`

A Glib::wrap() method for this object.

Parameters:

  | 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.

Returns:
  A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:

- gstreamermm/mixer.h