[vlc-commits] Fix toggleTeletext in 2.2 builds
Hugo Beauzée-Luyssen
git at videolan.org
Tue May 23 18:08:37 CEST 2017
npapi-vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue May 23 18:07:20 2017 +0200| [be16cce606e26f60e1ca83a67a76bc71e7c07e96] | committer: Hugo Beauzée-Luyssen
Fix toggleTeletext in 2.2 builds
> https://code.videolan.org/videolan/npapi-vlc/commit/be16cce606e26f60e1ca83a67a76bc71e7c07e96
---
activex/vlccontrol2.cpp | 4 ++++
npapi/npruntime/npolibvlc.cpp | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp
index 6430d15..853948b 100644
--- a/activex/vlccontrol2.cpp
+++ b/activex/vlccontrol2.cpp
@@ -1272,11 +1272,15 @@ STDMETHODIMP VLCVideo::toggleFullscreen()
STDMETHODIMP VLCVideo::toggleTeletext()
{
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
if( _plug->get_player().get_mp().teletext() == -1 )
_plug->get_player().get_mp().setTeletext( 100 );
else
_plug->get_player().get_mp().setTeletext( -1 );
return S_OK;
+#else
+ _plug->get_player().get_mp().toggleTeletext();
+#endif
}
STDMETHODIMP VLCVideo::get_marquee(IVLCMarquee** obj)
diff --git a/npapi/npruntime/npolibvlc.cpp b/npapi/npruntime/npolibvlc.cpp
index d1eb027..55aa27e 100644
--- a/npapi/npruntime/npolibvlc.cpp
+++ b/npapi/npruntime/npolibvlc.cpp
@@ -1545,10 +1545,14 @@ LibvlcVideoNPObject::invoke(int index, const NPVariant *,
{
if( argCount == 0 )
{
+#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(3, 0, 0, 0)
if ( p_plugin->getMD().teletext() == -1 )
p_plugin->getMD().setTeletext( 100 );
else
p_plugin->getMD().setTeletext( -1 );
+#else
+ p_plugin->getMD().toggleTeletext();
+#endif
return INVOKERESULT_NO_ERROR;
}
return INVOKERESULT_NO_SUCH_METHOD;
More information about the vlc-commits
mailing list