[vlc-commits] libvlc media list player: add getter for player instance

Felix Paul Kühne git at videolan.org
Thu Sep 10 18:18:53 CEST 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Sep 10 13:43:36 2015 +0200| [688e3bcb4d05b8e3274b7e17aec90a70ac44d960] | committer: Felix Paul Kühne

libvlc media list player: add getter for player instance

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

 NEWS                                   |    1 +
 include/vlc/libvlc_media_list_player.h |   10 ++++++++++
 lib/libvlc.sym                         |    1 +
 lib/media_list_player.c                |   13 ++++++++++++-
 4 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 9f889ca..7167dd7 100644
--- a/NEWS
+++ b/NEWS
@@ -141,6 +141,7 @@ libVLC:
    This allows to attach media events between create and start.
  * Add libvlc_media_get_codec_description to get a human readable description of a codec
  * Add libvlc_MediaListEndReached Event to get notified when a media list reached the end
+ * Add libvlc_media_list_player_get_media_player to get the media player instance of a list player
  * Add libvlc_media_parse_with_options that uses a flag to specify parse options
  * Add libvlc_audio_output_device_get to get the currently selected audio output device
    identifier (if there is one available)
diff --git a/include/vlc/libvlc_media_list_player.h b/include/vlc/libvlc_media_list_player.h
index b85981d..57f5b8a 100644
--- a/include/vlc/libvlc_media_list_player.h
+++ b/include/vlc/libvlc_media_list_player.h
@@ -103,6 +103,16 @@ LIBVLC_API void
                                      libvlc_media_player_t * p_mi );
 
 /**
+ * Get media player of the media_list_player instance.
+ *
+ * \param p_mlp media list player instance
+ * \return media player instance
+ * \note the caller is responsible for releasing the returned instance
+ */
+LIBVLC_API libvlc_media_player_t *
+    libvlc_media_list_player_get_media_player(libvlc_media_list_player_t * p_mlp);
+
+/**
  * Set the media list associated with the player
  *
  * \param p_mlp media list player instance
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 487fcba..a7e814b 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -109,6 +109,7 @@ libvlc_media_list_lock
 libvlc_media_list_media
 libvlc_media_list_new
 libvlc_media_list_player_event_manager
+libvlc_media_list_player_get_media_player
 libvlc_media_list_player_get_state
 libvlc_media_list_player_is_playing
 libvlc_media_list_player_new
diff --git a/lib/media_list_player.c b/lib/media_list_player.c
index 44f75a0..a2c4875 100644
--- a/lib/media_list_player.c
+++ b/lib/media_list_player.c
@@ -1,10 +1,12 @@
 /*****************************************************************************
  * media_list_player.c: libvlc new API media_list player functions
  *****************************************************************************
- * Copyright (C) 2007 VLC authors and VideoLAN
+ * Copyright (C) 2007-2015 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
+ *          Niles Bindel <zaggal69 # gmail.com>
+ *          Rémi Denis-Courmont
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published by
@@ -601,6 +603,15 @@ void libvlc_media_list_player_set_media_player(libvlc_media_list_player_t * p_ml
 }
 
 /**************************************************************************
+ *        get_media_player (Public)
+ **************************************************************************/
+libvlc_media_player_t * libvlc_media_list_player_get_media_player(libvlc_media_list_player_t * p_mlp)
+{
+    libvlc_media_player_retain(p_mlp->p_mi);
+    return p_mlp->p_mi;
+}
+
+/**************************************************************************
  *       set_media_list (Public)
  **************************************************************************/
 void libvlc_media_list_player_set_media_list(libvlc_media_list_player_t * p_mlp, libvlc_media_list_t * p_mlist)



More information about the vlc-commits mailing list