#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 () |
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.
|
delete |
References DecoderRankApplier().
Referenced by DecoderRankApplier(), instance(), and operator=().
|
inline |
The option apply() last applied; nullopt before the first and after restore().
Definition at line 59 of file GStreamerDecoderRanks.h.
| void GStreamer::DecoderRankApplier::apply | ( | VideoDecoderOption | option | ) |
Restores the original ranks, then applies option's plan for the installed decoders on this platform.
Definition at line 220 of file GStreamerDecoderRanks.cc.
References apply(), GStreamer::RankPlan::changes, GStreamer::RankChange::feature, GStreamer::planRanks(), GStreamer::RankChange::rank, and GStreamer::RankPlan::warnings.
Referenced by apply(), reapply(), GStreamer::ScopedDecoderOption::ScopedDecoderOption(), GStreamer::setCodecPriorities(), and GStreamer::ScopedDecoderOption::~ScopedDecoderOption().
| 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().
|
static |
Definition at line 214 of file GStreamerDecoderRanks.cc.
References DecoderRankApplier(), and instance().
Referenced by GStreamer::changeFeatureRank(), GStreamer::demoteFailedDecoder(), instance(), GStreamer::onMainWindowReady(), GStreamer::ScopedDecoderOption::ScopedDecoderOption(), GStreamer::setCodecPriorities(), and GStreamer::ScopedDecoderOption::~ScopedDecoderOption().
|
delete |
References DecoderRankApplier().
| 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().
| 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().
| 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().