Fix handling of preferred/compatible pixel formats with EGLRenderer and VAAPI/DRM backends
This commit is contained in:
parent
76e81fa651
commit
c3895f06c0
7 changed files with 47 additions and 42 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue