[vlc-commits] [Git][videolan/libvlcpp][master] MediaPlayer: adapt with recent LibVLC changes

Thomas Guillem (@tguillem) gitlab at videolan.org
Tue Dec 13 11:58:35 UTC 2022



Thomas Guillem pushed to branch master at VideoLAN / libvlcpp


Commits:
0116906d by Thomas Guillem at 2022-12-13T11:44:32+01:00
MediaPlayer: adapt with recent LibVLC changes

Replace libvlc_audio_XXX_channel with libvlc_audio_XXX_stereomode

The values come from an enum and are mostly compatible with older values.

Add mixMode/setMixMode functions.

- - - - -


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:20220727093032
+  VLC40_IMAGE: registry.videolan.org/libvlcpp-unstable:20221213095400
 
 .common_build:
   rules:


=====================================
vlcpp/MediaPlayer.hpp
=====================================
@@ -1032,7 +1032,6 @@ public:
     {
         return libvlc_audio_set_track(*this, i_track) == 0;
     }
-#endif
 
     /**
      * Get current audio channel.
@@ -1057,6 +1056,47 @@ public:
     {
         return libvlc_audio_set_channel(*this, channel) == 0;
     }
+#else // libvlc 4.0
+    /**
+     * Get current audio stereo mode.
+     *
+     * \return the audio stereo mode
+     */
+    libvlc_audio_output_stereomode_t stereoMode()
+    {
+        return libvlc_audio_get_stereomode(*this);
+    }
+
+    /**
+     * Set current audio stereo mode.
+     *
+     * \param mode the audio stereo mode
+     */
+    bool setStereoMode(libvlc_audio_output_stereomode_t mode)
+    {
+        return libvlc_audio_set_stereomode(*this, mode) == 0;
+    }
+
+    /**
+     * Get current audio mix mode.
+     *
+     * \return the audio mix mode
+     */
+    libvlc_audio_output_mixmode_t mixMode()
+    {
+        return libvlc_audio_get_mixmode(*this);
+    }
+
+    /**
+     * Set current audio mix mode.
+     *
+     * \param mode the audio mix mode
+     */
+    bool setMixMode(libvlc_audio_output_mixmode_t mode)
+    {
+        return libvlc_audio_set_mixmode(*this, mode) == 0;
+    }
+#endif // libvlc 4.0
 
     /**
      * Get current audio delay.



View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/0116906d78ef4d8a02c38ff51e83cfb48923a017

-- 
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/commit/0116906d78ef4d8a02c38ff51e83cfb48923a017
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