QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GStreamer::DecoderRankApplier Class Reference

#include <GStreamerDecoderRanks.h>

Public Member Functions

 DecoderRankApplier (const DecoderRankApplier &)=delete
DecoderRankApplier & operator= (const DecoderRankApplier &)=delete
void apply (VideoDecoderOption option)
 Restores the original ranks, then applies option's plan for the installed decoders on this platform.
void reapply ()
 apply() for the option applied last, when the platform's RankTraits changed since: Qt's device became known.
void restore ()
 Restores the original ranks.
std::optional< VideoDecoderOption > applied () const
 The option apply() last applied; nullopt before the first and after restore().
bool setRank (GstRegistry *registry, const char *featureName, uint16_t rank)
 Sets featureName's rank in registry. False when the registry or name is null or the feature is absent.
bool demoteFailedDecoder (const char *featureName, const GstCaps *caps)

Static Public Member Functions

static DecoderRankApplier & instance ()

Detailed Description

Applies decoder rank plans (planRanks()) to the default registry. It remembers the rank each feature had before QGC first changed it, so a new option starts over from those rather than adding to the previous one. A feature named in GST_PLUGIN_FEATURE_RANK keeps the user's rank. One per process, as the registry is. GUI thread, except demoteFailedDecoder().

Definition at line 43 of file GStreamerDecoderRanks.h.

Constructor & Destructor Documentation

◆ DecoderRankApplier()

GStreamer::DecoderRankApplier::DecoderRankApplier ( const DecoderRankApplier & )
delete

Member Function Documentation

◆ applied()

std::optional< VideoDecoderOption > GStreamer::DecoderRankApplier::applied ( ) const
inline

The option apply() last applied; nullopt before the first and after restore().

Definition at line 59 of file GStreamerDecoderRanks.h.

◆ apply()

void GStreamer::DecoderRankApplier::apply ( VideoDecoderOption option)

◆ demoteFailedDecoder()

bool GStreamer::DecoderRankApplier::demoteFailedDecoder ( const char * featureName,
const GstCaps * caps )

Takes the decoder featureName, which failed on a stream with caps, out of autoplug until the next apply() or restore(), so that the next decodebin3 plugs the decoder ranked after it. False, changing nothing, when no other autoplugged decoder takes caps or GST_PLUGIN_FEATURE_RANK names the decoder. Any thread.

Definition at line 264 of file GStreamerDecoderRanks.cc.

References demoteFailedDecoder().

Referenced by demoteFailedDecoder(), and GStreamer::demoteFailedDecoder().

◆ instance()

◆ operator=()

DecoderRankApplier & GStreamer::DecoderRankApplier::operator= ( const DecoderRankApplier & )
delete

References DecoderRankApplier().

◆ reapply()

void GStreamer::DecoderRankApplier::reapply ( )

apply() for the option applied last, when the platform's RankTraits changed since: Qt's device became known.

Definition at line 243 of file GStreamerDecoderRanks.cc.

References apply(), and reapply().

Referenced by GStreamer::onMainWindowReady(), and reapply().

◆ restore()

void GStreamer::DecoderRankApplier::restore ( )

Restores the original ranks.

Definition at line 250 of file GStreamerDecoderRanks.cc.

References restore().

Referenced by restore(), and GStreamer::ScopedDecoderOption::~ScopedDecoderOption().

◆ setRank()

bool GStreamer::DecoderRankApplier::setRank ( GstRegistry * registry,
const char * featureName,
uint16_t rank )

Sets featureName's rank in registry. False when the registry or name is null or the feature is absent.

Definition at line 258 of file GStreamerDecoderRanks.cc.

References setRank().

Referenced by GStreamer::changeFeatureRank(), and setRank().


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