Gst::Message Class Reference

Gst::Message — Lightweight objects to signal the application of pipeline events. More...

#include <message.h>

Inheritance diagram for Gst::Message:

Gst::MiniObject Gst::MessageApplication Gst::MessageAsyncDone Gst::MessageAsyncStart Gst::MessageBuffering Gst::MessageClockLost Gst::MessageClockProvide Gst::MessageCustom Gst::MessageDuration Gst::MessageElement Gst::MessageEos Gst::MessageError Gst::MessageInfo Gst::MessageLatency Gst::MessageNewClock Gst::MessageSegmentDone Gst::MessageSegmentStart Gst::MessageStateChanged Gst::MessageStateDirty Gst::MessageTag Gst::MessageWarning

List of all members.

Public Member Functions

virtual ~Message ()
GstMessage* gobj ()
 Provides access to the underlying C GstMiniObject.
const GstMessage* gobj () const
 Provides access to the underlying C GstMiniObject.
GstMessage* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
const Structureget_structure ()
 Get the structure of a message.
MessageType get_message_type () const
ClockTime get_timestamp () const
Glib::RefPtr<Gst::Objectget_source ()
Glib::RefPtr<const Gst::Objectget_source () const

Static Public Member Functions

static Glib::RefPtr<Messagewrap (GstMessage* message, bool take_copy=false)
 Wrap a GstMessage* in a C++ instance, creating an instance of a derived Gst::Message.


Detailed Description

Gst::Message — Lightweight objects to signal the application of pipeline events.

Messages are implemented as a subclass of Gst::MiniObject with a generic Gst::Structure as the content. This allows for writing custom messages without requiring an API change while allowing a wide range of different types of messages.

Messages are posted by objects in the pipeline and are passed to the application using the Gst::Bus.

The basic use pattern of posting a message on a Gst::Bus is as follows:

 bus->post(Gst::MessageEos::create(my_element));

Constructor & Destructor Documentation

virtual Gst::Message::~Message (  )  [virtual]


Member Function Documentation

MessageType Gst::Message::get_message_type (  )  const

Glib::RefPtr<const Gst::Object> Gst::Message::get_source (  )  const

Glib::RefPtr<Gst::Object> Gst::Message::get_source (  ) 

const Structure* Gst::Message::get_structure (  ) 

Get the structure of a message.

Returns:
The Gst::Structure of the message (unmodifiable)

ClockTime Gst::Message::get_timestamp (  )  const

const GstMessage* Gst::Message::gobj (  )  const [inline]

Provides access to the underlying C GstMiniObject.

Reimplemented from Gst::MiniObject.

GstMessage* Gst::Message::gobj (  )  [inline]

Provides access to the underlying C GstMiniObject.

Reimplemented from Gst::MiniObject.

GstMessage* Gst::Message::gobj_copy (  ) 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Glib::RefPtr<Gst::Message> wrap ( GstMessage *  message,
bool  take_copy = false 
) [static]

Wrap a GstMessage* in a C++ instance, creating an instance of a derived Gst::Message.

Gst::wrap() would just create a Gst::Message (rather than a derived one) because the derived Gst::Message classes do not correspond to GType types in the GStreamer API.

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:

Generated on Sun Feb 15 19:01:04 2009 for gstreamermm by  doxygen 1.5.7.1