3#include <QtCore/QCoreApplication>
21extern "C" void qgc_gst_android_set_jni_state(JavaVM* javaVm, jobject context, jobject classLoader);
31#ifdef QGC_HAS_ANY_GPU_PATH
32 constexpr bool gpuVideoPath =
true;
34 constexpr bool gpuVideoPath =
false;
36 return {.streaming =
true, .pipelineSettings =
true, .gpuVideoPath = gpuVideoPath, .asyncInit =
true};
51 qCWarning(GStreamerVideoBackendLog) <<
"Environment prepared again after GStreamer setup started";
55 (void) _state.compare_exchange_strong(expected,
State::Prepared, std::memory_order_acq_rel);
67 qCWarning(GStreamerVideoBackendLog) <<
"Initializing GStreamer without preparing its environment";
79 return QCoreApplication::translate(
"GStreamerVideoBackend",
80 "GStreamer failed to initialize, so video streams are played by Qt Multimedia "
81 "instead. The application log has the details.");
87 qCWarning(GStreamerVideoBackendLog) <<
"GStreamer self-test skipped: GStreamer isn't initialized";
114 [[maybe_unused]]
void* classLoader)
117 qgc_gst_android_set_jni_state(
static_cast<JavaVM*
>(javaVm),
static_cast<jobject
>(appContext),
118 static_cast<jobject
>(classLoader));
#define QGC_LOGGING_CATEGORY(name, categoryStr)
VideoDecoderOption
The decoders VideoSettings' forceVideoDecoder can force. The values are persisted.
void setDebugLevel(int level) override
Capabilities capabilities() const override
void configureQtGraphics(bool softwareRendering) override
void onMainWindowReady(QQuickWindow *window) override
bool selfTest() override
GStreamer::SelfTest::run() once initialized; false, logged, otherwise.
void applyDecoderPriorities(VideoDecoderOption option) override
QString initFailureMessage() const override
What to tell the user once initialize() has failed: what failed, and what plays the streams instead.
QList< VideoDecoderOption > availableDecoderFamilies() override
The hardware decoder families present, as forceVideoDecoder values (never Default or Software).
@ Prepared
The environment is set up for gst_init().
@ Initialized
GStreamer runs, with the plugins video needs.
@ Failed
initialize() failed; Qt Multimedia plays the streams.
bool initialize(const InitParams ¶ms) override
GStreamer::initialize() the first time; afterwards that call's outcome.
void setAndroidJniState(void *javaVm, void *appContext, void *classLoader) override
EnvPrepResult prepareEnvironment() override
Points GStreamer at its plugins, scanner and registry (GStreamer::Environment::prepareEnvironment()).
VideoReceiver * createReceiver(QObject *parent) override
A receiver that can play: once initialize() has failed, one that needs no initialization.
Also logs the receiver's worker, its PipelineSession with the branches, and PipelineDotDumper.
BundledRuntime bundledRuntime()
The bundled runtime the last prepareEnvironment() applied; empty before it ran.
VideoBackend::EnvPrepResult prepareEnvironment(const QString &appDir)
bool run(const Environment::BundledRuntime &runtime)
QList< VideoDecoderOption > availableDecoderFamilies()
void onMainWindowReady(QQuickWindow *window)
void setDebugLevel(int level)
void setCodecPriorities(VideoDecoderOption option)
DecoderRankApplier::apply() on the process's applier. GUI thread.
bool initialize(const VideoBackend::InitParams ¶ms)
void configureQtGraphics(bool softwareRendering)