[vlc-commits] media_list_player: implement MediaListPlayerStopped
Edward Wang
git at videolan.org
Sat Dec 29 13:03:33 CET 2012
vlc | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Fri Dec 28 21:19:35 2012 -0500| [198167d307d6e8c4628e60ad5d19f8e376db427c] | committer: Jean-Baptiste Kempf
media_list_player: implement MediaListPlayerStopped
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=198167d307d6e8c4628e60ad5d19f8e376db427c
---
lib/media_list_player.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/media_list_player.c b/lib/media_list_player.c
index 9af6578..d0a0ce1 100644
--- a/lib/media_list_player.c
+++ b/lib/media_list_player.c
@@ -470,7 +470,10 @@ libvlc_media_list_player_new(libvlc_instance_t * p_instance)
p_mlp->i_refcount = 1;
vlc_mutex_init(&p_mlp->object_lock);
vlc_mutex_init(&p_mlp->mp_callback_lock);
- libvlc_event_manager_register_event_type(p_mlp->p_event_manager, libvlc_MediaListPlayerNextItemSet);
+ libvlc_event_manager_register_event_type( p_mlp->p_event_manager,
+ libvlc_MediaListPlayerNextItemSet );
+ libvlc_event_manager_register_event_type( p_mlp->p_event_manager,
+ libvlc_MediaListPlayerStopped );
p_mlp->e_playback_mode = libvlc_playback_mode_default;
return p_mlp;
@@ -700,6 +703,11 @@ static void stop(libvlc_media_list_player_t * p_mlp)
free(p_mlp->current_playing_item_path);
p_mlp->current_playing_item_path = NULL;
+
+ /* Send the event */
+ libvlc_event_t event;
+ event.type = libvlc_MediaListPlayerStopped;
+ libvlc_event_send(p_mlp->p_event_manager, &event);
}
/**************************************************************************
More information about the vlc-commits
mailing list