|ObjectPtr||source () const|
|quint64||timestamp () const|
|QString||typeName () const|
|MessageType||type () const|
|quint32||sequenceNumber () const|
|void||setSequenceNumber (quint32 num)|
Wrapper class for GstMessage.
Messages are lightweight objects to signal the application of pipeline events. They are posted by objects in the pipeline and are passed to the application using the Bus.
Messages are implemented as a subclass of MiniObject with a generic GstStructure as the content. This allows for writing custom messages without requiring an API change while allowing a wide range of different types of messages.
In these bindings, for convenience, each message type has its own Message subclass. This does not reflect 1-1 the native C API, where there is only one Message class with tens of 'new_foo' and 'parse_foo' methods. You can use RefPointer::dynamicCast() to cast a MessagePtr to a RefPointer of one of the Message subclasses and it will behave as expected (i.e. it will only succeed if the message type matches the message type that the subclass handles). Note however that the Message subclasses cannot be used with Value::get(), since a GValue will actually contain a GstMessage (the subclasses do not exist in C) and Value::get() is not able to do dynamic casts. As a result of that, Message subclasses also cannot be used as arguments in slots connected to GObject signals, even though you may know that your slot will only be called with that type of message.