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

(27035ca395d7b390631e72a9691bda9d1262467b)

#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  QGstVideoInfo
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 QT_GSTREAMER_SUPPORTS_GST_VIDEO_FORMAT_DMA_DRM   0
#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)
GstVideoFormat qGstVideoFormatFromPixelFormat (QVideoFrameFormat::PixelFormat format)
QVideoFrameFormat::PixelFormat qPixelFormatFromGstVideoFormat (GstVideoFormat format)
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)
QVideoFrameFormat qVideoFrameFormatFromGstVideoInfo (const QGstVideoInfo &vidInfo)
QGstCaps::MemoryFormat qMemoryFormatFromGstBuffer (GstBuffer *buffer)
QVideoFrame qCreateFrameFromGstBuffer (QGstBufferHandle buffer, const QGstVideoInfo &videoInfo)

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 69 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 92 of file qgst_p.h.

◆ QT_GSTREAMER_SUPPORTS_GST_VIDEO_FORMAT_DMA_DRM

#define QT_GSTREAMER_SUPPORTS_GST_VIDEO_FORMAT_DMA_DRM   0

Definition at line 38 of file qgst_p.h.

Function Documentation

◆ qCreateFrameFromGstBuffer()

QVideoFrame qCreateFrameFromGstBuffer ( QGstBufferHandle buffer,
const QGstVideoInfo & videoInfo )

Definition at line 1717 of file qgst.cpp.

◆ qForeachStreamInCollection() [1/2]

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

Definition at line 988 of file qgst_p.h.

◆ qForeachStreamInCollection() [2/2]

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

Definition at line 980 of file qgst_p.h.

◆ qGstCheckedCast()

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

Definition at line 172 of file qgst_p.h.

◆ qGstClockTimeFromChrono()

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

Definition at line 959 of file qgst_p.h.

◆ qGstErrorMessageCannotFindElement()

QString qGstErrorMessageCannotFindElement ( std::string_view element)

Definition at line 1600 of file qgst.cpp.

◆ qGstErrorMessageIfElementsNotAvailable()

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

Definition at line 967 of file qgst_p.h.

◆ qGstSafeCast()

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

Definition at line 163 of file qgst_p.h.

◆ qGstVideoFormatFromPixelFormat()

GstVideoFormat qGstVideoFormatFromPixelFormat ( QVideoFrameFormat::PixelFormat format)

Definition at line 104 of file qgst.cpp.

◆ qIsGstObjectOfType()

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

Definition at line 156 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 791 of file qgst_p.h.

◆ qMemoryFormatFromGstBuffer()

QGstCaps::MemoryFormat qMemoryFormatFromGstBuffer ( GstBuffer * buffer)

Definition at line 1698 of file qgst.cpp.

References QGstCaps::CpuMemory.

◆ qPixelFormatFromGstVideoFormat()

QVideoFrameFormat::PixelFormat qPixelFormatFromGstVideoFormat ( GstVideoFormat format)

Definition at line 113 of file qgst.cpp.

◆ qUnlinkGstElements()

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

Definition at line 810 of file qgst_p.h.

◆ qVideoFrameFormatFromGstVideoInfo()

QVideoFrameFormat qVideoFrameFormatFromGstVideoInfo ( const QGstVideoInfo & vidInfo)

Definition at line 1606 of file qgst.cpp.