From 024a31ef36fe448ce671a0bcae40361410aa2ab4 Mon Sep 17 00:00:00 2001 From: Guilherme Silva <626206+guihkx@users.noreply.github.com> Date: Fri, 19 Apr 2024 02:48:41 -0300 Subject: [PATCH] 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: https://github.com/mpv-player/mpv/commit/0e441525cfc2c0d56b6d4a5fc67016d7e29d1b2c 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 --- src/librssguard/gui/mediaplayer/libmpv/libmpvbackend.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/librssguard/gui/mediaplayer/libmpv/libmpvbackend.cpp b/src/librssguard/gui/mediaplayer/libmpv/libmpvbackend.cpp index 1b78eca04..0e3e70558 100644 --- a/src/librssguard/gui/mediaplayer/libmpv/libmpvbackend.cpp +++ b/src/librssguard/gui/mediaplayer/libmpv/libmpvbackend.cpp @@ -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");