Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QGstElement Class Reference

#include <qgst_p.h>

Inheritance diagram for QGstElement:
Collaboration diagram for QGstElement:

Public Member Functions

 QGstElement (const QGstElement &)=default
 QGstElement (QGstElement &&) noexcept=default
QGstElement & operator= (const QGstElement &)=default
QGstElement & operator= (QGstElement &&) noexcept=default
 QGstElement (GstElement *element, RefMode mode)
QByteArrayView factoryName () const
QGstPad staticPad (const char *name) const
QGstPad src () const
QGstPad sink () const
QGstPad getRequestPad (const char *name) const
void releaseRequestPad (const QGstPad &pad) const
GstState state (std::chrono::nanoseconds timeout=std::chrono::seconds(0)) const
GstStateChangeReturn setState (GstState state)
bool setStateSync (GstState state, std::chrono::nanoseconds timeout=std::chrono::seconds(1))
bool syncStateWithParent ()
bool finishStateChange (std::chrono::nanoseconds timeout=std::chrono::seconds(5))
bool hasAsyncStateChange (std::chrono::nanoseconds timeout=std::chrono::seconds(0)) const
bool waitForAsyncStateChangeComplete (std::chrono::nanoseconds timeout=std::chrono::seconds(5)) const
void lockState (bool locked)
bool isStateLocked () const
void sendEvent (GstEvent *event) const
void sendEos () const
std::optional< std::chrono::nanoseconds > duration () const
std::optional< std::chrono::milliseconds > durationInMs () const
std::optional< std::chrono::nanoseconds > position () const
std::optional< std::chrono::milliseconds > positionInMs () const
std::optional< bool > canSeek () const
template<auto Member, typename T>
QGObjectHandlerConnection onPadAdded (T *instance)
template<auto Member, typename T>
QGObjectHandlerConnection onPadRemoved (T *instance)
template<auto Member, typename T>
QGObjectHandlerConnection onNoMorePads (T *instance)
GstClockTime baseTime () const
void setBaseTime (GstClockTime time) const
GstElement * element () const
QGstElement getParent () const
QGstBin getParentBin () const
QGstPipeline getPipeline () const
QGstBin getRootBin () const
void removeFromParent ()
void dumpPipelineGraph (const char *filename) const
 QGstObject (const QGstObject &)=default
 QGstObject (QGstObject &&) noexcept=default
Public Member Functions inherited from QGstObject
 QGstObject (const QGstObject &)=default
 QGstObject (QGstObject &&) noexcept=default
QGstObject & operator= (const QGstObject &)=default
QGstObject & operator= (QGstObject &&) noexcept=default
void set (const char *property, const char *str)
void set (const char *property, bool b)
void set (const char *property, int32_t i)
void set (const char *property, uint32_t i)
void set (const char *property, int64_t i)
void set (const char *property, uint64_t i)
void set (const char *property, double d)
void set (const char *property, const QGstObject &o)
void set (const char *property, const QGstCaps &c)
void set (const char *property, void *object, GDestroyNotify destroyFunction)
template<typename Object>
void set (const char *property, Object *object, GDestroyNotify destroyFunction)
template<typename Object>
void set (const char *property, std::unique_ptr< Object > object)
QGString getString (const char *property) const
QGstStructureView getStructure (const char *property) const
bool getBool (const char *property) const
uint getUInt (const char *property) const
int getInt (const char *property) const
quint64 getUInt64 (const char *property) const
qint64 getInt64 (const char *property) const
float getFloat (const char *property) const
double getDouble (const char *property) const
QGstObject getGstObject (const char *property) const
void * getObject (const char *property) const
template<typename T>
T * getObject (const char *property) const
QGObjectHandlerConnection connect (const char *name, GCallback callback, gpointer userData)
void disconnect (gulong handlerId)
GType type () const
QLatin1StringView typeName () const
GstObject * object () const
QLatin1StringView name () const
Public Member Functions inherited from QtPrivate::QSharedHandle< QSharedGstObjectTraits >
 QSharedHandle ()=default
 QSharedHandle (typename QSharedGstObjectTraits::Type object, RefMode mode)
 QSharedHandle (const QSharedHandle &o)
 QSharedHandle (QSharedHandle &&) noexcept=default
QSharedHandle & operator= (const QSharedHandle &o) noexcept(RefIsNoexcept &&BaseResetIsNoexcept)
QSharedHandle & operator= (QSharedHandle &&o) noexcept(BaseMoveIsNoexcept)
void reset (typename QSharedGstObjectTraits::Type o, RefMode mode) noexcept(RefIsNoexcept &&BaseResetIsNoexcept)
void reset () noexcept(BaseResetIsNoexcept)
 Q_DECLARE_STRONGLY_ORDERED (QSharedHandle)
void swap (QSharedHandle &other) noexcept(noexcept(std::declval< BaseClass >().swap(other)))
Type get () const noexcept
bool isValid () const noexcept
 operator bool () const noexcept
Type release () noexcept
Type * operator& () noexcept

Static Public Member Functions

static QGstElement createFromFactory (const char *factory, const char *name=nullptr)
static QGstElement createFromFactory (GstElementFactory *, const char *name=nullptr)
static QGstElement createFromFactory (const QGstElementFactoryHandle &, const char *name=nullptr)
static QGstElement createFromDevice (const QGstDeviceHandle &, const char *name=nullptr)
static QGstElement createFromDevice (GstDevice *, const char *name=nullptr)
static QGstElement createFromPipelineDescription (const char *)
static QGstElement createFromPipelineDescription (const QByteArray &)
static QGstElementFactoryHandle findFactory (const char *)
static QGstElementFactoryHandle findFactory (const QByteArray &name)
Static Public Member Functions inherited from QGstObject
template<typename T>
static void qDeleteFromVoidPointer (void *ptr)

Additional Inherited Members

Public Types inherited from QtPrivate::QSharedHandle< QSharedGstObjectTraits >
enum  RefMode

Detailed Description

Definition at line 607 of file qgst_p.h.

Constructor & Destructor Documentation

◆ QGstElement() [1/3]

QGstElement::QGstElement ( const QGstElement & )
default

◆ QGstElement() [2/3]

QGstElement::QGstElement ( QGstElement && )
defaultnoexcept

◆ QGstElement() [3/3]

QGstElement::QGstElement ( GstElement * element,
RefMode mode )
explicit

Definition at line 1005 of file qgst.cpp.

References QGstElement().

Referenced by QGstElement().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ baseTime()

GstClockTime QGstElement::baseTime ( ) const

Definition at line 1275 of file qgst.cpp.

◆ canSeek()

std::optional< bool > QGstElement::canSeek ( ) const

Definition at line 1259 of file qgst.cpp.

◆ createFromDevice() [1/2]

QGstElement QGstElement::createFromDevice ( const QGstDeviceHandle & device,
const char * name = nullptr )
static

Definition at line 1044 of file qgst.cpp.

◆ createFromDevice() [2/2]

QGstElement QGstElement::createFromDevice ( GstDevice * device,
const char * name = nullptr )
static

Definition at line 1049 of file qgst.cpp.

◆ createFromFactory() [1/3]

QGstElement QGstElement::createFromFactory ( const char * factory,
const char * name = nullptr )
static

Definition at line 1013 of file qgst.cpp.

Referenced by QGstAppSink::create(), QGstAppSrc::create(), QGstBin::createFromFactory(), createFromFactory(), QGstPipeline::createFromFactory(), QT_BEGIN_NAMESPACE::makeTee(), QGstreamerMediaRecorder::record(), QGstreamerCamera::setCamera(), QGstreamerCamera::setCameraFormat(), and QGstreamerVideoOutput::setVideoSink().

Here is the caller graph for this function:

◆ createFromFactory() [2/3]

QGstElement QGstElement::createFromFactory ( const QGstElementFactoryHandle & factory,
const char * name = nullptr )
static

Definition at line 1038 of file qgst.cpp.

References createFromFactory().

Here is the call graph for this function:

◆ createFromFactory() [3/3]

QGstElement QGstElement::createFromFactory ( GstElementFactory * factory,
const char * name = nullptr )
static

Definition at line 1030 of file qgst.cpp.

◆ createFromPipelineDescription() [1/2]

QGstElement QGstElement::createFromPipelineDescription ( const char * str)
static

Definition at line 1057 of file qgst.cpp.

Referenced by createFromPipelineDescription().

Here is the caller graph for this function:

◆ createFromPipelineDescription() [2/2]

QGstElement QGstElement::createFromPipelineDescription ( const QByteArray & str)
static

Definition at line 1071 of file qgst.cpp.

References createFromPipelineDescription().

Here is the call graph for this function:

◆ dumpPipelineGraph()

void QGstElement::dumpPipelineGraph ( const char * filename) const

Definition at line 1346 of file qgst.cpp.

References QGstBin::dumpGraph(), and getRootBin().

Referenced by QGstPad::doInIdleProbe(), finishStateChange(), and setStateSync().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ duration()

std::optional< std::chrono::nanoseconds > QGstElement::duration ( ) const

Definition at line 1217 of file qgst.cpp.

◆ durationInMs()

std::optional< std::chrono::milliseconds > QGstElement::durationInMs ( ) const

Definition at line 1227 of file qgst.cpp.

◆ element()

GstElement * QGstElement::element ( ) const

Definition at line 1285 of file qgst.cpp.

◆ factoryName()

QByteArrayView QGstElement::factoryName ( ) const

Definition at line 1089 of file qgst.cpp.

◆ findFactory() [1/2]

QGstElementFactoryHandle QGstElement::findFactory ( const char * name)
static

Definition at line 1076 of file qgst.cpp.

◆ findFactory() [2/2]

QGstElementFactoryHandle QGstElement::findFactory ( const QByteArray & name)
static

Definition at line 1084 of file qgst.cpp.

◆ finishStateChange()

bool QGstElement::finishStateChange ( std::chrono::nanoseconds timeout = std::chrono::seconds(5))

Definition at line 1163 of file qgst.cpp.

References dumpPipelineGraph().

Here is the call graph for this function:

◆ getParent()

QGstElement QGstElement::getParent ( ) const

Definition at line 1290 of file qgst.cpp.

Referenced by getRootBin().

Here is the caller graph for this function:

◆ getParentBin()

QGstBin QGstElement::getParentBin ( ) const

Definition at line 1298 of file qgst.cpp.

◆ getPipeline()

QGstPipeline QGstElement::getPipeline ( ) const

Definition at line 1326 of file qgst.cpp.

References getRootBin().

Here is the call graph for this function:

◆ getRequestPad()

QGstPad QGstElement::getRequestPad ( const char * name) const

Definition at line 1114 of file qgst.cpp.

Referenced by QGstreamerMediaRecorder::record().

Here is the caller graph for this function:

◆ getRootBin()

QGstBin QGstElement::getRootBin ( ) const

Definition at line 1306 of file qgst.cpp.

References getParent().

Referenced by dumpPipelineGraph(), and getPipeline().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasAsyncStateChange()

bool QGstElement::hasAsyncStateChange ( std::chrono::nanoseconds timeout = std::chrono::seconds(0)) const

Definition at line 1176 of file qgst.cpp.

◆ isStateLocked()

bool QGstElement::isStateLocked ( ) const

Definition at line 1202 of file qgst.cpp.

◆ lockState()

void QGstElement::lockState ( bool locked)

Definition at line 1197 of file qgst.cpp.

◆ onNoMorePads()

template<auto Member, typename T>
QGObjectHandlerConnection QGstElement::onNoMorePads ( T * instance)
inline

Definition at line 688 of file qgst_p.h.

◆ onPadAdded()

template<auto Member, typename T>
QGObjectHandlerConnection QGstElement::onPadAdded ( T * instance)
inline

Definition at line 660 of file qgst_p.h.

◆ onPadRemoved()

template<auto Member, typename T>
QGObjectHandlerConnection QGstElement::onPadRemoved ( T * instance)
inline

Definition at line 674 of file qgst_p.h.

◆ operator=() [1/2]

QGstElement & QGstElement::operator= ( const QGstElement & )
default

Referenced by QGstreamerCamera::setCamera().

Here is the caller graph for this function:

◆ operator=() [2/2]

QGstElement & QGstElement::operator= ( QGstElement && )
defaultnoexcept

Referenced by QGstreamerCamera::setCamera(), and QGstreamerVideoOutput::setVideoSink().

Here is the caller graph for this function:

◆ position()

std::optional< std::chrono::nanoseconds > QGstElement::position ( ) const

Definition at line 1236 of file qgst.cpp.

◆ positionInMs()

std::optional< std::chrono::milliseconds > QGstElement::positionInMs ( ) const

Definition at line 1250 of file qgst.cpp.

◆ QGstObject() [1/2]

QGstObject::QGstObject ( const QGstObject & )
default

◆ QGstObject() [2/2]

QGstObject::QGstObject ( QGstObject && )
defaultnoexcept

◆ releaseRequestPad()

void QGstElement::releaseRequestPad ( const QGstPad & pad) const

Definition at line 1119 of file qgst.cpp.

◆ removeFromParent()

void QGstElement::removeFromParent ( )

Definition at line 1340 of file qgst.cpp.

◆ sendEos()

void QGstElement::sendEos ( ) const

Definition at line 1212 of file qgst.cpp.

◆ sendEvent()

void QGstElement::sendEvent ( GstEvent * event) const

Definition at line 1207 of file qgst.cpp.

◆ setBaseTime()

void QGstElement::setBaseTime ( GstClockTime time) const

Definition at line 1280 of file qgst.cpp.

◆ setState()

GstStateChangeReturn QGstElement::setState ( GstState state)

Definition at line 1139 of file qgst.cpp.

◆ setStateSync()

bool QGstElement::setStateSync ( GstState state,
std::chrono::nanoseconds timeout = std::chrono::seconds(1) )

Definition at line 1144 of file qgst.cpp.

References dumpPipelineGraph().

Here is the call graph for this function:

◆ sink()

QGstPad QGstElement::sink ( ) const

Definition at line 1109 of file qgst.cpp.

References staticPad().

Referenced by QGstreamerMediaCaptureSession::setAudioOutput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ src()

QGstPad QGstElement::src ( ) const

Definition at line 1104 of file qgst.cpp.

References staticPad().

Here is the call graph for this function:

◆ state()

GstState QGstElement::state ( std::chrono::nanoseconds timeout = std::chrono::seconds(0)) const

Definition at line 1124 of file qgst.cpp.

◆ staticPad()

QGstPad QGstElement::staticPad ( const char * name) const

Definition at line 1099 of file qgst.cpp.

Referenced by QGstBin::addGhostPad(), QGstreamerMediaCaptureSession::setAudioOutput(), sink(), and src().

Here is the caller graph for this function:

◆ syncStateWithParent()

bool QGstElement::syncStateWithParent ( )

Definition at line 1157 of file qgst.cpp.

◆ waitForAsyncStateChangeComplete()

bool QGstElement::waitForAsyncStateChangeComplete ( std::chrono::nanoseconds timeout = std::chrono::seconds(5)) const

Definition at line 1184 of file qgst.cpp.


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