]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc_media_list_player.h
vlc_memalign(): osx 10.5 doesn't have posix_memalign()
[vlc] / include / vlc / libvlc_media_list_player.h
index e8d39aafdec02ef862ca9583ad89bc1a854baf40..58c0fd4c55cfb40c3451d67244555ee83dade2e9 100644 (file)
@@ -36,10 +36,13 @@ extern "C" {
 /*****************************************************************************
  * Media List Player
  *****************************************************************************/
-/** \defgroup libvlc_media_list_player libvlc_media_list_player
+/** \defgroup libvlc_media_list_player LibVLC media list player
  * \ingroup libvlc
- * LibVLC Media List Player, play a media_list. You can see that as a media
- * instance subclass
+ * The LibVLC media list player plays a @ref libvlc_media_list_t list of media,
+ * in a certain order.
+ * This is required to especially support playlist files.
+ * The normal @ref libvlc_media_player_t LibVLC media player can only play a
+ * single media, and does not handle playlist files properly.
  * @{
  */
 
@@ -61,23 +64,37 @@ typedef enum libvlc_playback_mode_t
  * \param p_instance libvlc instance
  * \return media list player instance or NULL on error
  */
-VLC_PUBLIC_API libvlc_media_list_player_t *
+LIBVLC_API libvlc_media_list_player_t *
     libvlc_media_list_player_new( libvlc_instance_t * p_instance );
 
 /**
- * Release media_list_player.
+ * Release a media_list_player after use
+ * Decrement the reference count of a media player object. If the
+ * reference count is 0, then libvlc_media_list_player_release() will
+ * release the media player object. If the media player object
+ * has been released, then it should not be used again.
  *
  * \param p_mlp media list player instance
  */
-VLC_PUBLIC_API void
+LIBVLC_API void
     libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
 
+/**
+ * Retain a reference to a media player list object. Use
+ * libvlc_media_list_player_release() to decrement reference count.
+ *
+ * \param p_mlp media player list object
+ */
+LIBVLC_API void
+    libvlc_media_list_player_retain( libvlc_media_list_player_t *p_mlp );
+
 /**
  * Return the event manager of this media_list_player.
  *
  * \param p_mlp media list player instance
+ * \return the event manager
  */
-VLC_PUBLIC_API libvlc_event_manager_t *
+LIBVLC_API libvlc_event_manager_t *
     libvlc_media_list_player_event_manager(libvlc_media_list_player_t * p_mlp);
 
 /**
@@ -86,12 +103,18 @@ VLC_PUBLIC_API libvlc_event_manager_t *
  * \param p_mlp media list player instance
  * \param p_mi media player instance
  */
-VLC_PUBLIC_API void
+LIBVLC_API void
     libvlc_media_list_player_set_media_player(
                                      libvlc_media_list_player_t * p_mlp,
                                      libvlc_media_player_t * p_mi );
 
-VLC_PUBLIC_API void
+/**
+ * Set the media list associated with the player
+ *
+ * \param p_mlp media list player instance
+ * \param p_mlist list of media
+ */
+LIBVLC_API void
     libvlc_media_list_player_set_media_list(
                                      libvlc_media_list_player_t * p_mlp,
                                      libvlc_media_list_t * p_mlist );
@@ -101,7 +124,7 @@ VLC_PUBLIC_API void
  *
  * \param p_mlp media list player instance
  */
-VLC_PUBLIC_API
+LIBVLC_API
 void libvlc_media_list_player_play(libvlc_media_list_player_t * p_mlp);
 
 /**
@@ -109,7 +132,7 @@ void libvlc_media_list_player_play(libvlc_media_list_player_t * p_mlp);
  *
  * \param p_mlp media list player instance
  */
-VLC_PUBLIC_API
+LIBVLC_API
 void libvlc_media_list_player_pause(libvlc_media_list_player_t * p_mlp);
 
 /**
@@ -117,8 +140,10 @@ void libvlc_media_list_player_pause(libvlc_media_list_player_t * p_mlp);
  *
  * \param p_mlp media list player instance
  * \return true for playing and false for not playing
+ *
+ * \libvlc_return_bool
  */
-VLC_PUBLIC_API int
+LIBVLC_API int
     libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp );
 
 /**
@@ -127,7 +152,7 @@ VLC_PUBLIC_API int
  * \param p_mlp media list player instance
  * \return libvlc_state_t for media list player
  */
-VLC_PUBLIC_API libvlc_state_t
+LIBVLC_API libvlc_state_t
     libvlc_media_list_player_get_state( libvlc_media_list_player_t * p_mlp );
 
 /**
@@ -137,11 +162,18 @@ VLC_PUBLIC_API libvlc_state_t
  * \param i_index index in media list to play
  * \return 0 upon success -1 if the item wasn't found
  */
-VLC_PUBLIC_API
+LIBVLC_API
 int libvlc_media_list_player_play_item_at_index(libvlc_media_list_player_t * p_mlp,
                                                 int i_index);
 
-VLC_PUBLIC_API
+/**
+ * Play the given media item
+ *
+ * \param p_mlp media list player instance
+ * \param p_md the media instance
+ * \return 0 upon success, -1 if the media is not part of the media list
+ */
+LIBVLC_API
 int libvlc_media_list_player_play_item(libvlc_media_list_player_t * p_mlp,
                                        libvlc_media_t * p_md);
 
@@ -150,7 +182,7 @@ int libvlc_media_list_player_play_item(libvlc_media_list_player_t * p_mlp,
  *
  * \param p_mlp media list player instance
  */
-VLC_PUBLIC_API void
+LIBVLC_API void
     libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp);
 
 /**
@@ -159,7 +191,7 @@ VLC_PUBLIC_API void
  * \param p_mlp media list player instance
  * \return 0 upon success -1 if there is no next item
  */
-VLC_PUBLIC_API
+LIBVLC_API
 int libvlc_media_list_player_next(libvlc_media_list_player_t * p_mlp);
 
 /**
@@ -168,7 +200,7 @@ int libvlc_media_list_player_next(libvlc_media_list_player_t * p_mlp);
  * \param p_mlp media list player instance
  * \return 0 upon success -1 if there is no previous item
  */
-VLC_PUBLIC_API
+LIBVLC_API
 int libvlc_media_list_player_previous(libvlc_media_list_player_t * p_mlp);
 
 
@@ -179,7 +211,7 @@ int libvlc_media_list_player_previous(libvlc_media_list_player_t * p_mlp);
  * \param p_mlp media list player instance
  * \param e_mode playback mode specification
  */
-VLC_PUBLIC_API
+LIBVLC_API
 void libvlc_media_list_player_set_playback_mode(libvlc_media_list_player_t * p_mlp,
                                                 libvlc_playback_mode_t e_mode );