Add config option to allow EGL usage when built with MMAL
This commit is contained in:
parent
905b2ecf9e
commit
9cba449092
3 changed files with 14 additions and 2 deletions
12
app/app.pro
12
app/app.pro
|
|
@ -286,6 +286,18 @@ mmal {
|
||||||
DEFINES += HAVE_MMAL
|
DEFINES += HAVE_MMAL
|
||||||
SOURCES += streaming/video/ffmpeg-renderers/mmal.cpp
|
SOURCES += streaming/video/ffmpeg-renderers/mmal.cpp
|
||||||
HEADERS += streaming/video/ffmpeg-renderers/mmal.h
|
HEADERS += streaming/video/ffmpeg-renderers/mmal.h
|
||||||
|
|
||||||
|
# We suppress EGL usage when MMAL is available because MMAL has
|
||||||
|
# significantly better performance than EGL on the Pi. Setting
|
||||||
|
# this option allows EGL usage even if built with MMAL support.
|
||||||
|
#
|
||||||
|
# It is highly recommended to also build with 'glslow' to avoid
|
||||||
|
# EGL being preferred if direct DRM rendering is available.
|
||||||
|
allow-egl-with-mmal {
|
||||||
|
message(Allowing EGL usage with MMAL enabled)
|
||||||
|
|
||||||
|
DEFINES += ALLOW_EGL_WITH_MMAL
|
||||||
|
}
|
||||||
}
|
}
|
||||||
libdrm {
|
libdrm {
|
||||||
message(DRM renderer selected)
|
message(DRM renderer selected)
|
||||||
|
|
|
||||||
|
|
@ -1239,7 +1239,7 @@ bool DrmRenderer::canExportEGL() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_MMAL
|
#if defined(HAVE_MMAL) && !defined(ALLOW_EGL_WITH_MMAL)
|
||||||
// EGL rendering is so slow on the Raspberry Pi 4 that we should basically
|
// EGL rendering is so slow on the Raspberry Pi 4 that we should basically
|
||||||
// never use it. It is suitable for 1080p 30 FPS on a good day, and much
|
// 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
|
// much less than that if you decide to do something crazy like stream
|
||||||
|
|
|
||||||
|
|
@ -1032,7 +1032,7 @@ bool FFmpegVideoDecoder::isDecoderIgnored(const AVCodec *decoder)
|
||||||
{
|
{
|
||||||
Q_UNUSED(decoder);
|
Q_UNUSED(decoder);
|
||||||
|
|
||||||
#ifdef HAVE_MMAL
|
#if defined(HAVE_MMAL) && !defined(ALLOW_EGL_WITH_MMAL)
|
||||||
// Only enable V4L2M2M by default on non-MMAL (RPi) builds. The performance
|
// Only enable V4L2M2M by default on non-MMAL (RPi) builds. The performance
|
||||||
// of the V4L2M2M wrapper around MMAL is not enough for 1080p 60 FPS, so we
|
// of the V4L2M2M wrapper around MMAL is not enough for 1080p 60 FPS, so we
|
||||||
// would rather show the missing hardware acceleration warning when the user
|
// would rather show the missing hardware acceleration warning when the user
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue