[vlc-commits] lib: add libvlc_media_list_player_set_pause

Thomas Guillem git at videolan.org
Fri Dec 8 16:32:11 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec  8 12:45:35 2017 +0100| [0e89b88b7b21cda1009512ce4f86964afafb0d5e] | committer: Thomas Guillem

lib: add libvlc_media_list_player_set_pause

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

 include/vlc/libvlc_media_list_player.h | 11 +++++++++++
 lib/media_list_player.c                |  8 ++++++++
 2 files changed, 19 insertions(+)

diff --git a/include/vlc/libvlc_media_list_player.h b/include/vlc/libvlc_media_list_player.h
index 57f5b8a41f..04f7d9b9f0 100644
--- a/include/vlc/libvlc_media_list_player.h
+++ b/include/vlc/libvlc_media_list_player.h
@@ -140,6 +140,17 @@ LIBVLC_API
 void libvlc_media_list_player_pause(libvlc_media_list_player_t * p_mlp);
 
 /**
+ * Pause or resume media list
+ *
+ * \param p_mlp media list player instance
+ * \param do_pause play/resume if zero, pause if non-zero
+ * \version LibVLC 3.0.0 or later
+ */
+LIBVLC_API
+void libvlc_media_list_player_set_pause(libvlc_media_list_player_t * p_mlp,
+                                        int do_pause);
+
+/**
  * Is media list playing?
  *
  * \param p_mlp media list player instance
diff --git a/lib/media_list_player.c b/lib/media_list_player.c
index 930b69061a..d73415b1b3 100644
--- a/lib/media_list_player.c
+++ b/lib/media_list_player.c
@@ -654,6 +654,14 @@ void libvlc_media_list_player_pause(libvlc_media_list_player_t * p_mlp)
     unlock(p_mlp);
 }
 
+void libvlc_media_list_player_set_pause(libvlc_media_list_player_t * p_mlp,
+                                        int do_pause)
+{
+    lock(p_mlp);
+    libvlc_media_player_set_pause(p_mlp->p_mi, do_pause);
+    unlock(p_mlp);
+}
+
 /**************************************************************************
  *        is_playing (Public)
  **************************************************************************/



More information about the vlc-commits mailing list