Commit 52a8fbe3 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fix build with VLC 4.0

parent 0ae26adb
......@@ -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
}
}
......
......@@ -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;
}
......
......@@ -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);
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment