6#include <QtCore/QThread>
7#include <QtQuick/QQuickWindow>
9#ifdef QGC_GST_STREAMING
19#ifdef QGC_GST_STREAMING
22bool d3d12ZeroCopyUnsupported()
24#if defined(Q_OS_WIN) && defined(QGC_HAS_GST_D3D12_GPU_PATH)
25 return QQuickWindow::graphicsApi() == QSGRendererInterface::Direct3D12 ||
26 qEnvironmentVariable(
"QSG_RHI_BACKEND").compare(QLatin1String(
"d3d12"), Qt::CaseInsensitive) == 0;
37#ifdef QGC_GST_STREAMING
38 return !forceCpuVideoPath && !forceSoftwareDecoder && !d3d12ZeroCopyUnsupported();
40 Q_UNUSED(forceCpuVideoPath);
41 Q_UNUSED(forceSoftwareDecoder);
48#ifdef QGC_GST_STREAMING
57 [[maybe_unused]]
const bool onGuiThread = (QThread::currentThread() ==
qApp->thread());
58 Q_ASSERT(onGuiThread);
59#ifdef QGC_GST_STREAMING
65 config.disablePixelAspectRatio = vs->disablePixelAspectRatio()->rawValue().toBool();
66 const bool forceCpu = vs->forceCpuVideoPath()->rawValue().toBool();
77#ifdef QGC_GST_STREAMING
91#ifdef QGC_GST_STREAMING
101#ifdef QGC_GST_STREAMING
112#ifdef QGC_GST_STREAMING
121#ifdef QGC_GST_STREAMING
130#ifdef QGC_GST_STREAMING
140#ifdef QGC_GST_STREAMING
A Fact is used to hold a single value within the system.
static SettingsManager * instance()
VideoSettings * videoSettings() const
void bindDebugLevelFact(Fact *fact, QObject *context)
void onMainWindowReady(QQuickWindow *window)
VideoReceiver * createVideoReceiver(QObject *parent)
void setCodecPriorities(int rawOption)
Overload taking the raw forceVideoDecoder setting value; the cast/range-check lives in the impl.
void releaseVideoSink(void *sink)
void * createVideoSink(const VideoSinkConfig &config)
bool initialize(const QStringList &arguments, const Environment::ValidationResult &envResult)
void attachAppSink(QObject *receiver, void *sink, QQuickItem *widget)
@ ForceVideoDecoderSoftware
Environment::ValidationResult prepareEnvironment()
EnvPrepResult prepareEnvironment()
bool initialize(const QStringList &arguments, const EnvPrepResult &envResult)
bool gpuZeroCopyAllowedForCurrentGraphicsApi(bool forceCpuVideoPath, bool forceSoftwareDecoder)
Applies backend-wide sink policy before constructing the GStreamer sink.
void applyDecoderPriorities(int rawOption)
void releaseSink(void *sink)
void attachSink(QObject *receiver, void *sink, QQuickItem *widget)
void onMainWindowReady(QQuickWindow *window)
bool disabledForUnitTests()
True when the backend should be skipped under unit tests (opt back in with QGC_TEST_ENABLE_GSTREAMER)...
void * createSink(QQuickItem *widget, QObject *parent)
VideoReceiver * createReceiver(QObject *parent)
void bindDebugLevelFact(Fact *fact, QObject *context)
QByteArray conversionElement