From 44c1f48e56a66c3f418175af1e1ef3fd1ab1b118 Mon Sep 17 00:00:00 2001 From: Alaric Senat <dev.asenat@posteo.net> Date: Sun, 4 Feb 2024 18:25:22 +0100 Subject: [PATCH] Remove interface spawning in 4.0 The possibility of spawning main interfaces after the start of libvlc was removed in VLC 4.0. Ref videolan/vlc!4865 --- test/main.cpp | 2 ++ vlcpp/Instance.hpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/test/main.cpp b/test/main.cpp index c079b8f..701c80c 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -45,9 +45,11 @@ int main(int ac, char** av) std::cout << "Found SD: " << sd.name() << "(" << sd.longName() << ")" << std::endl; #endif +#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0) instance.setExitHandler([] { std::cout << "Libvlc is exiting" << std::endl; }); +#endif instance.logSet([](int lvl, const libvlc_log_t*, std::string message ) { std::cout << "Hooked VLC log: " << lvl << ' ' << message << std::endl; diff --git a/vlcpp/Instance.hpp b/vlcpp/Instance.hpp index 843969f..b9200d0 100644 --- a/vlcpp/Instance.hpp +++ b/vlcpp/Instance.hpp @@ -144,6 +144,7 @@ public: } +#if LIBVLC_VERSION_INT < LIBVLC_VERSION(4, 0, 0, 0) /** * Try to start a user interface for the libvlc instance. * @@ -177,6 +178,7 @@ public: CallbackWrapper<(unsigned int)CallbackIdx::Exit, void(*)(void*)>::wrap( *m_callbacks, std::forward<ExitCb>( exitCb ) ), m_callbacks.get() ); } +#endif /** * Sets the application name. LibVLC passes this as the user agent string -- GitLab