[vlc-commits] lib: Fire libvlc_MediaListPlayerPlayed at end of playlist

Igor Prokopenkov git at videolan.org
Mon Oct 6 10:59:59 CEST 2014


vlc | branch: master | Igor Prokopenkov <cmyk777 at gmail.com> | Fri Oct  3 15:25:24 2014 +0000| [fd4a0ba83493bd91f2adb7b68ae9fb3c3d5fc972] | committer: 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: Igor Prokopenkov <cmyk777 at gmail.com>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fd4a0ba83493bd91f2adb7b68ae9fb3c3d5fc972
---

 lib/media_list_player.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/media_list_player.c b/lib/media_list_player.c
index d0a0ce1..9ac935a 100644
--- a/lib/media_list_player.c
+++ b/lib/media_list_player.c
@@ -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;
     }
 



More information about the vlc-commits mailing list