npapi-vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Mon Jul 2 13:46:56 2018 +0200| [52a8fbe36751606931682a72e949a2e0c3950078] | committer: Hugo Beauzée-Luyssen
Fix build with VLC 4.0 > https://code.videolan.org/videolan/npapi-vlc/commit/52a8fbe36751606931682a72e949a2e0c3950078 --- activex/plugin.cpp | 4 ++++ activex/vlccontrol2.cpp | 8 ++++++++ common/win32_fullscreen.cpp | 4 ++++ npapi/npruntime/npolibvlc.cpp | 8 ++++++++ 4 files changed, 24 insertions(+) diff --git a/activex/plugin.cpp b/activex/plugin.cpp index 6a4182a..3306301 100644 --- a/activex/plugin.cpp +++ b/activex/plugin.cpp @@ -764,7 +764,11 @@ void VLCPlugin::setTime(int seconds) if( seconds != _i_time ) { setStartTime(_i_time); +#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0) + m_player.get_mp().setTime( _i_time, true ); +#else m_player.get_mp().setTime( _i_time ); +#endif } } diff --git a/activex/vlccontrol2.cpp b/activex/vlccontrol2.cpp index 9e7cfb1..0eb6043 100644 --- a/activex/vlccontrol2.cpp +++ b/activex/vlccontrol2.cpp @@ -734,7 +734,11 @@ STDMETHODIMP VLCInput::get_position(double* position) STDMETHODIMP VLCInput::put_position(double position) { +#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0) + _plug->get_player().get_mp().setPosition( static_cast<float>(position), true ); +#else _plug->get_player().get_mp().setPosition( static_cast<float>(position) ); +#endif return S_OK; } @@ -751,7 +755,11 @@ STDMETHODIMP VLCInput::get_time(double* time) STDMETHODIMP VLCInput::put_time(double time) { +#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0) + _plug->get_player().get_mp().setTime(static_cast<libvlc_time_t>(time), true); +#else _plug->get_player().get_mp().setTime(static_cast<libvlc_time_t>(time)); +#endif return S_OK; } diff --git a/common/win32_fullscreen.cpp b/common/win32_fullscreen.cpp index 17160f0..bc4ee05 100644 --- a/common/win32_fullscreen.cpp +++ b/common/win32_fullscreen.cpp @@ -460,7 +460,11 @@ void VLCControlsWnd::NeedHideControls() void VLCControlsWnd::SetVideoPos(float Pos) //0-start, 1-end { if( VP() ){ +#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0) + VP()->get_mp().setPosition( Pos, true ); +#else VP()->get_mp().setPosition( Pos ); +#endif if( VP()->get_mp().length() > 0 ) PostMessage(hVideoPosScroll, (UINT)PBM_SETPOS, (WPARAM) (Pos * 1000), 0); diff --git a/npapi/npruntime/npolibvlc.cpp b/npapi/npruntime/npolibvlc.cpp index 87230d5..814bf8c 100644 --- a/npapi/npruntime/npolibvlc.cpp +++ b/npapi/npruntime/npolibvlc.cpp @@ -536,7 +536,11 @@ LibvlcInputNPObject::setProperty(int index, const NPVariant &value) return INVOKERESULT_INVALID_VALUE; } +#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0) + mp.setPosition( v, true ); +#else mp.setPosition( v ); +#endif return INVOKERESULT_NO_ERROR; } case ID_input_time: @@ -546,7 +550,11 @@ LibvlcInputNPObject::setProperty(int index, const NPVariant &value) return INVOKERESULT_INVALID_VALUE; } +#if LIBVLC_VERSION_INT >= LIBVLC_VERSION(4, 0, 0, 0) + mp.setTime( v, true ); +#else mp.setTime( v ); +#endif return INVOKERESULT_NO_ERROR; } case ID_input_rate: _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
