gstreamermm
1.10.0
|
A class that represents lightweight objects to signal the application of pipeline events. More...
#include <gstreamermm/message.h>
Public Member Functions | |
void | reference () const |
Increment the reference count for this object. More... | |
void | unreference () const |
Decrement the reference count for this object. More... | |
GstMessage* | gobj () |
Provides access to the underlying C instance. More... | |
const GstMessage* | gobj () const |
Provides access to the underlying C instance. More... | |
GstMessage* | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
Message ()=delete | |
Message (const Message&)=delete | |
Message& | operator= (const Message&)=delete |
Gst::Structure | get_structure () const |
Access the structure of the message. More... | |
Glib::RefPtr< Gst::Message > | create_writable () |
Checks if a message is writable. More... | |
guint32 | get_seqnum () const |
Retrieve the sequence number of a message. More... | |
void | set_seqnum (guint32 seqnum) |
Set the sequence number of a message. More... | |
Glib::RefPtr< Gst::Message > | copy () const |
Creates a copy of the message. More... | |
MessageType | get_message_type () const |
Get the GstMessageType of message. More... | |
Gst::ClockTime | get_timestamp () const |
Get the timestamp of message. More... | |
Glib::RefPtr< Gst::Object > | get_source () |
Get the object that posted the message. More... | |
Glib::RefPtr< const Gst::Object > | get_source () const |
bool | has_name (const Glib::ustring& name) const |
Checks if message has the given name. More... | |
![]() | |
void | reference () const |
Increment the reference count for this object. More... | |
void | unreference () const |
Decrement the reference count for this object. More... | |
GstMiniObject* | gobj () |
Provides access to the underlying C instance. More... | |
const GstMiniObject* | gobj () const |
Provides access to the underlying C instance. More... | |
GstMiniObject* | gobj_copy () const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More... | |
MiniObject ()=delete | |
MiniObject (const MiniObject&)=delete | |
MiniObject& | operator= (const MiniObject&)=delete |
~MiniObject () | |
guint | get_flags () const |
void | set_flags (const guint& value) |
gint | get_refcount () const |
gint | get_lockstate () const |
bool | lock (LockFlags flags) |
Lock the mini-object with the specified access mode in flags. More... | |
void | unlock (LockFlags flags) |
Unlock the mini-object with the specified access mode in flags. More... | |
bool | is_writable () const |
If mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on object is the only one, this means that changes to the object will not be visible to any other object. More... | |
Glib::RefPtr< MiniObject > | create_writable () |
Checks if a mini-object is writable. More... | |
void | set_qdata (GQuark quark, QuarkData* data) |
This sets an opaque, named pointer on a miniobject. More... | |
QuarkData* | get_qdata (GQuark quark) const |
This function gets back user data pointers stored via set_qdata(). More... | |
QuarkData* | steal_qdata (GQuark quark) |
This function gets back user data pointers stored via set_qdata() and removes the data from object without invoking its destroy() function (if any was set). More... | |
void | add_finalize_notifier (const SlotFinalizer& slot) |
Adds notifier when mini object is finalized. More... | |
void | remove_finalize_notifier () |
Remove finalize notifier. More... | |
Protected Member Functions | |
void | operator delete (void*, std::size_t) |
![]() | |
void | operator delete (void*, std::size_t) |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gst::Message > | wrap (GstMessage* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
![]() | |
Glib::RefPtr< Gst::MiniObject > | wrap (GstMiniObject* object, bool take_copy=false) |
A Glib::wrap() method for this object. More... | |
Additional Inherited Members | |
![]() | |
typedef sigc::slot< void > | SlotFinalizer |
A class that represents 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:
Last reviewed on 2016-06-06 (1.8.0)
|
delete |
|
delete |
Glib::RefPtr<Gst::Message> Gst::Message::copy | ( | ) | const |
Creates a copy of the message.
Returns a copy of the message.
MT safe.
Glib::RefPtr<Gst::Message> Gst::Message::create_writable | ( | ) |
Checks if a message is writable.
If not, a writable copy is made and returned.
MessageType Gst::Message::get_message_type | ( | ) | const |
Get the GstMessageType of message.
guint32 Gst::Message::get_seqnum | ( | ) | const |
Retrieve the sequence number of a message.
Messages have ever-incrementing sequence numbers, which may also be set explicitly via gst_message_set_seqnum(). Sequence numbers are typically used to indicate that a message corresponds to some other set of messages or events, for example a SEGMENT_DONE message corresponding to a SEEK event. It is considered good practice to make this correspondence when possible, though it is not required.
Note that events and messages share the same sequence number incrementor; two events or messages will never have the same sequence number unless that correspondence was made explicitly.
MT safe.
Glib::RefPtr<Gst::Object> Gst::Message::get_source | ( | ) |
Get the object that posted the message.
Glib::RefPtr<const Gst::Object> Gst::Message::get_source | ( | ) | const |
Gst::Structure Gst::Message::get_structure | ( | ) | const |
Access the structure of the message.
MT safe.
Gst::ClockTime Gst::Message::get_timestamp | ( | ) | const |
Get the timestamp of message.
This is the timestamp when the message was created.
GstMessage* Gst::Message::gobj | ( | ) |
Provides access to the underlying C instance.
const GstMessage* Gst::Message::gobj | ( | ) | const |
Provides access to the underlying C instance.
GstMessage* Gst::Message::gobj_copy | ( | ) | const |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool Gst::Message::has_name | ( | const Glib::ustring & | name | ) | const |
Checks if message has the given name.
This function is usually used to check the name of a custom message.
name | Name to check. |
true
if name matches the name of the message structure.
|
protected |
void Gst::Message::reference | ( | ) | const |
Increment the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
void Gst::Message::set_seqnum | ( | guint32 | seqnum | ) |
Set the sequence number of a message.
This function might be called by the creator of a message to indicate that the message relates to other messages or events. See gst_message_get_seqnum() for more information.
MT safe.
seqnum | A sequence number. |
void Gst::Message::unreference | ( | ) | const |
Decrement the reference count for this object.
You should never need to do this manually - use the object via a RefPtr instead.
|
related |
A Glib::wrap() method for this object.
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. |