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
qgst_p.h File Reference

(fb21f07dbcff016105c071962778fdaf466d4909)

#include <QtCore/qdebug.h>
#include <QtCore/qlist.h>
#include <QtCore/qmutex.h>
#include <QtCore/qsemaphore.h>
#include <QtMultimedia/qaudioformat.h>
#include <QtMultimedia/qvideoframe.h>
#include <QtMultimedia/private/qtmultimediaglobal_p.h>
#include <QtMultimedia/private/qmultimediautils_p.h>
#include <QtMultimedia/private/qplatformmediaplayer_p.h>
#include <QtMultimedia/private/qsharedhandle_p.h>
#include <gst/gst.h>
#include <gst/app/gstappsink.h>
#include <gst/app/gstappsrc.h>
#include <gst/video/video-info.h>
#include "qgst_handle_types_p.h"
#include <type_traits>
Include dependency graph for qgst_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QGstImpl::GstObjectTraits< T >
struct  QGstImpl::GstObjectTraits< GObject >
struct  QGRange< T >
struct  QGString
class  QGValue
class  QGstStructureView
struct  QSharedGstCapsTraits
class  QGstCaps
struct  QSharedGstObjectTraits
class  QGstObject
class  QGObjectHandlerConnection
class  QGObjectHandlerScopedConnection
class  QGstPad
class  QGstClock
class  QGstElement
class  QGstBin
class  QGstBaseSink
class  QGstBaseSrc
class  QGstAppSink
class  QGstAppSrc
struct  std::hash< QT_PREPEND_NAMESPACE(QGstElement)>

Namespaces

namespace  QGstImpl
namespace  std
 [33]

Macros

#define QGST_DEFINE_CAST_TRAITS(ClassName, MACRO_LABEL)
#define QGST_DEFINE_CAST_TRAITS_FOR_INTERFACE(ClassName, MACRO_LABEL)

Functions

 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstBin, BIN)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstClock, CLOCK)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstElement, ELEMENT)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstObject, OBJECT)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstPad, PAD)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstPipeline, PIPELINE)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstBaseSink, BASE_SINK)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstBaseSrc, BASE_SRC)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstAppSink, APP_SINK)
 QGstImpl::QGST_DEFINE_CAST_TRAITS (GstAppSrc, APP_SRC)
 QGstImpl::QGST_DEFINE_CAST_TRAITS_FOR_INTERFACE (GstTagSetter, TAG_SETTER)
template<typename DestinationType, typename SourceType>
bool qIsGstObjectOfType (SourceType *arg)
template<typename DestinationType, typename SourceType>
DestinationType * qGstSafeCast (SourceType *arg)
template<typename DestinationType, typename SourceType>
DestinationType * qGstCheckedCast (SourceType *arg)
template<typename... Ts>
std::enable_if_t<(std::is_base_of_v< QGstElement, Ts > &&...), voidqLinkGstElements (const Ts &...ts)
template<typename... Ts>
std::enable_if_t<(std::is_base_of_v< QGstElement, Ts > &&...), voidqUnlinkGstElements (const Ts &...ts)
GstClockTime qGstClockTimeFromChrono (std::chrono::nanoseconds ns)
QString qGstErrorMessageCannotFindElement (std::string_view element)
template<typename Arg, typename... Args>
std::optional< QStringqGstErrorMessageIfElementsNotAvailable (const Arg &arg, Args... args)
template<typename Functor>
void qForeachStreamInCollection (GstStreamCollection *collection, Functor &&f)
template<typename Functor>
void qForeachStreamInCollection (const QGstStreamCollectionHandle &collection, Functor &&f)

Macro Definition Documentation

◆ QGST_DEFINE_CAST_TRAITS

#define QGST_DEFINE_CAST_TRAITS ( ClassName,
MACRO_LABEL )
Value:
template <> \
struct GstObjectTraits<ClassName> \
{ \
using Type = ClassName; \
template <typename U> \
static bool isObjectOfType(U *arg) \
{ \
return GST_IS_##MACRO_LABEL(arg); \
} \
template <typename U> \
static Type *cast(U *arg) \
{ \
return GST_##MACRO_LABEL##_CAST(arg); \
} \
template <typename U> \
static Type *checked_cast(U *arg) \
{ \
return GST_##MACRO_LABEL(arg); \
} \
}; \
static_assert(true, "ensure semicolon")
constexpr Dst checked_cast(Src value)
SSL_CTX int void * arg
Type
[0]
Definition moc.h:33

Definition at line 63 of file qgst_p.h.

◆ QGST_DEFINE_CAST_TRAITS_FOR_INTERFACE

#define QGST_DEFINE_CAST_TRAITS_FOR_INTERFACE ( ClassName,
MACRO_LABEL )
Value:
template <> \
struct GstObjectTraits<ClassName> \
{ \
using Type = ClassName; \
template <typename U> \
static bool isObjectOfType(U *arg) \
{ \
return GST_IS_##MACRO_LABEL(arg); \
} \
template <typename U> \
static Type *cast(U *arg) \
{ \
return checked_cast(arg); \
} \
template <typename U> \
static Type *checked_cast(U *arg) \
{ \
return GST_##MACRO_LABEL(arg); \
} \
}; \
static_assert(true, "ensure semicolon")

Definition at line 86 of file qgst_p.h.

Function Documentation

◆ qForeachStreamInCollection() [1/2]

template<typename Functor>
void qForeachStreamInCollection ( const QGstStreamCollectionHandle & collection,
Functor && f )

Definition at line 970 of file qgst_p.h.

◆ qForeachStreamInCollection() [2/2]

template<typename Functor>
void qForeachStreamInCollection ( GstStreamCollection * collection,
Functor && f )

Definition at line 962 of file qgst_p.h.

◆ qGstCheckedCast()

template<typename DestinationType, typename SourceType>
DestinationType * qGstCheckedCast ( SourceType * arg)

Definition at line 166 of file qgst_p.h.

◆ qGstClockTimeFromChrono()

GstClockTime qGstClockTimeFromChrono ( std::chrono::nanoseconds ns)
inline

Definition at line 941 of file qgst_p.h.

◆ qGstErrorMessageCannotFindElement()

QString qGstErrorMessageCannotFindElement ( std::string_view element)

Definition at line 1539 of file qgst.cpp.

◆ qGstErrorMessageIfElementsNotAvailable()

template<typename Arg, typename... Args>
std::optional< QString > qGstErrorMessageIfElementsNotAvailable ( const Arg & arg,
Args... args )

Definition at line 949 of file qgst_p.h.

◆ qGstSafeCast()

template<typename DestinationType, typename SourceType>
DestinationType * qGstSafeCast ( SourceType * arg)

Definition at line 157 of file qgst_p.h.

◆ qIsGstObjectOfType()

template<typename DestinationType, typename SourceType>
bool qIsGstObjectOfType ( SourceType * arg)

Definition at line 150 of file qgst_p.h.

◆ qLinkGstElements()

template<typename... Ts>
std::enable_if_t<(std::is_base_of_v< QGstElement, Ts > &&...), void > qLinkGstElements ( const Ts &... ts)

Definition at line 773 of file qgst_p.h.

◆ qUnlinkGstElements()

template<typename... Ts>
std::enable_if_t<(std::is_base_of_v< QGstElement, Ts > &&...), void > qUnlinkGstElements ( const Ts &... ts)

Definition at line 792 of file qgst_p.h.