Commit fd4a0ba8 authored by Igor Prokopenkov's avatar Igor Prokopenkov Committed by Jean-Baptiste Kempf

lib: Fire libvlc_MediaListPlayerPlayed at end of playlist

The "libvlc_MediaListPlayerPlayed" event was defined but unused.
It is now fired when libvlc_media_list_player is played until last item in the playlist
Signed-off-by: default avatarIgor Prokopenkov <cmyk777@gmail.com>
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 6893b7a4
......@@ -474,6 +474,8 @@ libvlc_media_list_player_new(libvlc_instance_t * p_instance)
libvlc_MediaListPlayerNextItemSet );
libvlc_event_manager_register_event_type( p_mlp->p_event_manager,
libvlc_MediaListPlayerStopped );
libvlc_event_manager_register_event_type( p_mlp->p_event_manager,
libvlc_MediaListPlayerPlayed );
p_mlp->e_playback_mode = libvlc_playback_mode_default;
return p_mlp;
......@@ -781,6 +783,10 @@ static int set_relative_playlist_position_and_play(
if (!path)
{
libvlc_media_list_unlock(p_mlp->p_mlist);
/* Send list played event */
libvlc_event_t event;
event.type = libvlc_MediaListPlayerPlayed;
libvlc_event_send(p_mlp->p_event_manager, &event);
return -1;
}
......
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