#include <message.h>
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. | |
Glib::RefPtr<Gst::Message> | copy () const |
Creates a copy of the message. | |
const Gst::Structure | get_structure () const |
Access the structure of the message. | |
Glib::RefPtr<Gst::Message> | create_writable () |
Checks if a message is writable. | |
MessageType | get_message_type () const |
Get the GstMessageType of message. | |
ClockTime | get_timestamp () const |
Get the timestamp of message. | |
Glib::RefPtr<Gst::Object> | get_source () |
Get the object that posted the message. | |
Glib::RefPtr<const Gst::Object> | get_source () const |
Static Public Member Functions | |
static Glib::RefPtr<Gst::Message> | wrap (GstMessage* message, bool take_copy=false) |
Wrap a GstMessage* in a C++ instance, creating an instance of a derived Gst::Message. |
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));
virtual Gst::Message::~Message | ( | ) | [virtual] |
Glib::RefPtr<Gst::Message> Gst::Message::copy | ( | ) | const |
Creates a copy of the message.
MT safe.
Reimplemented from Gst::MiniObject.
Glib::RefPtr<Gst::Message> Gst::Message::create_writable | ( | ) |
Checks if a message is writable.
If not, a writable copy is made and returned.
Reimplemented from Gst::MiniObject.
MessageType Gst::Message::get_message_type | ( | ) | const |
Get the GstMessageType of message.
Glib::RefPtr<const Gst::Object> Gst::Message::get_source | ( | ) | const |
Glib::RefPtr<Gst::Object> Gst::Message::get_source | ( | ) |
Get the object that posted the message.
const Gst::Structure Gst::Message::get_structure | ( | ) | const |
Access the structure of the message.
ClockTime Gst::Message::get_timestamp | ( | ) | const |
Get the timestamp of message.
This is the timestamp when the message was created.
const GstMessage* Gst::Message::gobj | ( | ) | const [inline] |
GstMessage* Gst::Message::gobj | ( | ) | [inline] |
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.
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. |