[vlc-commits] [Git][videolan/libvlcpp][master] 2 commits: EventManager: Rename MediaPlayer::onEndReached -> onStopping

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Mon Mar 14 07:29:03 UTC 2022



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


Commits:
4a9d2822 by Hugo Beauzée-Luyssen at 2022-03-14T08:10:13+01:00
EventManager: Rename MediaPlayer::onEndReached -> onStopping

- - - - -
3f6cc938 by Hugo Beauzée-Luyssen at 2022-03-14T08:27:47+01:00
CI: Bump unstable image

- - - - -


2 changed files:

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


Changes:

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


=====================================
vlcpp/EventManager.hpp
=====================================
@@ -547,6 +547,17 @@ class MediaPlayerEventManager : public EventManager
             return handle( libvlc_MediaPlayerBackward, std::forward<Func>( f ) );
         }
 
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+        /**
+         * \brief onStopping Registers an event called when the media player begin stopping.
+         * \param f A std::function<void(void)> (or an equivalent Callable type)
+         */
+        template <typename Func>
+        RegisteredEvent onStopping(Func&& f)
+        {
+            return handle( libvlc_MediaPlayerStopping, std::forward<Func>( f ) );
+        }
+#else
         /**
          * \brief onEndReached Registers an event called when the media player reaches the end of a media
          * \param f A std::function<void(void)> (or an equivalent Callable type)
@@ -556,7 +567,7 @@ class MediaPlayerEventManager : public EventManager
         {
             return handle( libvlc_MediaPlayerEndReached, std::forward<Func>( f ) );
         }
-
+#endif
         /**
          * \brief onEncounteredError Registers an event called when the media player reaches encounters an error
          * \param f A std::function<void(void)> (or an equivalent Callable type)



View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/2fe8b1c96c24b828183e1bf72a7781b6b022c5fa...3f6cc938c237bd3be79e66bbe8400f8b62a7ad50

-- 
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/-/compare/2fe8b1c96c24b828183e1bf72a7781b6b022c5fa...3f6cc938c237bd3be79e66bbe8400f8b62a7ad50
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