[vlc-commits] [Git][videolan/npapi-vlc][master] Fix build with VLC 4.0
Hugo Beauzée-Luyssen
gitlab at videolan.org
Wed May 29 14:47:40 CEST 2019
Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC Browser Plugins
Commits:
4eafcb16 by Hugo Beauzée-Luyssen at 2019-05-29T12:47:44Z
Fix build with VLC 4.0
- - - - -
5 changed files:
- activex/plugin.cpp
- activex/vlccontrol2.cpp
- npapi/npruntime/npolibvlc.cpp
- npapi/vlcplugin_base.cpp
- npapi/vlcplugin_gtk.cpp
Changes:
=====================================
activex/plugin.cpp
=====================================
@@ -793,7 +793,13 @@ BOOL VLCPlugin::getFullscreen()
HRESULT VLCPlugin::onInPlaceDeactivate(void)
{
if( m_player.mlp().isPlaying() )
+ {
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+ m_player.mlp().stopAsync();
+#else
m_player.mlp().stop();
+#endif
+ }
_WindowsManager.DestroyWindows();
=====================================
activex/vlccontrol2.cpp
=====================================
@@ -1079,7 +1079,11 @@ STDMETHODIMP VLCPlaylist::togglePause()
STDMETHODIMP VLCPlaylist::stop()
{
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+ _plug->get_player().mlp().stopAsync();
+#else
_plug->get_player().mlp().stop();
+#endif
return S_OK;
}
=====================================
npapi/npruntime/npolibvlc.cpp
=====================================
@@ -1011,7 +1011,11 @@ LibvlcPlaylistNPObject::invoke(int index, const NPVariant *args,
case ID_playlist_stop:
if( argCount == 0 )
{
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+ p_plugin->player().mlp().stopAsync();
+#else
p_plugin->player().mlp().stop();
+#endif
return INVOKERESULT_NO_ERROR;
}
return INVOKERESULT_NO_SUCH_METHOD;
=====================================
npapi/vlcplugin_base.cpp
=====================================
@@ -665,7 +665,11 @@ void VlcPluginBase::control_handler(vlc_toolbar_clicked_t clicked)
case clicked_Stop:
{
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+ player().get_mp().stopAsync();
+#else
player().get_mp().stop();
+#endif
}
break;
=====================================
npapi/vlcplugin_gtk.cpp
=====================================
@@ -326,7 +326,11 @@ gboolean VlcPluginGtk::update_time_slider(gpointer user_data)
static bool time_slider_handler(GtkRange*, GtkScrollType, gdouble value, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0)
+ plugin->getMD().setPosition( value / 100.0, true );
+#else
plugin->getMD().setPosition( value / 100.0 );
+#endif
return false;
}
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/4eafcb16f4513d5cf10d0c5bc4c388a0bfa7d91c
--
View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/4eafcb16f4513d5cf10d0c5bc4c388a0bfa7d91c
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list