Commit a80757cc authored by Sergey Radionov's avatar Sergey Radionov Committed by Jean-Baptiste Kempf

ActiveX: attach to vlc_player events

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent ce151324
......@@ -753,7 +753,6 @@ HRESULT VLCPlugin::onActivateInPlace(LPMSG, HWND hwndParent, LPCRECT lprcPosRect
if( get_autoplay() )
{
vlc_player::play(0);
fireOnPlayEvent();
}
}
......@@ -1243,6 +1242,24 @@ void VLCPlugin::set_player_window()
_WindowsManager.LibVlcAttach(vlc_player::get_mp());
}
void VLCPlugin::on_player_action(vlc_player_action_e pa)
{
switch(pa){
case pa_play:
fireOnPlayEvent();
break;
case pa_pause:
fireOnPauseEvent();
break;
case pa_stop:
fireOnStopEvent();
break;
case pa_next:
case pa_prev:
break;
}
}
void VLCPlugin::player_register_events()
{
libvlc_event_manager_t *eventManager = NULL;
......
......@@ -328,6 +328,7 @@ public:
}
protected:
void on_player_action(vlc_player_action_e);
virtual ~VLCPlugin();
......
......@@ -125,7 +125,6 @@ STDMETHODIMP VLCControl::put_Visible(VARIANT_BOOL isVisible)
STDMETHODIMP VLCControl::play(void)
{
_p_instance->playlist_play();
_p_instance->fireOnPlayEvent();
return S_OK;
};
......@@ -135,8 +134,7 @@ STDMETHODIMP VLCControl::pause(void)
HRESULT result = _p_instance->getMD(&p_md);
if( SUCCEEDED(result) )
{
libvlc_media_player_pause(p_md);
_p_instance->fireOnPauseEvent();
_p_instance->playlist_pause();
}
return result;
};
......@@ -147,8 +145,7 @@ STDMETHODIMP VLCControl::stop(void)
HRESULT result = _p_instance->getMD(&p_md);
if( SUCCEEDED(result) )
{
libvlc_media_player_stop(p_md);
_p_instance->fireOnStopEvent();
_p_instance->playlist_stop();
}
return result;
};
......
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