Force libmpv to use the "libmpv" video output (#1381)

Starting from version 0.38.0, libmpv stopped using the "libmpv" video
output ("vo" option) by default, which ends up causing mpv to spawn its
own, separate and detached window, instead of just embedding itself
onto RSS Guard's internal media player.

Upstream commit: 0e441525cf

Note: This option is only set when building RSS Guard with the
"MEDIAPLAYER_LIBMPV_OPENGL" option set to "ON", since local testing
showed it's not necessary otherwise.

Co-authored-by: martinrotter <martinrotter@users.noreply.github.com>
This commit is contained in:
Guilherme Silva 2024-04-19 02:48:41 -03:00 committed by GitHub
parent 2144c07b90
commit 024a31ef36
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -54,6 +54,11 @@ LibMpvBackend::LibMpvBackend(Application* app, QWidget* parent)
mpv_set_option_string(m_mpvHandle, "config", "yes");
mpv_set_option_string(m_mpvHandle, "script-opts", "osc-idlescreen=no");
mpv_set_option_string(m_mpvHandle, "hwdec", "auto");
#if defined(MEDIAPLAYER_LIBMPV_OPENGL)
mpv_set_option_string(m_mpvHandle, "vo", "libmpv");
#endif
mpv_set_option_string(m_mpvHandle, "osd-playing-msg", "${media-title}");
mpv_set_option_string(m_mpvHandle, "osc", "yes");
mpv_set_option_string(m_mpvHandle, "input-cursor", "yes");