Introduce a new FFMPEG frontend renderer: EGLRenderer
Right now this renderer works on X11 & Wayland with VAAPI as a backend. Some rendering latency benchmarks on my `i7-10510U` (with `intel-media-driver` 20.1.1 which cause a *huge* regression with the SDL_Renderer): | | X11 | Wayland | | Before | 6.78ms | 22.50ms | | EGLRenderer | 0.76ms | 00.77ms | Signed-off-by: Antoine Damhet <antoine.damhet@lse.epita.fr>
This commit is contained in:
parent
2aa18dc88f
commit
0a396f3112
11 changed files with 761 additions and 1 deletions
23
app/streaming/video/ffmpeg-renderers/egl_extensions.cpp
Normal file
23
app/streaming/video/ffmpeg-renderers/egl_extensions.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// vim: noai:ts=4:sw=4:softtabstop=4:expandtab
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#include "renderer.h"
|
||||
|
||||
#include <SDL_egl.h>
|
||||
|
||||
static QStringList egl_get_extensions(EGLDisplay dpy) {
|
||||
const auto EGLExtensionsStr = eglQueryString(dpy, EGL_EXTENSIONS);
|
||||
if (!EGLExtensionsStr) {
|
||||
SDL_LogWarn(SDL_LOG_CATEGORY_APPLICATION, "Unable to get EGL extensions");
|
||||
return QStringList();
|
||||
}
|
||||
return QString(EGLExtensionsStr).split(" ");
|
||||
}
|
||||
|
||||
EGLExtensions::EGLExtensions(EGLDisplay dpy) :
|
||||
m_Extensions(egl_get_extensions(dpy))
|
||||
{}
|
||||
|
||||
bool EGLExtensions::isSupported(const QString &extension) const {
|
||||
return m_Extensions.contains(extension);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue