mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Prefer zero-copy formats for non-hwaccel hardware decoders
SpacemiT K1's BSP has a version of FFmpeg that contains both v4l2m2m and their own *_stcodec decoders. Not only is their V4L2 driver for their mvx decoder seemingly totally broken (output buffers are all zeros), but it doesn't have any of the DRM_PRIME support work that is maintained out of tree. The result is we use a broken copyback decoder instead of a (mostly) working zero-copy decoder because we didn't include any logic to rank non-hwaccel decoders by pixfmt like we have with device type for hwaccel decoders.
This commit is contained in:
@@ -48,6 +48,9 @@ private:
|
||||
static
|
||||
bool isDecoderIgnored(const AVCodec* decoder);
|
||||
|
||||
static
|
||||
bool isZeroCopyFormat(AVPixelFormat format);
|
||||
|
||||
static
|
||||
int getAVCodecCapabilities(const AVCodec *codec);
|
||||
|
||||
@@ -55,6 +58,10 @@ private:
|
||||
int pass,
|
||||
QSet<const AVCodec*>& terminallyFailedHardwareDecoders);
|
||||
|
||||
bool tryInitializeNonHwAccelDecoder(PDECODER_PARAMETERS params,
|
||||
bool requireZeroCopyFormat,
|
||||
QSet<const AVCodec*>& terminallyFailedHardwareDecoders);
|
||||
|
||||
bool tryInitializeRendererForUnknownDecoder(const AVCodec* decoder,
|
||||
PDECODER_PARAMETERS params,
|
||||
bool tryHwAccel);
|
||||
|
||||
Reference in New Issue
Block a user