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
QGstElementoperator= (const QGstElement &)=default
QGstElementoperator= (QGstElement &&) noexcept=default
 QGstElement (GstElement *element, RefMode mode)
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
GstElementelement () 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
QGstObjectoperator= (const QGstObject &)=default
QGstObjectoperator= (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
voidgetObject (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
QSharedHandleoperator= (const QSharedHandle &o) noexcept(RefIsNoexcept &&BaseResetIsNoexcept)
QSharedHandleoperator= (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
Typeoperator& () 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 555 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 948 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 1208 of file qgst.cpp.

◆ canSeek()

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

Definition at line 1192 of file qgst.cpp.

◆ createFromDevice() [1/2]

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

Definition at line 987 of file qgst.cpp.

◆ createFromDevice() [2/2]

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

Definition at line 992 of file qgst.cpp.

◆ createFromFactory() [1/3]

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

Definition at line 956 of file qgst.cpp.

Referenced by QGstAppSink::create(), QGstAppSrc::create(), QGstBin::createFromFactory(), createFromFactory(), QGstPipeline::createFromFactory(), QT_BEGIN_NAMESPACE::makeTee(), QGstreamerMediaRecorder::record(), QGstreamerCamera::setCamera(), 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 981 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 973 of file qgst.cpp.

◆ createFromPipelineDescription() [1/2]

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

Definition at line 1000 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 1014 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 1279 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 1150 of file qgst.cpp.

◆ durationInMs()

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

Definition at line 1160 of file qgst.cpp.

◆ element()

GstElement * QGstElement::element ( ) const

Definition at line 1218 of file qgst.cpp.

◆ findFactory() [1/2]

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

Definition at line 1019 of file qgst.cpp.

◆ findFactory() [2/2]

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

Definition at line 1027 of file qgst.cpp.

◆ finishStateChange()

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

Definition at line 1096 of file qgst.cpp.

References dumpPipelineGraph().

Here is the call graph for this function:

◆ getParent()

QGstElement QGstElement::getParent ( ) const

Definition at line 1223 of file qgst.cpp.

Referenced by getRootBin().

Here is the caller graph for this function:

◆ getParentBin()

QGstBin QGstElement::getParentBin ( ) const

Definition at line 1231 of file qgst.cpp.

◆ getPipeline()

QGstPipeline QGstElement::getPipeline ( ) const

Definition at line 1259 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 1047 of file qgst.cpp.

Referenced by QGstreamerMediaRecorder::record().

Here is the caller graph for this function:

◆ getRootBin()

QGstBin QGstElement::getRootBin ( ) const

Definition at line 1239 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 1109 of file qgst.cpp.

◆ isStateLocked()

bool QGstElement::isStateLocked ( ) const

Definition at line 1135 of file qgst.cpp.

◆ lockState()

void QGstElement::lockState ( bool locked)

Definition at line 1130 of file qgst.cpp.

◆ onNoMorePads()

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

Definition at line 634 of file qgst_p.h.

◆ onPadAdded()

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

Definition at line 606 of file qgst_p.h.

◆ onPadRemoved()

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

Definition at line 620 of file qgst_p.h.

◆ operator=() [1/2]

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

◆ 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 1169 of file qgst.cpp.

◆ positionInMs()

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

Definition at line 1183 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 1052 of file qgst.cpp.

◆ removeFromParent()

void QGstElement::removeFromParent ( )

Definition at line 1273 of file qgst.cpp.

◆ sendEos()

void QGstElement::sendEos ( ) const

Definition at line 1145 of file qgst.cpp.

◆ sendEvent()

void QGstElement::sendEvent ( GstEvent * event) const

Definition at line 1140 of file qgst.cpp.

◆ setBaseTime()

void QGstElement::setBaseTime ( GstClockTime time) const

Definition at line 1213 of file qgst.cpp.

◆ setState()

GstStateChangeReturn QGstElement::setState ( GstState state)

Definition at line 1072 of file qgst.cpp.

◆ setStateSync()

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

Definition at line 1077 of file qgst.cpp.

References dumpPipelineGraph().

Here is the call graph for this function:

◆ sink()

QGstPad QGstElement::sink ( ) const

Definition at line 1042 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 1037 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 1057 of file qgst.cpp.

◆ staticPad()

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

Definition at line 1032 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 1090 of file qgst.cpp.

◆ waitForAsyncStateChangeComplete()

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

Definition at line 1117 of file qgst.cpp.


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