[gstreamermm: 47/167] fixed problems with Message - previous commit didn't solve it



commit 7925d221c2da96dce0f1818d935ca6622ef582da
Author: Marcin Kolny at Flytronic <marcin kolny flytronic pl>
Date:   Fri Jul 26 12:58:04 2013 +0200

    fixed problems with Message - previous commit didn't solve it

 gstreamer/src/message.ccg |  201 ++++++++-------------------------------------
 gstreamer/src/message.hg  |   85 ++++---------------
 2 files changed, 53 insertions(+), 233 deletions(-)
---
diff --git a/gstreamer/src/message.ccg b/gstreamer/src/message.ccg
index d98a711..51a2b38 100644
--- a/gstreamer/src/message.ccg
+++ b/gstreamer/src/message.ccg
@@ -49,28 +49,20 @@ Glib::RefPtr<Gst::Message> Message::create_writable()
   return Glib::wrap(gst_message_make_writable(gobj()));
 }
 
-MessageEos::MessageEos(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageEos>
   MessageEos::create(const Glib::RefPtr<Gst::Object>& src)
 {
   GstMessage* message = gst_message_new_eos(Glib::unwrap(src));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageEos>(message, false);
 }
 
-MessageError::MessageError(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageError>
   MessageError::create(const Glib::RefPtr<Gst::Object>& src,
   Glib::Error& error, const std::string& debug)
 {
   GstMessage* message = gst_message_new_error(Glib::unwrap(src), error.gobj(),
     reinterpret_cast<const gchar*>(debug.c_str()));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageError>(message, false);
 }
 
 void MessageError::parse(Glib::Error& error, std::string& debug) const
@@ -112,17 +104,13 @@ std::string MessageError::parse_debug() const
   return result;
 }
 
-MessageWarning::MessageWarning(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageWarning>
   MessageWarning::create(const Glib::RefPtr<Gst::Object>& src,
   Glib::Error& error, const std::string& debug)
 {
   GstMessage* message = gst_message_new_warning(Glib::unwrap(src),
     error.gobj(), reinterpret_cast<const gchar*>(debug.c_str()));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageWarning>(message, false);
 }
 
 void MessageWarning::parse(Glib::Error& error, std::string& debug) const
@@ -165,17 +153,13 @@ std::string MessageWarning::parse_debug() const
   return result;
 }
 
-MessageInfo::MessageInfo(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageInfo>
   MessageInfo::create(const Glib::RefPtr<Gst::Object>& src,
   Glib::Error& error, const std::string& debug)
 {
   GstMessage* message = gst_message_new_info(Glib::unwrap(src), error.gobj(),
     reinterpret_cast<const gchar*>(debug.c_str()));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageInfo>(message, false);
 }
 
 
@@ -218,41 +202,21 @@ std::string MessageInfo::parse_debug() const
   return result;
 }
 
-MessageTag::MessageTag(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageTag>
-  MessageTag::create(const Glib::RefPtr<Gst::Object>& src,
-  const Gst::TagList& taglist)
+  MessageTag::create(const Glib::RefPtr<Gst::Object>& src, const Gst::TagList& taglist)
 {
   //We create a copy because gst_message_new_tag() takes ownership:
   GstTagList* c_taglist = gst_tag_list_copy(taglist.gobj());
   GstMessage* message = gst_message_new_tag(Glib::unwrap(src), c_taglist);
-  return Glib::wrap(message, false);
-}
-
-Glib::RefPtr<Gst::MessageTag>
-  MessageTag::create(const Glib::RefPtr<Gst::Object>& src,
-  const Glib::RefPtr<Gst::Pad>& pad, const Gst::TagList& taglist)
-{
-  //We create a copy because gst_message_new_tag() takes ownership:
-  GstTagList* c_taglist = gst_tag_list_copy(taglist.gobj());
-  GstMessage* message = gst_message_new_tag_full(Glib::unwrap(src),
-    Glib::unwrap(pad), c_taglist);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageTag>(message, false);
 }
 
-void MessageTag::parse(Glib::RefPtr<Gst::Pad>& pad, Gst::TagList& tag_list)
+void MessageTag::parse(Gst::TagList& tag_list)
   const
 {
   GstTagList* gst_tag_list = 0;
-  GstPad* gst_pad = 0;
-
-  gst_message_parse_tag_full(const_cast<GstMessage*>(gobj()), &gst_pad,
-    &gst_tag_list);
 
-  pad = Glib::wrap(gst_pad);
+  gst_message_parse_tag(const_cast<GstMessage*>(gobj()), &gst_tag_list);
 
   // Use the Gst::TagList specific Glib::wrap() function:
   tag_list = Glib::wrap_taglist(gst_tag_list);
@@ -265,22 +229,11 @@ Gst::TagList MessageTag::parse() const
   return Gst::TagList(gst_tag_list);
 }
 
-Glib::RefPtr<Gst::Pad> MessageTag::parse_pad() const
-{
-  GstPad* gst_pad = 0;
-  gst_message_parse_tag_full(const_cast<GstMessage*>(gobj()), &gst_pad, 0);
-  return Glib::wrap(gst_pad);
-}
-
-MessageBuffering::MessageBuffering(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageBuffering>
   MessageBuffering::create(const Glib::RefPtr<Gst::Object>& src, int percent)
 {
   GstMessage* message = gst_message_new_buffering(Glib::unwrap(src), percent);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageBuffering>(message, false);
 }
 
 int MessageBuffering::parse() const
@@ -341,10 +294,6 @@ gint64 MessageBuffering::parse_stats_buffering_left() const
   return buffering_left;
 }
 
-MessageStateChanged::MessageStateChanged(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageStateChanged>
   MessageStateChanged::create(const Glib::RefPtr<Gst::Object>& src,
   State oldstate, State newstate, State pending)
@@ -352,7 +301,7 @@ Glib::RefPtr<Gst::MessageStateChanged>
   GstMessage* message = gst_message_new_state_changed(Glib::unwrap(src),
     static_cast<GstState>(oldstate), static_cast<GstState>(newstate),
     static_cast<GstState>(pending));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageStateChanged>(message, false);
 }
 
 void MessageStateChanged::parse(State& oldstate, State& newstate,
@@ -390,21 +339,13 @@ State MessageStateChanged::parse_pending() const
   return State(pending_state);
 }
 
-MessageStateDirty::MessageStateDirty(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageStateDirty>
   MessageStateDirty::create(const Glib::RefPtr<Gst::Object>& src)
 {
   GstMessage* message = gst_message_new_state_dirty(Glib::unwrap(src));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageStateDirty>(message, false);
 }
 
-MessageStepDone::MessageStepDone(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageStepDone>
   MessageStepDone::create(const Glib::RefPtr<Gst::Object>& src,
   Gst::Format format, guint64 amount, double rate, bool flush,
@@ -413,7 +354,7 @@ Glib::RefPtr<Gst::MessageStepDone>
   GstMessage* message = gst_message_new_step_done(Glib::unwrap(src),
     static_cast<GstFormat>(format), amount, rate, flush, intermediate,
     duration, eos);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageStepDone>(message, false);
 }
 
 void MessageStepDone::parse(Gst::Format& format, guint64& amount, double& rate,
@@ -488,18 +429,13 @@ bool MessageStepDone::parse_eos() const
   return gst_eos;
 }
 
-
-MessageClockProvide::MessageClockProvide(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageClockProvide>
   MessageClockProvide::create(const Glib::RefPtr<Gst::Object>& src,
   const Glib::RefPtr<Gst::Clock>& clock, bool ready)
 {
   GstMessage* message = gst_message_new_clock_provide(Glib::unwrap(src),
     Glib::unwrap(clock), ready);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageClockProvide>(message, false);
 }
 
 void MessageClockProvide::parse(Glib::RefPtr<Gst::Clock>& clock, bool& ready) const
@@ -532,17 +468,13 @@ bool MessageClockProvide::parse_ready() const
   return ready;
 }
 
-MessageClockLost::MessageClockLost(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageClockLost>
   MessageClockLost::create(const Glib::RefPtr<Gst::Object>& src,
   const Glib::RefPtr<Gst::Clock>& clock)
 {
   GstMessage* message = gst_message_new_clock_lost(Glib::unwrap(src),
     Glib::unwrap(clock));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageClockLost>(message, false);
 }
 
 Glib::RefPtr<Gst::Clock> MessageClockLost::parse()
@@ -557,17 +489,13 @@ Glib::RefPtr<const Gst::Clock> MessageClockLost::parse() const
   return parse();
 }
 
-MessageNewClock::MessageNewClock(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageNewClock>
   MessageNewClock::create(const Glib::RefPtr<Gst::Object>& src,
   const Glib::RefPtr<Gst::Clock>& clock)
 {
   GstMessage* message = gst_message_new_new_clock(Glib::unwrap(src),
     Glib::unwrap(clock));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageNewClock>(message, false);
 }
 
 Glib::RefPtr<Gst::Clock> MessageNewClock::parse()
@@ -582,10 +510,6 @@ Glib::RefPtr<const Gst::Clock> MessageNewClock::parse() const
   return parse();
 }
 
-MessageApplication::MessageApplication(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageApplication>
   MessageApplication::create(const Glib::RefPtr<Gst::Object>& src,
   Gst::Structure& structure)
@@ -593,20 +517,16 @@ Glib::RefPtr<Gst::MessageApplication>
   GstStructure* copy_struct = gst_structure_copy(structure.gobj());
   GstMessage* message = gst_message_new_application(Glib::unwrap(src),
     copy_struct);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageApplication>(message, false);
 }
 
 Glib::RefPtr<Gst::MessageApplication>
   MessageApplication::create(const Glib::RefPtr<Gst::Object>& src)
 {
   GstMessage* message = gst_message_new_application(Glib::unwrap(src), 0);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageApplication>(message, false);
 }
 
-MessageElement::MessageElement(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageElement>
   MessageElement::create(const Glib::RefPtr<Gst::Object>& src,
   Gst::Structure& structure)
@@ -614,20 +534,16 @@ Glib::RefPtr<Gst::MessageElement>
   GstStructure* copy_struct = gst_structure_copy(structure.gobj());
   GstMessage* message = gst_message_new_element(Glib::unwrap(src),
     copy_struct);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageElement>(message, false);
 }
 
 Glib::RefPtr<Gst::MessageElement>
   MessageElement::create(const Glib::RefPtr<Gst::Object>& src)
 {
   GstMessage* message = gst_message_new_element(Glib::unwrap(src), 0);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageElement>(message, false);
 }
 
-MessageCustom::MessageCustom(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageCustom>
   MessageCustom::create(MessageType type, const Glib::RefPtr<Gst::Object>& src,
   Gst::Structure& structure)
@@ -635,7 +551,7 @@ Glib::RefPtr<Gst::MessageCustom>
   GstStructure* copy_struct = gst_structure_copy(structure.gobj());
   GstMessage* message = gst_message_new_custom(GstMessageType(type),
     Glib::unwrap(src), copy_struct);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageCustom>(message, false);
 }
 
 Glib::RefPtr<Gst::MessageCustom>
@@ -643,20 +559,16 @@ Glib::RefPtr<Gst::MessageCustom>
 {
   GstMessage* message = gst_message_new_custom(GstMessageType(type),
     Glib::unwrap(src), 0);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageCustom>(message, false);
 }
 
-MessageSegmentStart::MessageSegmentStart(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageSegmentStart>
   MessageSegmentStart::create(const Glib::RefPtr<Gst::Object>& src,
   Format format, gint64 position)
 {
   GstMessage* message = gst_message_new_segment_start(Glib::unwrap(src),
     static_cast<GstFormat>(format), position);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageSegmentStart>(message, false);
 }
 
 void MessageSegmentStart::parse(Format& format, gint64& position) const
@@ -681,17 +593,13 @@ Format MessageSegmentStart::parse_format() const
   return format;
 }
 
-MessageSegmentDone::MessageSegmentDone(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageSegmentDone>
   MessageSegmentDone::create(const Glib::RefPtr<Gst::Object>& src,
   Format format, gint64 position)
 {
   GstMessage* message = gst_message_new_segment_done(Glib::unwrap(src),
     static_cast<GstFormat>(format), position);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageSegmentDone>(message, false);
 }
 
 void MessageSegmentDone::parse(Format& format, gint64& position) const
@@ -716,17 +624,13 @@ Format MessageSegmentDone::parse_format() const
   return format;
 }
 
-MessageDuration::MessageDuration(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageDuration>
   MessageDuration::create(const Glib::RefPtr<Gst::Object>& src, Format format,
   gint64 duration)
 {
   GstMessage* message = gst_message_new_duration(Glib::unwrap(src),
     static_cast<GstFormat>(format), duration);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageDuration>(message, false);
 }
 
 void MessageDuration::parse(Format& format, gint64& duration) const
@@ -750,53 +654,28 @@ Format MessageDuration::parse_format() const
   return format;
 }
 
-MessageLatency::MessageLatency(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageLatency>
   MessageLatency::create(const Glib::RefPtr<Gst::Object>& src)
 {
   GstMessage* message = gst_message_new_latency(Glib::unwrap(src));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageLatency>(message, false);
 }
 
-MessageAsyncStart::MessageAsyncStart(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageAsyncStart>
   MessageAsyncStart::create(const Glib::RefPtr<Gst::Object>& src,
   bool new_base_time)
 {
-  GstMessage* message = gst_message_new_async_start(Glib::unwrap(src),
-    new_base_time);
-  return Glib::wrap(message, false);
-}
-
-bool MessageAsyncStart::parse() const
-{
-  gboolean new_base_time = FALSE;
-  gst_message_parse_async_start(const_cast<GstMessage*>(gobj()),
-    &new_base_time);
-  return new_base_time;
+  GstMessage* message = gst_message_new_async_start(Glib::unwrap(src));
+  return Glib::wrap_msg_derived<Gst::MessageAsyncStart>(message, false);
 }
 
-MessageAsyncDone::MessageAsyncDone(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageAsyncDone>
-  MessageAsyncDone::create(const Glib::RefPtr<Gst::Object>& src)
+  MessageAsyncDone::create(const Glib::RefPtr<Gst::Object>& src, ClockTime running_time)
 {
-  GstMessage* message = gst_message_new_async_done(Glib::unwrap(src));
-  return Glib::wrap(message, false);
+  GstMessage* message = gst_message_new_async_done(Glib::unwrap(src), running_time);
+  return Glib::wrap_msg_derived<Gst::MessageAsyncDone>(message, false);
 }
 
-MessageStepStart::MessageStepStart(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageStepStart>
   MessageStepStart::create(const Glib::RefPtr<Gst::Object>& src,
   bool active, Gst::Format format, guint64 amount, double rate, bool flush,
@@ -804,7 +683,7 @@ Glib::RefPtr<Gst::MessageStepStart>
 {
   GstMessage* message = gst_message_new_step_start(Glib::unwrap(src),
     active, static_cast<GstFormat>(format), amount, rate, flush, intermediate);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageStepStart>(message, false);
 }
 
 void MessageStepStart::parse(bool& active, Gst::Format& format,
@@ -871,10 +750,6 @@ bool MessageStepStart::parse_intermediate() const
   return gst_intermediate;
 }
 
-MessageStructureChange::MessageStructureChange(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageStructureChange>
   MessageStructureChange::create(const Glib::RefPtr<Gst::Object>& src,
   Gst::StructureChangeType type, const Glib::RefPtr<Gst::Element>& owner,
@@ -882,7 +757,7 @@ Glib::RefPtr<Gst::MessageStructureChange>
 {
   GstMessage* message = gst_message_new_structure_change(Glib::unwrap(src),
     static_cast<GstStructureChangeType>(type), Glib::unwrap(owner), busy);
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageStructureChange>(message, false);
 }
 
 void MessageStructureChange::parse(Gst::StructureChangeType& type,
@@ -920,17 +795,13 @@ bool MessageStructureChange::parse_busy() const
   return gst_busy;
 }
 
-MessageRequestState::MessageRequestState(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageRequestState>
   MessageRequestState::create(const Glib::RefPtr<Gst::Object>& src,
   Gst::State state)
 {
   GstMessage* message = gst_message_new_request_state(Glib::unwrap(src),
     static_cast<GstState>(state));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageRequestState>(message, false);
 }
 
 Gst::State MessageRequestState::parse() const
@@ -941,17 +812,13 @@ Gst::State MessageRequestState::parse() const
   return static_cast<Gst::State>(gst_state);
 }
 
-MessageStreamStatus::MessageStreamStatus(GstMessage* castitem)
-: Message(castitem)
-{}
-
 Glib::RefPtr<Gst::MessageStreamStatus>
   MessageStreamStatus::create(const Glib::RefPtr<Gst::Object>& src,
   Gst::StreamStatusType type, const Glib::RefPtr<Gst::Element>& owner)
 {
   GstMessage* message = gst_message_new_stream_status(Glib::unwrap(src),
     static_cast<GstStreamStatusType>(type), Glib::unwrap(owner));
-  return Glib::wrap(message, false);
+  return Glib::wrap_msg_derived<Gst::MessageStreamStatus>(message, false);
 }
 
 void MessageStreamStatus::set_object(const Glib::RefPtr<Gst::Object>& object)
diff --git a/gstreamer/src/message.hg b/gstreamer/src/message.hg
index 6b7cc39..5157737 100644
--- a/gstreamer/src/message.hg
+++ b/gstreamer/src/message.hg
@@ -25,6 +25,20 @@
 
 _DEFS(gstreamermm,gst)
 
+namespace Glib
+{
+    template<typename T>
+    Glib::RefPtr<T> wrap_msg_derived(GstMessage* object, bool take_copy)
+    {
+      if(take_copy && object)
+        gst_message_ref(object);
+
+      // See the comment at the top of this file, if you want to know why the cast works.
+      return Glib::RefPtr<T>(reinterpret_cast<T*>(object));
+    }
+
+}
+
 namespace Gst
 {
 
@@ -72,7 +86,7 @@ class TagList;
  */
 class Message : public Gst::MiniObject
 {
-    _CLASS_OPAQUE_COPYABLE(Message, GstMessage, NONE, gst_message_ref, gst_message_unref)
+    _CLASS_OPAQUE_REFCOUNTED(Message, GstMessage, NONE, gst_message_ref, gst_message_unref)
   _IGNORE(gst_message_ref, gst_message_unref)
 
 public:
@@ -105,8 +119,8 @@ public:
 protected:
   // This method is used in the create() methods to convert a wrapped
   // GstMessage to one of the more specific Gst::Message types.
-  template <class MessageType>
-    static inline Glib::RefPtr<MessageType> wrap(GstMessage* message,
+  template <class MsgType>
+    static inline Glib::RefPtr<MsgType> wrap(GstMessage* message,
     bool take_copy = false);
 };
 
@@ -122,8 +136,6 @@ protected:
 class MessageEos : public Message
 {
 public:
-  explicit MessageEos(GstMessage* castitem);
-
   /** Create a new eos message. This message is generated and posted in the
    * sink elements of a Gst::Bin. The bin will only forward the EOS message to
    * the application if all sinks have posted an EOS message.
@@ -141,7 +153,6 @@ public:
 class MessageError : public Message
 {
 public:
-  explicit MessageError(GstMessage* castitem);
 
   /** Create a new error message. The message will copy error and debug. This
    * message is posted by elements when a fatal event occured. The pipeline
@@ -190,7 +201,6 @@ public:
 class MessageWarning : public Message
 {
 public:
-  explicit MessageWarning(GstMessage* castitem);
 
   /** Create a new warning message. The message will make copies of error and
    * debug.
@@ -237,7 +247,6 @@ public:
 class MessageInfo : public Message
 {
 public:
-  explicit MessageInfo(GstMessage* castitem);
 
   /** Create a new info message.
    *
@@ -285,7 +294,6 @@ public:
 class MessageTag : public Message
 {
 public:
-  explicit MessageTag(GstMessage* castitem);
 
   /** Create a new tag message. The taglist will be copied.  The message is
    * posted by elements that discovered a new taglist.
@@ -297,20 +305,6 @@ public:
   static Glib::RefPtr<Gst::MessageTag>
     create(const Glib::RefPtr<Gst::Object>& src, const Gst::TagList& taglist);
 
-  /** Create a new tag message. The taglist will be copied.  The message is
-   * posted by elements that discovered a new taglist.
-   *
-   * @param src The object originating the message.
-   * @param pad The originating pad for the tag.
-   * @param tag_list The tag list for the message.
-   * @return The new tag message. MT safe.
-   * 
-   * Since 0.10.24.
-   */
-  static Glib::RefPtr<Gst::MessageTag>
-    create(const Glib::RefPtr<Gst::Object>& src,
-    const Glib::RefPtr<Gst::Pad>& pad, const Gst::TagList& taglist);
-
   /** Extracts the Gst::Pad and Gst::TagList from the Gst::MessageTag.
    *
    * MT safe.
@@ -320,7 +314,7 @@ public:
    *
    * Since 0.10.24.
    */
-  void parse(Glib::RefPtr<Gst::Pad>& pad, Gst::TagList& tag_list) const;
+  void parse(Gst::TagList& tag_list) const;
 
   /** Extracts and returns the Gst::TagList from the Gst::MessageTag.
    *
@@ -331,16 +325,6 @@ public:
   Gst::TagList parse() const;
   _IGNORE(gst_message_parse_tag)
 
-  /** Extracts and returns the Gst::Pad from the Gst::MessageTag.
-   *
-   * MT safe.
-   *
-   * @return The Gst::Pad.
-   *
-   * Since 0.10.24.
-   */
-  Glib::RefPtr<Gst::Pad> parse_pad() const;
-  _IGNORE(gst_message_parse_tag_full)
 };
 
 /** A buffering message.
@@ -349,7 +333,6 @@ public:
 class MessageBuffering : public Message
 {
 public:
-  explicit MessageBuffering(GstMessage* castitem);
 
   /** Create a new buffering message. This message can be posted by an element
    * that needs to buffer data before it can continue processing. @a percent
@@ -435,7 +418,6 @@ public:
 class MessageStateChanged : public Message
 {
 public:
-  explicit MessageStateChanged(GstMessage* castitem);
 
   /** Create a state change message. This message is posted whenever an element
    * changed its state.
@@ -493,7 +475,6 @@ public:
 class MessageStateDirty : public Message
 {
 public:
-  explicit MessageStateDirty(GstMessage* castitem);
 
   /** Create a state dirty message. This message is posted whenever an element
    * changed its state asynchronously and is used internally to update the
@@ -512,7 +493,6 @@ public:
 class MessageStepDone : public Message
 {
 public:
-  explicit MessageStepDone(GstMessage* castitem);
 
   /** Create a step done message.  This message is posted by elements when they
    * complete a part, when @a intermediate set to true, or a complete step
@@ -598,8 +578,6 @@ public:
 class MessageClockProvide : public Message
 {
 public:
-  explicit MessageClockProvide(GstMessage *message);
-
   /** Create a clock provide message. This message is posted whenever an
    * element is ready to provide a clock or lost its ability to provide a clock
    * (maybe because it paused or became EOS).
@@ -659,7 +637,6 @@ public:
 class MessageClockLost : public Message
 {
 public:
-  explicit MessageClockLost(GstMessage* castitem);
 
   /** Create a clock lost message. This message is posted whenever the clock is
    * not valid anymore.  If this message is posted by the pipeline, the
@@ -698,7 +675,6 @@ public:
 class MessageNewClock: public Message
 {
 public:
-  explicit MessageNewClock(GstMessage* castitem);
 
   /** Create a new clock message. This message is posted whenever the pipeline
    * selectes a new clock for the pipeline.
@@ -737,7 +713,6 @@ public:
 class MessageApplication : public Message
 {
 public:
-  explicit MessageApplication(GstMessage *message);
 
   /** Create a new application-typed message. GStreamer will never create these
    * messages; they are a gift from us to you. Enjoy.
@@ -767,7 +742,6 @@ public:
 class MessageElement : public Message
 {
 public:
-  explicit MessageElement(GstMessage* castitem);
 
   /** Create a new element-specific message. This is meant as a generic way of
    * allowing one-way communication from an element to an application, for
@@ -801,7 +775,6 @@ public:
 class MessageCustom : public Message
 {
 public:
-  explicit MessageCustom(GstMessage* castitem);
 
   /** Create a new custom-typed message. This can be used for anything not
    * handled by other message-specific functions to pass a message to the app.
@@ -834,7 +807,6 @@ public:
 class MessageSegmentStart : public Message
 {
 public:
-  explicit MessageSegmentStart(GstMessage* castitem);
 
   /** Create a new segment message. This message is posted by elements that
    * start playback of a segment as a result of a segment seek. This message is
@@ -883,7 +855,6 @@ public:
 class MessageSegmentDone : public Message
 {
 public:
-  explicit MessageSegmentDone(GstMessage* castitem);
 
   /** Create a new segment done message. This message is posted by elements
    * that finish playback of a segment as a result of a segment seek. This
@@ -932,7 +903,6 @@ public:
 class MessageDuration : public Message
 {
 public:
-  explicit MessageDuration(GstMessage* castitem);
 
   /** Create a new duration message. This message is posted by elements that
    * know the duration of a stream in a specific format. This message is
@@ -992,7 +962,6 @@ public:
 class MessageLatency : public Message
 {
 public:
-  explicit MessageLatency(GstMessage* castitem);
 
   /** Creates a new latency message.  This message can be posted by elements
    * when their latency requirements have changed.
@@ -1012,7 +981,6 @@ public:
 class MessageAsyncStart : public Message
 {
 public:
-  explicit MessageAsyncStart(GstMessage* castitem);
 
   /** Creates a new async message.  This message is posted by elements when
    * they start an ASYNC state change. new_base_time is set to true when the
@@ -1027,16 +995,6 @@ public:
   static Glib::RefPtr<Gst::MessageAsyncStart>
     create(const Glib::RefPtr<Gst::Object>& src, bool new_base_time);
 
-  /** Extract and return the boolean new_base_time from the async_start
-   * message.
-   *
-   * MT safe.
-   *
-   * @return The new_base_time boolean.
-   *
-   * Since 0.10.13.
-   */
-  bool parse() const;
   _IGNORE(gst_message_parse_async_start)
 };
 
@@ -1046,7 +1004,6 @@ public:
 class MessageAsyncDone : public Message
 {
 public:
-  explicit MessageAsyncDone(GstMessage* castitem);
 
   /** Create an async done message. The message is posted when elements
    * completed an ASYNC state change.
@@ -1055,7 +1012,7 @@ public:
    * @return The new async_done message. MT safe.
    */
   static Glib::RefPtr<Gst::MessageAsyncDone>
-    create(const Glib::RefPtr<Gst::Object>& src);
+    create(const Glib::RefPtr<Gst::Object>& src, ClockTime running_time);
 };
 
 /** A step start message.
@@ -1147,7 +1104,6 @@ public:
 class MessageStructureChange : public Message
 {
 public:
-  explicit MessageStructureChange(GstMessage* castitem);
 
   /** Create a new structure change message. This message is posted when the
    * structure of a pipeline is in the process of being changed, for example
@@ -1216,7 +1172,6 @@ public:
 class MessageRequestState : public Message
 {
 public:
-  explicit MessageRequestState(GstMessage* castitem);
 
   /** This message can be posted by elements when they want to have their
    * state changed. A typical use case would be an audio server that wants to
@@ -1246,8 +1201,6 @@ public:
 class MessageStreamStatus : public Message
 {
 public:
-  explicit MessageStreamStatus(GstMessage* castitem);
-
   /** Create a new stream status message. This message is posted when a
    * streaming thread is created/destroyed or when the state changed. 
    *


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