[gstreamermm] Added Gst::Mixer message classes that can be used when parsing messages received on the bus.



commit fc75196a599d96c4f17e2dc9751debcda5cd50b5
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Tue May 12 23:03:02 2009 -0400

    Added Gst::Mixer message classes that can be used when parsing messages received on the bus.
---
 ChangeLog                 |   11 ++
 gstreamer/src/message.ccg |  161 ++++++++++++++++++------------
 gstreamer/src/mixer.ccg   |  171 ++++++++++++++++++++++++++++++++
 gstreamer/src/mixer.hg    |  238 +++++++++++++++++++++++++++++++++++++++++++--
 tools/m4/convert_gst.m4   |    1 +
 5 files changed, 508 insertions(+), 74 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 93444ba..dd947e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2009-05-12  José Alburquerque  <jaalburqu svn gnome org>
 
+	* gstreamer/src/mixer.ccg:
+	* gstreamer/src/mixer.hg: Added Gst::Mixer message classes that can be
+	used when parsing messages received on the bus.  Wrapped
+	get_message_type().
+	* gstreamer/src/message.ccg: Modified Gst::wrap() (for GstMessage) so
+	that it wraps GstMessages to mixer message classes if appropriate.
+	* tools/m4/convert_gst.m4: Added a conversion from
+	GstMixerMessageType.
+
+2009-05-12  José Alburquerque  <jaalburqu svn gnome org>
+
 	* gstreamer/src/basetransform.hg: Marked TODO's completed.
 
 2009-05-12  José Alburquerque  <jaalburqu svn gnome org>
diff --git a/gstreamer/src/message.ccg b/gstreamer/src/message.ccg
index afd7525..b0128da 100644
--- a/gstreamer/src/message.ccg
+++ b/gstreamer/src/message.ccg
@@ -18,6 +18,8 @@
  */
 
 #include <gst/gstenumtypes.h>
+#include <gst/interfaces/mixer.h>
+#include <gstreamermm/mixer.h>
 #include <gstreamermm/structure.h>
 #include <gstreamermm/taglist.h>
 _PINCLUDE(gstreamermm/private/miniobject_p.h)
@@ -606,72 +608,101 @@ Glib::RefPtr<Gst::Message> Message::wrap(GstMessage* message, bool take_copy)
   if(!message)
     return result;
 
-  switch (GST_MESSAGE_TYPE(message))
+  if (gst_mixer_message_get_type(message) == GST_MIXER_MESSAGE_INVALID)
   {
-    case GST_MESSAGE_EOS:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageEos(message) );
-      break;
-    case GST_MESSAGE_ERROR:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageError(message) );
-      break;
-    case GST_MESSAGE_WARNING:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageWarning(message) );
-      break;
-    case GST_MESSAGE_INFO:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageInfo(message) );
-      break;
-    case GST_MESSAGE_TAG:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageTag(message) );
-      break;
-    case GST_MESSAGE_BUFFERING:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageBuffering(message) );
-      break;
-    case GST_MESSAGE_STATE_CHANGED:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageStateChanged(message) );
-      break;
-    case GST_MESSAGE_STATE_DIRTY:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageStateDirty(message) );
-      break;
-    case GST_MESSAGE_CLOCK_PROVIDE:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageClockProvide(message) );
-      break;
-    case GST_MESSAGE_CLOCK_LOST:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageClockLost(message) );
-      break;
-    case GST_MESSAGE_NEW_CLOCK:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageNewClock(message) );
-      break;
-    case GST_MESSAGE_APPLICATION:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageApplication(message) );
-      break;
-    case GST_MESSAGE_ELEMENT:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageElement(message) );
-      break;
-    case GST_MESSAGE_SEGMENT_START:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageSegmentStart(message) );
-      break;
-    case GST_MESSAGE_SEGMENT_DONE:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageSegmentDone(message) );
-      break;
-    case GST_MESSAGE_DURATION:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageDuration(message) );
-      break;
-    case GST_MESSAGE_LATENCY:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageLatency(message) );
-      break;
-    case GST_MESSAGE_ASYNC_START:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageAsyncStart(message) );
-      break;
-    case GST_MESSAGE_ASYNC_DONE:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageAsyncDone(message) );
-      break;
-    case GST_MESSAGE_UNKNOWN:
-    case GST_MESSAGE_ANY:
-      result = Gst::wrap(message, false);
-      break;
-      /* The rest of the message types are custom ones */
-    default:
-      result = Glib::RefPtr<Gst::Message>( new Gst::MessageCustom(message) );
+    switch (GST_MESSAGE_TYPE(message))
+    {
+      case GST_MESSAGE_EOS:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageEos(message) );
+        break;
+      case GST_MESSAGE_ERROR:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageError(message) );
+        break;
+      case GST_MESSAGE_WARNING:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageWarning(message) );
+        break;
+      case GST_MESSAGE_INFO:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageInfo(message) );
+        break;
+      case GST_MESSAGE_TAG:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageTag(message) );
+        break;
+      case GST_MESSAGE_BUFFERING:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageBuffering(message) );
+        break;
+      case GST_MESSAGE_STATE_CHANGED:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageStateChanged(message) );
+        break;
+      case GST_MESSAGE_STATE_DIRTY:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageStateDirty(message) );
+        break;
+      case GST_MESSAGE_CLOCK_PROVIDE:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageClockProvide(message) );
+        break;
+      case GST_MESSAGE_CLOCK_LOST:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageClockLost(message) );
+        break;
+      case GST_MESSAGE_NEW_CLOCK:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageNewClock(message) );
+        break;
+      case GST_MESSAGE_APPLICATION:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageApplication(message) );
+        break;
+      case GST_MESSAGE_ELEMENT:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageElement(message) );
+        break;
+      case GST_MESSAGE_SEGMENT_START:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageSegmentStart(message) );
+        break;
+      case GST_MESSAGE_SEGMENT_DONE:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageSegmentDone(message) );
+        break;
+      case GST_MESSAGE_DURATION:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageDuration(message) );
+        break;
+      case GST_MESSAGE_LATENCY:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageLatency(message) );
+        break;
+      case GST_MESSAGE_ASYNC_START:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageAsyncStart(message) );
+        break;
+      case GST_MESSAGE_ASYNC_DONE:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageAsyncDone(message) );
+        break;
+      case GST_MESSAGE_UNKNOWN:
+      case GST_MESSAGE_ANY:
+        result = Gst::wrap(message, false);
+        break;
+        /* The rest of the message types are custom ones */
+      default:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageCustom(message) );
+    }
+  }
+  else
+  {
+    switch (GST_MESSAGE_TYPE(message))
+    {
+      case GST_MIXER_MESSAGE_MUTE_TOGGLED:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageMixerMuteToggled(message) );
+        break;
+      case GST_MIXER_MESSAGE_RECORD_TOGGLED:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageMixerRecordToggled(message) );
+        break;
+      case GST_MIXER_MESSAGE_VOLUME_CHANGED:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageMixerVolumeChanged(message) );
+        break;
+      case GST_MIXER_MESSAGE_OPTION_CHANGED:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageMixerOptionChanged(message) );
+        break;
+      case GST_MIXER_MESSAGE_OPTIONS_LIST_CHANGED:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageMixerOptionsListChanged(message) );
+        break;
+      case GST_MIXER_MESSAGE_MIXER_CHANGED:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageMixerChanged(message) );
+        break;
+      default:
+        result = Glib::RefPtr<Gst::Message>( new Gst::MessageCustom(message) );
+    }
   }
 
   if(result && take_copy)
diff --git a/gstreamer/src/mixer.ccg b/gstreamer/src/mixer.ccg
index 421d06d..4bdf341 100644
--- a/gstreamer/src/mixer.ccg
+++ b/gstreamer/src/mixer.ccg
@@ -22,6 +22,177 @@
 namespace Gst
 {
 
+MessageMixerMuteToggled::MessageMixerMuteToggled(GstMessage* castitem)
+: Message(castitem)
+{}
+
+void MessageMixerMuteToggled::parse(Glib::RefPtr<Gst::MixerTrack>& track,
+  bool& mute) const
+{
+  GstMixerTrack* gst_track = 0;
+  gboolean gst_mute = 0;
+
+  gst_mixer_message_parse_mute_toggled(const_cast<GstMessage*>(gobj()),
+    &gst_track, &gst_mute);
+  track = Glib::wrap(gst_track);
+  mute = gst_mute;
+}
+
+Glib::RefPtr<Gst::MixerTrack> MessageMixerMuteToggled::parse()
+{
+  GstMixerTrack* gst_track = 0;
+  gst_mixer_message_parse_mute_toggled(gobj(), &gst_track, 0);
+  return Glib::wrap(gst_track);
+}
+
+Glib::RefPtr<const Gst::MixerTrack> MessageMixerMuteToggled::parse() const
+{
+  return parse();
+}
+
+bool MessageMixerMuteToggled::parse_mute() const
+{
+  gboolean gst_mute = 0;
+  gst_mixer_message_parse_mute_toggled(const_cast<GstMessage*>(gobj()),
+    0, &gst_mute);
+  return gst_mute;
+}
+
+MessageMixerRecordToggled::MessageMixerRecordToggled(GstMessage* castitem)
+: Message(castitem)
+{}
+
+void MessageMixerRecordToggled::parse(Glib::RefPtr<Gst::MixerTrack>& track,
+  bool& record) const
+{
+  GstMixerTrack* gst_track = 0;
+  gboolean gst_record = 0;
+
+  gst_mixer_message_parse_record_toggled(const_cast<GstMessage*>(gobj()),
+    &gst_track, &gst_record);
+  track = Glib::wrap(gst_track);
+  record = gst_record;
+}
+
+Glib::RefPtr<Gst::MixerTrack> MessageMixerRecordToggled::parse()
+{
+  GstMixerTrack* gst_track = 0;
+  gst_mixer_message_parse_record_toggled(gobj(), &gst_track, 0);
+  return Glib::wrap(gst_track);
+}
+
+Glib::RefPtr<const Gst::MixerTrack> MessageMixerRecordToggled::parse() const
+{
+  return parse();
+}
+
+bool MessageMixerRecordToggled::parse_record() const
+{
+  gboolean gst_record = 0;
+  gst_mixer_message_parse_record_toggled(const_cast<GstMessage*>(gobj()),
+    0, &gst_record);
+  return gst_record;
+}
+
+MessageMixerVolumeChanged::MessageMixerVolumeChanged(GstMessage* castitem)
+: Message(castitem)
+{}
+
+//TODO: Include when = operator is available for Glib::ArrayHandle<>.
+/*
+void MessageMixerVolumeChanged::parse(Glib::RefPtr<Gst::MixerTrack>& track,
+  Glib::ArrayHandle<int>& volumes) const
+{
+  GstMixerTrack* gst_track = 0;
+  gint* gst_volumes = 0;
+  gint gst_num_channels = 0;
+
+  gst_mixer_message_parse_volume_changed(const_cast<GstMessage*>(gobj()),
+    &gst_track, &gst_volumes, &gst_num_channels);
+  track = Glib::wrap(gst_track);
+  //TODO: = is private for Glib::ArrayHandle:
+  //track = Glib::ArrayHandle<int>(gst_volumes, gst_num_channels, Glib::OWNERSHIP_DEEP);
+}
+*/
+
+Glib::RefPtr<Gst::MixerTrack> MessageMixerVolumeChanged::parse()
+{
+  GstMixerTrack* gst_track = 0;
+  gst_mixer_message_parse_volume_changed(gobj(), &gst_track, 0, 0);
+  return Glib::wrap(gst_track);
+}
+
+Glib::RefPtr<const Gst::MixerTrack> MessageMixerVolumeChanged::parse() const
+{
+  return parse();
+}
+
+Glib::ArrayHandle<int> MessageMixerVolumeChanged::parse_volumes() const
+{
+  gint* gst_volumes = 0;
+  gint gst_num_channels = 0;
+  gst_mixer_message_parse_volume_changed(const_cast<GstMessage*>(gobj()),
+    0, &gst_volumes, &gst_num_channels);
+  return Glib::ArrayHandle<int>(gst_volumes, gst_num_channels, Glib::OWNERSHIP_DEEP);
+}
+
+MessageMixerOptionChanged::MessageMixerOptionChanged(GstMessage* castitem)
+: Message(castitem)
+{}
+
+void MessageMixerOptionChanged::parse(Glib::RefPtr<Gst::MixerOptions>& options,
+  Glib::ustring& value) const
+{
+  GstMixerOptions* gst_options = 0;
+  const gchar* gst_value = 0;
+
+  gst_mixer_message_parse_option_changed(const_cast<GstMessage*>(gobj()),
+    &gst_options, &gst_value);
+  options = Glib::wrap(gst_options);
+  value = gst_value;
+}
+
+Glib::RefPtr<Gst::MixerOptions> MessageMixerOptionChanged::parse()
+{
+  GstMixerOptions* gst_options = 0;
+  gst_mixer_message_parse_option_changed(gobj(), &gst_options, 0);
+  return Glib::wrap(gst_options);
+}
+
+Glib::RefPtr<const Gst::MixerOptions> MessageMixerOptionChanged::parse() const
+{
+  return parse();
+}
+
+Glib::ustring MessageMixerOptionChanged::parse_value() const
+{
+  const gchar* gst_value = 0;
+  gst_mixer_message_parse_option_changed(const_cast<GstMessage*>(gobj()),
+    0, &gst_value);
+  return gst_value;
+}
+
+MessageMixerOptionsListChanged::MessageMixerOptionsListChanged(GstMessage* castitem)
+: Message(castitem)
+{}
+
+Glib::RefPtr<Gst::MixerOptions> MessageMixerOptionsListChanged::parse()
+{
+  GstMixerOptions* gst_options = 0;
+  gst_mixer_message_parse_options_list_changed(gobj(), &gst_options);
+  return Glib::wrap(gst_options);
+}
+
+Glib::RefPtr<const Gst::MixerOptions> MessageMixerOptionsListChanged::parse()
+  const
+{
+  return parse();
+}
+
+MessageMixerChanged::MessageMixerChanged(GstMessage* castitem)
+: Message(castitem)
+{}
+
 Glib::ArrayHandle<int> Mixer::get_volume(const Glib::RefPtr<const Gst::MixerTrack>& track) const
 {
   const guint32 num_channels = track->get_num_channels();
diff --git a/gstreamer/src/mixer.hg b/gstreamer/src/mixer.hg
index 490b7bd..79f6484 100644
--- a/gstreamer/src/mixer.hg
+++ b/gstreamer/src/mixer.hg
@@ -20,6 +20,7 @@
 #include <gst/interfaces/mixer.h>
 #include <gst/interfaces/mixeroptions.h>
 #include <gstreamermm/mixertrack.h>
+#include <gstreamermm/message.h>
 #include <glibmm/interface.h>
 
 _DEFS(gstreamermm,gst)
@@ -71,15 +72,7 @@ public:
   _WRAP_METHOD(Glib::ustring get_option(const Glib::RefPtr<const Gst::MixerOptions>& opts) const, gst_mixer_get_option)
   _WRAP_METHOD(void mixer_changed(), gst_mixer_mixer_changed)
   _WRAP_METHOD(Gst::MixerFlags get_mixer_flags() const, gst_mixer_get_mixer_flags)
-
-  /* TODO:
-  _WRAP_METHOD(satic Gst::MixerMessageType message_get_type(GstMessage *message), gst_mixer_message_get_type)
-  _WRAP_METHOD(static void message_parse_mute_toggled(GstMessage *message, GstMixerTrack **track, gboolean *mute), gst_mixer_message_parse_mute_toggled)
-  _WRAP_METHOD(static void message_parse_option_changed(GstMessage *message, GstMixerOptions **options, const gchar **value), gst_mixer_message_parse_option_changed)
-  _WRAP_METHOD(static void message_parse_record_toggled(GstMessage *message, GstMixerTrack **track, gboolean *record), gst_mixer_message_parse_record_toggled)
-  _WRAP_METHOD(static void message_parse_volume_changed(GstMessage *message, GstMixerTrack **track, gint **volumes, gint *num_channels), gst_mixer_message_parse_volume_changed)
-  _WRAP_METHOD(static void message_parse_options_list_changed(GstMessage *message, GstMixerOptions **options), gst_mixer_message_parse_options_list_changed)
-  */
+  _WRAP_METHOD(static Gst::MixerMessageType get_message_type(const Glib::RefPtr<Gst::Message>& message), gst_mixer_message_get_type)
 
   //TODO: Wrap signals if necessary.
 
@@ -117,4 +110,231 @@ protected:
 #m4end
 };
 
+/** A mute-toggled Gst::Mixer message.
+ */
+class MessageMixerMuteToggled : public Message
+{
+public:
+  explicit MessageMixerMuteToggled(GstMessage* castitem);
+
+  /** Extracts the contents of a mute-toggled bus message. Reads the
+   * Gst::MixerTrack that has changed, and the new value of the mute flag.
+   * 
+   * The Gst::MixerTrack remains valid until the message is freed.
+   *
+   * @param track Reference to hold a Gst::MixerTrack object.
+   * @param mute A reference to hold the bool new value.
+   *
+   * Since 0.10.14.
+   */
+  void parse(Glib::RefPtr<Gst::MixerTrack>& track, bool& mute) const;
+  _IGNORE(gst_mixer_message_parse_mute_toggled)
+
+  /** Extracts the contents of a mute-toggled bus message. Reads the
+   * Gst::MixerTrack that has changed, and the new value of the mute flag.
+   * 
+   * The Gst::MixerTrack remains valid until the message is freed.
+   *
+   * @return the Gst::MixerTrack object.
+   */
+  Glib::RefPtr<Gst::MixerTrack> parse();
+
+  /** Extracts the contents of a mute-toggled bus message. Reads the
+   * Gst::MixerTrack that has changed, and the new value of the mute flag.
+   * 
+   * The Gst::MixerTrack remains valid until the message is freed.
+   *
+   * @return the Gst::MixerTrack object.
+   */
+  Glib::RefPtr<const Gst::MixerTrack> parse() const;
+
+  /** Extracts the contents of a mute-toggled bus message. Reads the new value
+   * of the mute flag.
+   * 
+   * @return The bool new value.
+   */
+
+  bool parse_mute() const;
+};
+
+/** A record-toggled Gst::Mixer message.
+ */
+class MessageMixerRecordToggled : public Message
+{
+public:
+  explicit MessageMixerRecordToggled(GstMessage* castitem);
+
+  /** Extracts the contents of a record-toggled bus message. Reads the
+   * Gst::MixerTrack that has changed, and the new value of the recording flag.
+   *
+   * The Gst::MixerTrack remains valid until the message is freed.
+   *
+   * @param track A reference to hold the Gst::MixerTrack object.
+   * @param record A reference to hold the bool value.
+   *
+   * Since 0.10.14.
+   */
+  void parse(Glib::RefPtr<Gst::MixerTrack>& track, bool& record) const;
+  _IGNORE(gst_mixer_message_parse_record_toggled)
+
+  /** Extracts the contents of a record-toggled bus message. Reads the
+   * Gst::MixerTrack that has changed.
+   *
+   * The Gst::MixerTrack remains valid until the message is freed.
+   *
+   * @return A reference to the Gst::MixerTrack object.
+   */
+  Glib::RefPtr<Gst::MixerTrack> parse();
+
+  /** Extracts the contents of a record-toggled bus message. Reads the
+   * Gst::MixerTrack that has changed.
+   *
+   * The Gst::MixerTrack remains valid until the message is freed.
+   *
+   * @return A reference to the Gst::MixerTrack object.
+   */
+  Glib::RefPtr<const Gst::MixerTrack> parse() const;
+
+  /** Extracts the contents of a record-toggled bus message. Reads the new
+   * value of the recording flag.
+   *
+   * @return The bool value.
+   */
+  bool parse_record() const;
+};
+
+/** A volume-changed Gst::Mixer message.
+ */
+class MessageMixerVolumeChanged : public Message
+{
+public:
+  explicit MessageMixerVolumeChanged(GstMessage* castitem);
+
+  //TODO: Include when = operator is available for Glib::ArrayHandle<>.
+  ///** Parses a volume-changed notification message and extracts the track
+   //* object it refers to, as well as an array of volumes and the size of the
+   //* volumes array.
+   //*
+   //* The track object remains valid until the message is freed.
+   //*
+   //* @param track A reference to hold a Gst::MixerTrack object.
+   //* @param volumes A reference to receive an array of int values.
+   //*
+   //* Since 0.10.14.
+   //*/
+  //void parse(Glib::RefPtr<Gst::MixerTrack>& track,
+    //Glib::ArrayHandle<int> volumes);
+  _IGNORE(gst_mixer_message_parse_volume_changed)
+
+  /** Parses a volume-changed notification message and extracts the track
+   * object it refers to.
+   *
+   * The track object remains valid until the message is freed.
+   *
+   * @return a Gst::MixerTrack object.
+   */
+  Glib::RefPtr<Gst::MixerTrack> parse();
+
+  /** Parses a volume-changed notification message and extracts the track
+   * object it refers to.
+   *
+   * The track object remains valid until the message is freed.
+   *
+   * @return a Gst::MixerTrack object.
+   */
+  Glib::RefPtr<const Gst::MixerTrack> parse() const;
+
+  /** Parses a volume-changed notification message and extracts the array of
+   * volumes.
+   *
+   * @return The array of volume int values.
+   */
+  Glib::ArrayHandle<int> parse_volumes() const;
+};
+
+/** An option-changed Gst::Mixer message.
+ */
+class MessageMixerOptionChanged : public Message
+{
+public:
+  explicit MessageMixerOptionChanged(GstMessage* castitem);
+
+  /** Extracts the Gst::MixerOptions and new value from a option-changed bus
+   * notification message.
+   *
+   * The Gst::MixerOptions remain valid until the message is freed.
+   *
+   * @param options A reference to hold the Gst::MixerOptions object.
+   * @param value Location to store the new options value.
+   *
+   * Since 0.10.14.
+   */
+  void parse(Glib::RefPtr<Gst::MixerOptions>& options,
+    Glib::ustring& value) const;
+  _IGNORE(gst_mixer_message_parse_option_changed)
+
+  /** Extracts the Gst::MixerOptions from a option-changed bus notification
+   * message.
+   *
+   * The Gst::MixerOptions remain valid until the message is freed.
+   *
+   * @return The Gst::MixerOptions object.
+   */
+  Glib::RefPtr<Gst::MixerOptions> parse();
+
+  /** Extracts the Gst::MixerOptions from a option-changed bus notification
+   * message.
+   *
+   * The Gst::MixerOptions remain valid until the message is freed.
+   *
+   * @return The Gst::MixerOptions object.
+   */
+  Glib::RefPtr<const Gst::MixerOptions> parse() const;
+
+  /** Extracts the new value of the option from a option-changed bus
+   * notification message.
+   *
+   * @return The new options value.
+   */
+  Glib::ustring parse_value() const;
+};
+
+/** An option-list-changed Gst::Mixer message, osted when the list of available
+ * options for a GstMixerOptions object has changed (Since: 0.10.18).
+ */
+class MessageMixerOptionsListChanged : public Message
+{
+public:
+  explicit MessageMixerOptionsListChanged(GstMessage* castitem);
+
+  /** Extracts the Gst::MixerOptions whose value list has changed from an
+   * options-list-changed bus notification message.
+   *
+   * The options object returned remains valid until the message is freed.
+   *
+   * Since 0.10.18.
+   */
+  Glib::RefPtr<Gst::MixerOptions> parse();
+  _IGNORE(gst_mixer_message_parse_options_list_changed)
+
+  /** Extracts the Gst::MixerOptions whose value list has changed from an
+   * options-list-changed bus notification message.
+   *
+   * The options object returned remains valid until the message is freed.
+   *
+   * Since 0.10.18.
+   */
+  Glib::RefPtr<const Gst::MixerOptions> parse() const;
+};
+
+/** A mixer-changed Gst::Mixer message, posted when the list of available mixer
+ * tracks has changed. The application should re-build its interface in this
+ * case (Since: 0.10.18).
+ */
+class MessageMixerChanged : public Message
+{
+public:
+  explicit MessageMixerChanged(GstMessage* castitem);
+};
+
 } // namespace Gst
diff --git a/tools/m4/convert_gst.m4 b/tools/m4/convert_gst.m4
index 857cba9..57bc471 100644
--- a/tools/m4/convert_gst.m4
+++ b/tools/m4/convert_gst.m4
@@ -191,6 +191,7 @@ _CONVERSION(`GstClockTimeDiff',`ClockTimeDiff',`ClockTimeDiff($3)')
 _CONVERSION(`ClockTimeDiff&',`GstClockTimeDiff*',`(GstClockTimeDiff*)(&$3)')
 _CONVERSION(`Format&',`GstFormat*',`($2)&$3')
 _CONVERSION(`GstClockTimeDiff*',`ClockTimeDiff&',`(ClockTimeDiff&)(*$3)')
+_CONVERSION(`GstMixerMessageType',`Gst::MixerMessageType',`(Gst::MixerMessageType)($3)')
 _CONVERSION(`const GstQueryType*',`const QueryType*',`(QueryType*)($3)')
 _CONVERSION(`GstState*',`State&',`*reinterpret_cast<Gst::State*>($3)')
 _CONVERSION(`GstTagFlag',`TagFlag',`(TagFlag)($3)')



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]