Force AV_CODEC_CAP_HARDWARE set for OMX decoders

There are at least 2 out-of-tree OMX decoder implementations
that both lack AV_CODEC_CAP_HARDWARE, so they trick us into
thinking that neither of them is hardware accelerated.

Fixes false decoder warnings when linked against the patched
FFmpeg builds shipping on VisionFive 2 and LicheePi 4A SBCs.
This commit is contained in:
Cameron Gutman 2024-07-05 23:04:10 -05:00
commit 34fa7167b1
2 changed files with 24 additions and 4 deletions

View file

@ -45,8 +45,12 @@ private:
bool createFrontendRenderer(PDECODER_PARAMETERS params, bool useAlternateFrontend);
static
bool isDecoderIgnored(const AVCodec* decoder);
static
int getAVCodecCapabilities(const AVCodec *codec);
bool tryInitializeHwAccelDecoder(PDECODER_PARAMETERS params,
int pass,
QSet<const AVCodec*>& terminallyFailedHardwareDecoders);