QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
VideoBackend Class Referenceabstract

#include <VideoBackend.h>

Inheritance diagram for VideoBackend:

Classes

struct  EnvPrepResult
struct  Capabilities
 What the backend offers. More...
struct  InitParams

Public Member Functions

virtual ~VideoBackend ()=default
 VideoBackend (const VideoBackend &)=delete
VideoBackend & operator= (const VideoBackend &)=delete
virtual Capabilities capabilities () const =0
virtual VideoReceiver * createReceiver (QObject *parent)=0
 A receiver that can play: once initialize() has failed, one that needs no initialization.
virtual void configureQtGraphics (bool softwareRendering)
virtual EnvPrepResult prepareEnvironment ()
 GUI thread, before initialize().
virtual bool initialize (const InitParams &params)
virtual QString initFailureMessage () const
 What to tell the user once initialize() has failed: what failed, and what plays the streams instead.
virtual bool selfTest ()
 The boot test's check that the initialized backend decodes and records.
virtual void applyDecoderPriorities (VideoDecoderOption option)
virtual QList< VideoDecoderOption > availableDecoderFamilies ()
 The hardware decoder families present, as forceVideoDecoder values (never Default or Software).
virtual void setDebugLevel (int level)
virtual void onMainWindowReady (QQuickWindow *window)
virtual void setAndroidJniState (void *javaVm, void *appContext, void *classLoader)

Static Public Member Functions

static VideoBackend & instance ()
static bool disabledForUnitTests ()
 True when the backend is skipped under unit tests (opt back in with QGC_TEST_ENABLE_GSTREAMER).
static std::optional< int > persistedDebugLevel ()
 The persisted gstDebugLevel setting, read before the settings system exists; nullopt when it was never set.

Protected Member Functions

 VideoBackend ()=default

Detailed Description

The network video backend this build has, behind which callers (VideoManager, VideoSettings, QGCCorePlugin, the platform startup code) never name a concrete one: GStreamer, or, without it, Qt Multimedia's player (QtMultimediaVideoReceiver), which a GStreamer build also offers through VideoSettings::videoBackend and falls back to when GStreamer fails to initialize.

Definition at line 20 of file VideoBackend.h.

Constructor & Destructor Documentation

◆ ~VideoBackend()

virtual VideoBackend::~VideoBackend ( )
virtualdefault

◆ VideoBackend() [1/2]

VideoBackend::VideoBackend ( const VideoBackend & )
delete

References VideoBackend().

Referenced by instance(), operator=(), and VideoBackend().

◆ VideoBackend() [2/2]

VideoBackend::VideoBackend ( )
protecteddefault

Member Function Documentation

◆ applyDecoderPriorities()

virtual void VideoBackend::applyDecoderPriorities ( VideoDecoderOption option)
inlinevirtual

Reimplemented in GStreamerVideoBackend.

Definition at line 91 of file VideoBackend.h.

◆ availableDecoderFamilies()

virtual QList< VideoDecoderOption > VideoBackend::availableDecoderFamilies ( )
inlinevirtual

The hardware decoder families present, as forceVideoDecoder values (never Default or Software).

Reimplemented in GStreamerVideoBackend.

Definition at line 94 of file VideoBackend.h.

Referenced by VideoSettings::pruneUnavailableDecoders().

◆ capabilities()

virtual Capabilities VideoBackend::capabilities ( ) const
pure virtual

◆ configureQtGraphics()

virtual void VideoBackend::configureQtGraphics ( bool softwareRendering)
inlinevirtual

Qt graphics setup the backend's GPU video paths need; call it before the QGuiApplication exists, as Qt reads it at startup. softwareRendering: the user asked for software rendering (–swrast), which it must keep.

Reimplemented in GStreamerVideoBackend.

Definition at line 78 of file VideoBackend.h.

Referenced by Platform::initialize().

◆ createReceiver()

virtual VideoReceiver * VideoBackend::createReceiver ( QObject * parent)
pure virtual

A receiver that can play: once initialize() has failed, one that needs no initialization.

Implemented in GStreamerVideoBackend.

Referenced by QGCCorePlugin::createVideoReceiver().

◆ disabledForUnitTests()

bool VideoBackend::disabledForUnitTests ( )
static

True when the backend is skipped under unit tests (opt back in with QGC_TEST_ENABLE_GSTREAMER).

Definition at line 38 of file VideoBackend.cc.

References qgcApp, and QGC::runningUnitTests().

Referenced by VideoManager::startVideoBackendInit().

◆ initFailureMessage()

QString VideoBackend::initFailureMessage ( ) const
virtual

What to tell the user once initialize() has failed: what failed, and what plays the streams instead.

Reimplemented in GStreamerVideoBackend.

Definition at line 43 of file VideoBackend.cc.

◆ initialize()

virtual bool VideoBackend::initialize ( const InitParams & params)
inlinevirtual

Reimplemented in GStreamerVideoBackend.

Definition at line 83 of file VideoBackend.h.

Referenced by VideoManager::startVideoBackendInit().

◆ instance()

◆ onMainWindowReady()

virtual void VideoBackend::onMainWindowReady ( QQuickWindow * window)
inlinevirtual

Reimplemented in GStreamerVideoBackend.

Definition at line 98 of file VideoBackend.h.

Referenced by VideoManager::init().

◆ operator=()

VideoBackend & VideoBackend::operator= ( const VideoBackend & )
delete

References VideoBackend().

◆ persistedDebugLevel()

std::optional< int > VideoBackend::persistedDebugLevel ( )
static

The persisted gstDebugLevel setting, read before the settings system exists; nullopt when it was never set.

Definition at line 48 of file VideoBackend.cc.

References SettingsGroup::settingsGroup().

Referenced by VideoManager::startVideoBackendInit().

◆ prepareEnvironment()

virtual EnvPrepResult VideoBackend::prepareEnvironment ( )
inlinevirtual

GUI thread, before initialize().

Reimplemented in GStreamerVideoBackend.

Definition at line 81 of file VideoBackend.h.

Referenced by VideoManager::startVideoBackendInit().

◆ selfTest()

virtual bool VideoBackend::selfTest ( )
inlinevirtual

The boot test's check that the initialized backend decodes and records.

Reimplemented in GStreamerVideoBackend.

Definition at line 89 of file VideoBackend.h.

Referenced by QGCApplication::init().

◆ setAndroidJniState()

virtual void VideoBackend::setAndroidJniState ( void * javaVm,
void * appContext,
void * classLoader )
inlinevirtual

Android: hands the backend the JavaVM, application context and class loader (jobject, or null) its plugins look up through JNI.

Reimplemented in GStreamerVideoBackend.

Definition at line 102 of file VideoBackend.h.

Referenced by JNI_OnLoad(), JNI_OnUnload(), and jniInit().

◆ setDebugLevel()

virtual void VideoBackend::setDebugLevel ( int level)
inlinevirtual

Reimplemented in GStreamerVideoBackend.

Definition at line 96 of file VideoBackend.h.

Referenced by VideoManager::init().


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