[vlc-commits] [Git][videolan/libvlcpp][master] MediaPlayer: fix outputDeviceSet after libvlc API change

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Tue Feb 8 08:26:32 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp


Commits:
833d14aa by Steve Lhomme at 2022-02-08T09:24:49+01:00
MediaPlayer: fix outputDeviceSet after libvlc API change

The module parameter has been removed in
https://code.videolan.org/videolan/vlc/-/commit/fd34522193ae39a21b553f14e680037952731b91

So we just keep the outputDeviceSet() variant that didn't have the module
parameter.

Use a newer image of vlc 4.0 that has this API change.

- - - - -


2 changed files:

- .gitlab-ci.yml
- vlcpp/MediaPlayer.hpp


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -1,6 +1,6 @@
 variables:
   VLC30_IMAGE: registry.videolan.org/medialibrary:20201009131431
-  VLC40_IMAGE: registry.videolan.org/libvlcpp-unstable:20220121173942
+  VLC40_IMAGE: registry.videolan.org/libvlcpp-unstable:20220208081312
 
 .common_build:
   rules:


=====================================
vlcpp/MediaPlayer.hpp
=====================================
@@ -896,6 +896,12 @@ public:
      *
      * \return Nothing. Errors are ignored (this is a design bug).
      */
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+    void outputDeviceSet(const std::string& device_id)
+    {
+        libvlc_audio_output_device_set(*this, device_id.c_str());
+    }
+#else
     void outputDeviceSet(const std::string& module, const std::string& device_id)
     {
         libvlc_audio_output_device_set(*this, module.c_str(), device_id.c_str());
@@ -905,6 +911,8 @@ public:
     {
         libvlc_audio_output_device_set(*this, nullptr, device_id.c_str());
     }
+#endif
+
 
     /**
      * Toggle mute status.



View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/833d14aaa1eb8ead8f754d57665f01a6e77b4e07

-- 
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/833d14aaa1eb8ead8f754d57665f01a6e77b4e07
You're receiving this email because of your account on code.videolan.org.




More information about the vlc-commits mailing list