mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Avoid D3D9 fallback on lack of codec support unless a D3D11 FL11.0 GPU wasn't found
We'd rather not waste time (and risk crashes) loading the D3D9 driver if the GPU doesn't have the physical decoding hardware at all.
This commit is contained in:
@@ -128,6 +128,24 @@ public:
|
||||
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) = 0;
|
||||
virtual void renderFrame(AVFrame* frame) = 0;
|
||||
|
||||
enum class InitFailureReason
|
||||
{
|
||||
Unknown,
|
||||
|
||||
// Only return this reason code if the hardware physically lacks support for
|
||||
// the specified codec. If the FFmpeg decoder code sees this value, it will
|
||||
// assume trying additional hwaccel renderers will useless and give up.
|
||||
//
|
||||
// NB: This should only be used under very special circumstances for cases
|
||||
// where trying additional hwaccels may be undesirable since it could lead
|
||||
// to incorrectly skipping working hwaccels.
|
||||
NoHardwareSupport,
|
||||
};
|
||||
|
||||
virtual InitFailureReason getInitFailureReason() {
|
||||
return InitFailureReason::Unknown;
|
||||
}
|
||||
|
||||
// Called for threaded renderers to allow them to wait prior to us latching
|
||||
// the next frame for rendering (as opposed to waiting on buffer swap with
|
||||
// an older frame already queued for display).
|
||||
|
||||
Reference in New Issue
Block a user