QtGStreamer  1.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
QGst::SharedStructure Class Reference

#include <QGst/Structure>

Inheritance diagram for QGst::SharedStructure:
Inheritance graph
Collaboration diagram for QGst::SharedStructure:
Collaboration graph

Public Member Functions

Structure copy () const
- Public Member Functions inherited from QGst::Structure
 Structure (const char *name)
 Structure (const GstStructure *structure)
 Structure (const Structure &other)
Structureoperator= (const Structure &other)
bool isValid () const
QString name () const
void setName (const char *name)
QGlib::Value value (const char *fieldName) const
template<typename T >
void setValue (const char *fieldName, const T &value)
void setValue (const char *fieldName, const QGlib::Value &value)
unsigned int numberOfFields () const
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
void removeField (const char *fieldName)
void removeAllFields ()
QString toString () const
 operator GstStructure * ()
 operator const GstStructure * () const

Additional Inherited Members

- Static Public Member Functions inherited from QGst::Structure
static Structure fromString (const char *str)
static Structure fromString (const QString &str)

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 129 of file structure.h.

Member Function Documentation

Structure QGst::SharedStructure::copy ( ) const
a deep copy of the structure

Definition at line 225 of file structure.cpp.

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