diff --git a/modules/gui/qt/maininterface/compositor.cpp b/modules/gui/qt/maininterface/compositor.cpp index b67968d81f5b7f6fa683567ac120b38b54d52ee7..5bf40f0100a9522bd1c5b72e77e96b33ca64d342 100644 --- a/modules/gui/qt/maininterface/compositor.cpp +++ b/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); } diff --git a/modules/gui/qt/qt.cpp b/modules/gui/qt/qt.cpp index 1af89abf5664546e423845837e3c1728b4968103..81b5f2e30ff024032a21f439cd233cd4c1ebcbdb 100644 --- a/modules/gui/qt/qt.cpp +++ b/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()