[vlc-commits] [Git][videolan/libvlcpp][master] Remove VLM event binding
Hugo Beauzée-Luyssen
gitlab at videolan.org
Mon Jul 16 20:40:17 CEST 2018
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / libvlcpp
Commits:
d1b6a901 by Hugo Beauzée-Luyssen at 2018-07-16T20:39:10+02:00
Remove VLM event binding
The actual API wasn't exposed, so let's not bother with having the event
available for 3.0
- - - - -
1 changed file:
- vlcpp/EventManager.hpp
Changes:
=====================================
vlcpp/EventManager.hpp
=====================================
--- a/vlcpp/EventManager.hpp
+++ b/vlcpp/EventManager.hpp
@@ -945,215 +945,6 @@ class MediaDiscovererEventManager : public EventManager
};
#endif
-/**
- * @brief The VLMEventManager class allows one to register VLM related events
- */
-class VLMEventManager : public EventManager
-{
- public:
- VLMEventManager(InternalPtr ptr) : EventManager(ptr) {}
-
- /**
- * \brief onMediaAdded Registers an event called when a media gets added
- * \param f A std::function<void(std::string)> (or an equivalent Callable type)
- * The given string is the name of the added media
- */
- template <typename Func>
- RegisteredEvent onMediaAdded( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string));
- return handle(libvlc_VlmMediaAdded, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "" );
- });
- }
-
- /**
- * \brief onMediaRemoved Registers an event called when a media gets removed
- * \param f A std::function<void(std::string)> (or an equivalent Callable type)
- * The given string is the name of the removed media
- */
- template <typename Func>
- RegisteredEvent onMediaRemoved( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string));
- return handle(libvlc_VlmMediaRemoved, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "" );
- });
- }
-
- /**
- * \brief onMediaChanged Registers an event called when a media changes
- * \param f A std::function<void(std::string)> (or an equivalent Callable type)
- * The given string is the name of the changed media
- */
- template <typename Func>
- RegisteredEvent onMediaChanged( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string));
- return handle(libvlc_VlmMediaChanged, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStarted Registers an event called when a media instance starts
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStarted( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStarted, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStopped Registers an event called when a media instance stops
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStopped( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStopped, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStatusInit Registers an event called when a media instance is initializing
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStatusInit( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStatusInit, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStatusOpening Registers an event called when a media instance is opening
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStatusOpening( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStatusOpening, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStatusPlaying Registers an event called when a media instance reaches playing state
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStatusPlaying( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStatusPlaying, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStatusPause Registers an event called when a media instance gets paused
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStatusPause( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStatusPause, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStatusEnd Registers an event called when a media instance ends
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStatusEnd( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStatusEnd, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-
- /**
- * \brief onMediaInstanceStatusError Registers an event called when a media instance encouters an error
- * \param f A std::function<void(std::string, std::string)> (or an equivalent Callable type)
- * Parameters are:
- * - The media name
- * - The instance name
- */
- template <typename Func>
- RegisteredEvent onMediaInstanceStatusError( Func&& f )
- {
- EXPECT_SIGNATURE(void(std::string, std::string));
- return handle(libvlc_VlmMediaInstanceStatusError, std::forward<Func>( f ), [](const libvlc_event_t* e, void* data)
- {
- auto callback = static_cast<DecayPtr<Func>>( data );
- (*callback)( e->u.vlm_media_event.psz_media_name ? e->u.vlm_media_event.psz_media_name : "",
- e->u.vlm_media_event.psz_instance_name ? e->u.vlm_media_event.psz_instance_name : "" );
- });
- }
-};
-
#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
/*
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/commit/d1b6a9019d2b4d6779280f4673401014949353f3
--
View it on GitLab: https://code.videolan.org/videolan/libvlcpp/commit/d1b6a9019d2b4d6779280f4673401014949353f3
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list