Logo Search packages:      
Sourcecode: qt-gstreamer version File versions  Download package

Public Member Functions | Protected Member Functions | Protected Attributes | Friends

QGst::Message Class Reference

Wrapper class for GstMessage. More...

#include <QGst/Message>

Inheritance diagram for QGst::Message:
Inheritance graph
Collaboration diagram for QGst::Message:
Collaboration graph

List of all members.

Public Member Functions

MiniObjectPtr copy () const
StructurePtr internalStructure ()
bool isWritable () const
MiniObjectPtr makeWritable () const
quint32 sequenceNumber () const
void setSequenceNumber (quint32 num)
ObjectPtr source () const
quint64 timestamp () const
MessageType type () const
QString typeName () const

Protected Member Functions

template<class T >
T * object () const
virtual void ref (bool increaseRef)
virtual void unref ()

Protected Attributes

void * m_object


struct Private::RefPointerEqualityCheck
class RefPointer

Detailed Description

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.

Definition at line 47 of file message.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index