From f99f1f644153ff06c39adf2392f1eeb2c6ab061a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 23 May 2022 23:05:07 -0500 Subject: [PATCH] Disable EGL renderer on RPi due to very poor performance --- app/streaming/video/ffmpeg-renderers/eglvid.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/streaming/video/ffmpeg-renderers/eglvid.cpp b/app/streaming/video/ffmpeg-renderers/eglvid.cpp index 464f0da0..efc7a07b 100644 --- a/app/streaming/video/ffmpeg-renderers/eglvid.cpp +++ b/app/streaming/video/ffmpeg-renderers/eglvid.cpp @@ -984,6 +984,17 @@ bool EGLRenderer::testRenderFrame(AVFrame* frame) { EGLImage imgs[EGL_MAX_PLANES]; +#ifdef HAVE_MMAL + // EGL rendering is so slow on the Raspberry Pi that we should basically + // never use it. It is suitable for 1080p 30 FPS on a good day, and much + // much less than that if you decide to do something crazy like stream + // in full-screen. It's nice that it at least works now on Bullseye, but + // it's so slow that we actually wish it didn't. + if (qgetenv("RPI_ALLOW_EGL_RENDER") != "1") { + return false; + } +#endif + // Make sure we can get working EGLImages from the backend renderer. // Some devices (Raspberry Pi) will happily decode into DRM formats that // its own GL implementation won't accept in eglCreateImage().