[vlc-commits] [Git][videolan/vlc][master] qt: introduce setting `qt-pip-mode`

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Feb 1 10:38:22 UTC 2025



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
80868bba by Fatih Uzunoglu at 2025-02-01T10:14:38+00:00
qt: introduce setting `qt-pip-mode`

This setting allows disabling picture-in-picture mode.

- - - - -


2 changed files:

- modules/gui/qt/maininterface/compositor.cpp
- modules/gui/qt/qt.cpp


Changes:

=====================================
modules/gui/qt/maininterface/compositor.cpp
=====================================
@@ -271,7 +271,7 @@ bool CompositorVideo::commonGUICreateImpl(QWindow* window, CompositorVideo::Flag
     m_videoSurfaceProvider = std::make_unique<VideoSurfaceProvider>();
     m_mainCtx->setVideoSurfaceProvider(m_videoSurfaceProvider.get());
     const bool backendIsOpenVg = QQuickWindow::sceneGraphBackend() == QLatin1String("openvg");
-    if (!backendIsOpenVg && (flags & CompositorVideo::CAN_SHOW_PIP))
+    if (!backendIsOpenVg && (flags & CompositorVideo::CAN_SHOW_PIP) && var_InheritBool(m_intf, "qt-pip-mode"))
     {
         m_mainCtx->setCanShowVideoPIP(true);
     }


=====================================
modules/gui/qt/qt.cpp
=====================================
@@ -267,6 +267,9 @@ static void ShowDialog   ( intf_thread_t *, int, int, intf_dialog_args_t * );
 #define BACKDROP_BLUR_FILTER_LONGTEXT N_( "If backdrop blur filter is available, use translucency in the backgrounds of certain parts of the user interface " \
     "instead of a solid color. This setting impairs readibility of text." )
 
+#define PIP_MODE_TEXT N_( "Enable picture-in-picture (PiP) mode" )
+#define PIP_MODE_LONGTEXT N_( "Picture-in-picture mode allows playing video contained in a smaller area so that the interface remains usable." )
+
 static const int initial_prefs_view_list[] = { 0, 1, 2 };
 static const char *const initial_prefs_view_list_texts[] =
     { N_("Simple"), N_("Advanced"), N_("Expert") };
@@ -441,6 +444,8 @@ vlc_module_begin ()
 
     add_bool( "qt-backdrop-blur", true, BACKDROP_BLUR_FILTER_TEXT, BACKDROP_BLUR_FILTER_LONGTEXT )
 
+    add_bool( "qt-pip-mode", true, PIP_MODE_TEXT, PIP_MODE_LONGTEXT )
+
     add_float_with_range( "qt-safe-area", 0, 0, 100.0, SAFE_AREA_TEXT, SAFE_AREA_LONGTEXT )
 
     cannot_unload_broken_library()



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/80868bbae1d3acd4ba584fa7b99c4a35c929181b

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/80868bbae1d3acd4ba584fa7b99c4a35c929181b
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list