QtGStreamer 1.2.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Related Symbols | List of all members
QGst::Structure Class Reference

#include <QGst/Structure>

Inheritance diagram for QGst::Structure:
Inheritance graph
[legend]

Public Member Functions

 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
 

Static Public Member Functions

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

Related Symbols

(Note that these are not member symbols.)

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

Detailed Description

Wrapper for GstStructure.

A Structure is a collection of key/value pairs. In addition to the key/value pairs, a Structure also has a name. The name starts with a letter and can be folled by letters, numbers and any of "/-_.:". Structure is used by various GStreamer subsystems to store information in a flexible and extensible way.

To use a Structure, you must first give it a name, either on the constructor or using the setName() method. Afterwards, you can set values with setValue() and retrieve them with value().

Structure is also serializable. You can use toString() to serialize it into a string and fromString() to deserialize it.

Note
This class is implicitly shared.
See also
SharedStructure

Definition at line 49 of file structure.h.

Constructor & Destructor Documentation

◆ Structure() [1/4]

QGst::Structure::Structure ( )

Definition at line 58 of file structure.cpp.

◆ Structure() [2/4]

QGst::Structure::Structure ( const char *  name)
explicit

Definition at line 68 of file structure.cpp.

◆ Structure() [3/4]

QGst::Structure::Structure ( const GstStructure *  structure)
explicit

Definition at line 74 of file structure.cpp.

◆ Structure() [4/4]

QGst::Structure::Structure ( const Structure other)

Definition at line 80 of file structure.cpp.

◆ ~Structure()

QGst::Structure::~Structure ( )
virtual

Definition at line 85 of file structure.cpp.

Member Function Documentation

◆ operator=()

Structure & QGst::Structure::operator= ( const Structure other)

Definition at line 89 of file structure.cpp.

◆ isValid()

bool QGst::Structure::isValid ( ) const

Definition at line 95 of file structure.cpp.

◆ name()

QString QGst::Structure::name ( ) const

Definition at line 100 of file structure.cpp.

◆ setName()

void QGst::Structure::setName ( const char *  name)

Definition at line 109 of file structure.cpp.

◆ value()

QGlib::Value QGst::Structure::value ( const char *  fieldName) const

Definition at line 119 of file structure.cpp.

◆ setValue() [1/2]

template<typename T >
void QGst::Structure::setValue ( const char *  fieldName,
const T &  value 
)
inline

Definition at line 98 of file structure.h.

◆ setValue() [2/2]

void QGst::Structure::setValue ( const char *  fieldName,
const QGlib::Value value 
)

Definition at line 128 of file structure.cpp.

◆ numberOfFields()

unsigned int QGst::Structure::numberOfFields ( ) const

Definition at line 134 of file structure.cpp.

◆ fieldName()

QString QGst::Structure::fieldName ( unsigned int  fieldNumber) const

Definition at line 139 of file structure.cpp.

◆ fieldType()

QGlib::Type QGst::Structure::fieldType ( const char *  fieldName) const

Definition at line 148 of file structure.cpp.

◆ hasField()

bool QGst::Structure::hasField ( const char *  fieldName) const

Definition at line 157 of file structure.cpp.

◆ hasFieldTyped()

bool QGst::Structure::hasFieldTyped ( const char *  fieldName,
QGlib::Type  type 
) const

Definition at line 162 of file structure.cpp.

◆ removeField()

void QGst::Structure::removeField ( const char *  fieldName)

Definition at line 167 of file structure.cpp.

◆ removeAllFields()

void QGst::Structure::removeAllFields ( )

Definition at line 174 of file structure.cpp.

◆ toString()

QString QGst::Structure::toString ( ) const

Definition at line 181 of file structure.cpp.

◆ fromString() [1/2]

Structure QGst::Structure::fromString ( const char *  str)
static

Definition at line 190 of file structure.cpp.

◆ fromString() [2/2]

Structure QGst::Structure::fromString ( const QString &  str)
inlinestatic

Definition at line 104 of file structure.h.

◆ operator GstStructure *()

QGst::Structure::operator GstStructure * ( )

Definition at line 198 of file structure.cpp.

◆ operator const GstStructure *()

QGst::Structure::operator const GstStructure * ( ) const

Definition at line 203 of file structure.cpp.

Friends And Related Symbol Documentation

◆ operator<<()

QDebug operator<< ( QDebug  debug,
const Structure structure 
)
related

Definition at line 258 of file structure.cpp.


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