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 936 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 1196 of file qgst.cpp.

◆ canSeek()

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

Definition at line 1180 of file qgst.cpp.

◆ createFromDevice() [1/2]

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

Definition at line 975 of file qgst.cpp.

◆ createFromDevice() [2/2]

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

Definition at line 980 of file qgst.cpp.

◆ createFromFactory() [1/3]

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

Definition at line 944 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 969 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 961 of file qgst.cpp.

◆ createFromPipelineDescription() [1/2]

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

Definition at line 988 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 1002 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 1267 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 1138 of file qgst.cpp.

◆ durationInMs()

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

Definition at line 1148 of file qgst.cpp.

◆ element()

GstElement * QGstElement::element ( ) const

Definition at line 1206 of file qgst.cpp.

◆ findFactory() [1/2]

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

Definition at line 1007 of file qgst.cpp.

◆ findFactory() [2/2]

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

Definition at line 1015 of file qgst.cpp.

◆ finishStateChange()

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

Definition at line 1084 of file qgst.cpp.

References dumpPipelineGraph().

Here is the call graph for this function:

◆ getParent()

QGstElement QGstElement::getParent ( ) const

Definition at line 1211 of file qgst.cpp.

Referenced by getRootBin().

Here is the caller graph for this function:

◆ getParentBin()

QGstBin QGstElement::getParentBin ( ) const

Definition at line 1219 of file qgst.cpp.

◆ getPipeline()

QGstPipeline QGstElement::getPipeline ( ) const

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

Referenced by QGstreamerMediaRecorder::record().

Here is the caller graph for this function:

◆ getRootBin()

QGstBin QGstElement::getRootBin ( ) const

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

◆ isStateLocked()

bool QGstElement::isStateLocked ( ) const

Definition at line 1123 of file qgst.cpp.

◆ lockState()

void QGstElement::lockState ( bool locked)

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

◆ positionInMs()

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

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

◆ removeFromParent()

void QGstElement::removeFromParent ( )

Definition at line 1261 of file qgst.cpp.

◆ sendEos()

void QGstElement::sendEos ( ) const

Definition at line 1133 of file qgst.cpp.

◆ sendEvent()

void QGstElement::sendEvent ( GstEvent * event) const

Definition at line 1128 of file qgst.cpp.

◆ setBaseTime()

void QGstElement::setBaseTime ( GstClockTime time) const

Definition at line 1201 of file qgst.cpp.

◆ setState()

GstStateChangeReturn QGstElement::setState ( GstState state)

Definition at line 1060 of file qgst.cpp.

◆ setStateSync()

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

Definition at line 1065 of file qgst.cpp.

References dumpPipelineGraph().

Here is the call graph for this function:

◆ sink()

QGstPad QGstElement::sink ( ) const

Definition at line 1030 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 1025 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 1045 of file qgst.cpp.

◆ staticPad()

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

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

◆ waitForAsyncStateChangeComplete()

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

Definition at line 1105 of file qgst.cpp.


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