Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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))
 
void lockState (bool locked)
 
bool isStateLocked () const
 
void sendEvent (GstEvent *event) const
 
void sendEos () 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
 
QGstPipeline getPipeline () 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, uint i)
 
void set (const char *property, int i)
 
void set (const char *property, qint64 i)
 
void set (const char *property, quint64 i)
 
void set (const char *property, double d)
 
void set (const char *property, const QGstObject &o)
 
void set (const char *property, const QGstCaps &c)
 
QGString getString (const char *property) const
 
QGstStructure 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 getObject (const char *property) const
 
QGObjectHandlerConnection connect (const char *name, GCallback callback, gpointer userData)
 
void disconnect (gulong handlerId)
 
GType type () const
 
GstObject * object () const
 
const char * name () const
 
- Public Member Functions inherited from QGstPointerImpl::QGstObjectWrapper< GstObject >
constexpr QGstObjectWrapper ()=default
 
 QGstObjectWrapper (GstObject *object, RefMode mode)
 
 QGstObjectWrapper (const QGstObjectWrapper &other)
 
 QGstObjectWrapper (QGstObjectWrapper &&other) noexcept
 
 ~QGstObjectWrapper ()
 
QGstObjectWrapperoperator= (const QGstObjectWrapper &other)
 
QGstObjectWrapperoperator= (QGstObjectWrapper &&other) noexcept
 
 operator bool () const
 
bool isNull () const
 
GstObject * release ()
 

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)
 

Additional Inherited Members

- Public Types inherited from QGstPointerImpl::QGstObjectWrapper< GstObject >
enum  RefMode
 
- Protected Member Functions inherited from QGstPointerImpl::QGstObjectWrapper< GstObject >
GstObject * get () const
 

Detailed Description

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

Member Function Documentation

◆ baseTime()

GstClockTime QGstElement::baseTime ( ) const

Definition at line 962 of file qgst.cpp.

References element().

+ Here is the call graph for this function:

◆ createFromDevice() [1/2]

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

Definition at line 848 of file qgst.cpp.

References createFromDevice(), and device.

Referenced by createFromDevice(), QGstreamerAudioInput::setAudioDevice(), QGstreamerAudioOutput::setAudioDevice(), and QGstreamerCamera::setCamera().

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

◆ createFromDevice() [2/2]

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

Definition at line 853 of file qgst.cpp.

References device, and QGstPointerImpl::QGstObjectWrapper< GstObject >::NeedsRef.

◆ createFromFactory() [1/3]

◆ createFromFactory() [2/3]

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

Definition at line 842 of file qgst.cpp.

References createFromFactory(), and factory.

+ Here is the call graph for this function:

◆ createFromFactory() [3/3]

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

Definition at line 834 of file qgst.cpp.

References factory, and QGstPointerImpl::QGstObjectWrapper< GstObject >::NeedsRef.

◆ element()

◆ finishStateChange()

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

Definition at line 929 of file qgst.cpp.

References element(), QGstObject::name(), pending, qWarning, and state.

Referenced by QGstreamerMediaPlayer::~QGstreamerMediaPlayer(), and QGstreamerMediaPlayer::setPosition().

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

◆ getParent()

QGstElement QGstElement::getParent ( ) const

Definition at line 977 of file qgst.cpp.

References QGstPointerImpl::QGstObjectWrapper< GstObject >::HasRef.

Referenced by getPipeline().

+ Here is the caller graph for this function:

◆ getPipeline()

QGstPipeline QGstElement::getPipeline ( ) const

Definition at line 985 of file qgst.cpp.

References getParent(), and QGstPointerImpl::QGstObjectWrapper< GstObject >::NeedsRef.

Referenced by QGstreamerAudioInput::setAudioDevice(), QGstreamerAudioOutput::setAudioDevice(), QGstreamerCamera::setCamera(), and QGstreamerCamera::setCameraFormat().

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

◆ getRequestPad()

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

Definition at line 876 of file qgst.cpp.

References element(), and QGstPointerImpl::QGstObjectWrapper< GstObject >::HasRef.

Referenced by QGstreamerMediaEncoder::record().

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

◆ isStateLocked()

bool QGstElement::isStateLocked ( ) const

Definition at line 947 of file qgst.cpp.

References element().

+ Here is the call graph for this function:

◆ lockState()

void QGstElement::lockState ( bool locked)

Definition at line 942 of file qgst.cpp.

References element().

+ Here is the call graph for this function:

◆ onNoMorePads()

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

Definition at line 609 of file qgst_p.h.

References connect().

+ Here is the call graph for this function:

◆ onPadAdded()

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

Definition at line 581 of file qgst_p.h.

References connect().

Referenced by QGstreamerMediaPlayer::setMedia().

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

◆ onPadRemoved()

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

Definition at line 595 of file qgst_p.h.

References connect().

Referenced by QGstreamerMediaPlayer::setMedia().

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

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

References element(), and QGstPad::pad().

+ Here is the call graph for this function:

◆ sendEos()

void QGstElement::sendEos ( ) const

Definition at line 957 of file qgst.cpp.

References sendEvent().

Referenced by QGstreamerMediaEncoder::stop().

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

◆ sendEvent()

void QGstElement::sendEvent ( GstEvent * event) const

Definition at line 952 of file qgst.cpp.

References element().

Referenced by sendEos().

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

◆ setBaseTime()

void QGstElement::setBaseTime ( GstClockTime time) const

Definition at line 967 of file qgst.cpp.

References element(), and time.

+ Here is the call graph for this function:

◆ setState()

GstStateChangeReturn QGstElement::setState ( GstState state)

Definition at line 905 of file qgst.cpp.

References element(), and state.

Referenced by qt_gst_element_is_functioning(), and QGstreamerMediaCapture::setAudioInput().

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

◆ setStateSync()

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

Definition at line 910 of file qgst.cpp.

References element(), QGstObject::name(), qWarning, and state.

Referenced by QGstreamerAudioInput::~QGstreamerAudioInput(), QGstreamerAudioOutput::~QGstreamerAudioOutput(), QGstreamerCamera::~QGstreamerCamera(), QGstreamerImageCapture::~QGstreamerImageCapture(), QGstreamerMediaCapture::~QGstreamerMediaCapture(), QGstreamerMediaEncoder::~QGstreamerMediaEncoder(), QGstreamerMediaPlayer::~QGstreamerMediaPlayer(), QGstreamerVideoOutput::~QGstreamerVideoOutput(), QGstreamerMediaCapture::setAudioInput(), and QGstreamerMediaPlayer::setMedia().

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

◆ sink()

QGstPad QGstElement::sink ( ) const

Definition at line 871 of file qgst.cpp.

References staticPad().

Referenced by QGstreamerMediaCapture::unlinkEncoder().

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

◆ src()

QGstPad QGstElement::src ( ) const

Definition at line 866 of file qgst.cpp.

References staticPad().

Referenced by QGstreamerMediaCapture::unlinkEncoder().

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

◆ state()

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

Definition at line 890 of file qgst.cpp.

References element(), Q_UNLIKELY, qWarning, and state.

Referenced by QGstreamerMediaPlayer::setActiveTrack().

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

◆ staticPad()

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

Definition at line 861 of file qgst.cpp.

References element(), and QGstPointerImpl::QGstObjectWrapper< GstObject >::HasRef.

Referenced by QGstreamerVideoOverlay::~QGstreamerVideoOverlay(), QGstreamerVideoOutput::flushSubtitles(), QGstreamerImageCapture::probeBuffer(), QGstreamerMediaCapture::setAudioInput(), QGstreamerMediaCapture::setAudioOutput(), QGstreamerMediaCapture::setImageCapture(), QGstreamerVideoOverlay::setVideoSink(), sink(), and src().

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

◆ syncStateWithParent()

bool QGstElement::syncStateWithParent ( )

Definition at line 923 of file qgst.cpp.

References element(), and Q_ASSERT.

Referenced by QGstreamerMediaEncoder::record(), QGstreamerMediaCapture::setImageCapture(), and QGstreamerVideoOutput::setVideoSink().

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

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