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

Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Friends | Related Functions

QGst::SharedStructure Class Reference

Helper for shared GstStructure instances. More...

#include <QGst/Structure>

Inheritance diagram for QGst::SharedStructure:
Inheritance graph
[legend]
Collaboration diagram for QGst::SharedStructure:
Collaboration graph
[legend]

List of all members.

Public Member Functions

Structure copy () const
 Data ()
 Data (const Data &other)
QString fieldName (unsigned int fieldNumber) const
QGlib::Type fieldType (const char *fieldName) const
bool hasField (const char *fieldName) const
bool hasFieldTyped (const char *fieldName, QGlib::Type type) const
bool isValid () const
QString name () const
unsigned int numberOfFields () const
 operator const GstStructure * () const
 operator GstStructure * ()
void removeAllFields ()
void removeField (const char *fieldName)
void setName (const char *name)
template<typename T >
void setValue (const char *fieldName, const T &value)
void setValue (const char *fieldName, const QGlib::Value &value)
QString toString () const
QGlib::Value value (const char *fieldName) const

Static Public Member Functions

static Structure fromString (const char *str)
static Structure fromString (const QString &str)

Public Attributes

CapsPtr caps
MiniObjectPtr miniobject
GstStructure * structure

Private Member Functions

 Q_DISABLE_COPY (SharedStructure)
QTGSTREAMER_NO_EXPORT SharedStructure (Data *data)

Static Private Member Functions

static QTGSTREAMER_NO_EXPORT
StructurePtr 
fromCaps (GstStructure *structure, const CapsPtr &parent)
static QTGSTREAMER_NO_EXPORT
StructurePtr 
fromMiniObject (GstStructure *structure, const MiniObjectPtr &parent)

Friends

class Caps
class Event
class Message
class Query

Related Functions

(Note that these are not member functions.)


QTGSTREAMER_EXPORT QDebug operator<< (QDebug debug, const Structure &structure)

Detailed Description

Helper for shared GstStructure instances.

This class serves as a helper for wrapping shared GstStructure instances. Some functions in the GStreamer API return a pointer to some internal GstStructure and expect you to change this internal instance, not copy it and re-set it using some setter function (like all normal object-oriented APIs do), so it is necessary to have way of accessing those instances.

This class wraps a GstStructure without copying it and without freeing it from the destructor, unlike Structure, which always keeps a GstStructure instance for itself. In addition to that, this class also holds a reference to the GstStructure's parent object, so that it doesn't accidentally get deleted because its smart pointer has gone out of scope.

Since this class is not copy-able (to prevent misuse), to ease using it, there is a StructurePtr typedef for QSharedPointer<SharedStructure> available. You should only use this class through StructurePtr and not directly.

See also:
Structure, Caps::internalStructure

Definition at line 214 of file structure.cpp.


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

Generated by  Doxygen 1.6.0   Back to index