mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 22:50:57 +00:00
Fix handling of preferred/compatible pixel formats with EGLRenderer and VAAPI/DRM backends
This commit is contained in:
@@ -101,7 +101,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual enum AVPixelFormat getPreferredPixelFormat(int videoFormat) {
|
||||
virtual AVPixelFormat getPreferredPixelFormat(int videoFormat) {
|
||||
if (videoFormat == VIDEO_FORMAT_H265_MAIN10) {
|
||||
// 10-bit YUV 4:2:0
|
||||
return AV_PIX_FMT_P010;
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
virtual bool isPixelFormatSupported(int videoFormat, enum AVPixelFormat pixelFormat) {
|
||||
virtual bool isPixelFormatSupported(int videoFormat, AVPixelFormat pixelFormat) {
|
||||
// By default, we only support the preferred pixel format
|
||||
return getPreferredPixelFormat(videoFormat) == pixelFormat;
|
||||
}
|
||||
@@ -128,6 +128,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual AVPixelFormat getEGLImagePixelFormat() {
|
||||
return AV_PIX_FMT_NONE;
|
||||
}
|
||||
|
||||
virtual bool initializeEGL(EGLDisplay,
|
||||
const EGLExtensions &) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user