1 /*****************************************************************************
2 * libvlc_media_list.h: libvlc_media_list API
3 *****************************************************************************
4 * Copyright (C) 1998-2008 the VideoLAN team
7 * Authors: Pierre d'Herbemont
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #ifndef LIBVLC_MEDIA_LIST_PLAYER_H
25 #define LIBVLC_MEDIA_LIST_PLAYER_H 1
29 * This file defines libvlc_media_list_player API
36 /*****************************************************************************
38 *****************************************************************************/
39 /** \defgroup libvlc_media_list_player libvlc_media_list_player
41 * LibVLC Media List Player, play a media_list. You can see that as a media
46 typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
49 * Defines playback modes for playlist.
51 typedef enum libvlc_playback_mode_t
53 libvlc_playback_mode_default,
54 libvlc_playback_mode_loop,
55 libvlc_playback_mode_repeat
56 } libvlc_playback_mode_t;
59 * Create new media_list_player.
61 * \param p_instance libvlc instance
62 * \param p_e initialized exception instance
63 * \return media list player instance
65 VLC_PUBLIC_API libvlc_media_list_player_t *
66 libvlc_media_list_player_new( libvlc_instance_t * p_instance,
67 libvlc_exception_t * p_e );
70 * Release media_list_player.
72 * \param p_mlp media list player instance
75 libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
78 * Return the event manager of this media_list_player.
80 * \param p_mlp media list player instance
82 VLC_PUBLIC_API libvlc_event_manager_t *
83 libvlc_media_list_player_event_manager(libvlc_media_list_player_t * p_mlp);
86 * Replace media player in media_list_player with this instance.
88 * \param p_mlp media list player instance
89 * \param p_mi media player instance
90 * \param p_e initialized exception instance
93 libvlc_media_list_player_set_media_player(
94 libvlc_media_list_player_t * p_mlp,
95 libvlc_media_player_t * p_mi );
98 libvlc_media_list_player_set_media_list(
99 libvlc_media_list_player_t * p_mlp,
100 libvlc_media_list_t * p_mlist );
105 * \param p_mlp media list player instance
106 * \param p_e initialized exception instance
109 libvlc_media_list_player_play( libvlc_media_list_player_t * p_mlp,
110 libvlc_exception_t * p_e );
115 * \param p_mlp media list player instance
116 * \param p_e initialized exception instance
119 libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp,
120 libvlc_exception_t * p_e );
123 * Is media list playing?
125 * \param p_mlp media list player instance
126 * \param p_e initialized exception instance
127 * \return true for playing and false for not playing
130 libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp );
133 * Get current libvlc_state of media list player
135 * \param p_mlp media list player instance
136 * \return libvlc_state_t for media list player
138 VLC_PUBLIC_API libvlc_state_t
139 libvlc_media_list_player_get_state( libvlc_media_list_player_t * p_mlp );
142 * Play media list item at position index
144 * \param p_mlp media list player instance
145 * \param i_index index in media list to play
146 * \param p_e initialized exception instance
149 libvlc_media_list_player_play_item_at_index(
150 libvlc_media_list_player_t * p_mlp,
152 libvlc_exception_t * p_e );
155 libvlc_media_list_player_play_item(
156 libvlc_media_list_player_t * p_mlp,
157 libvlc_media_t * p_md,
158 libvlc_exception_t * p_e );
161 * Stop playing media list
163 * \param p_mlp media list player instance
166 libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp );
169 * Play next item from media list
171 * \param p_mlp media list player instance
172 * \param p_e initialized exception instance
175 libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
176 libvlc_exception_t * p_e );
179 * Play previous item from media list
181 * \param p_mlp media list player instance
182 * \param p_e initialized exception instance
185 libvlc_media_list_player_previous( libvlc_media_list_player_t * p_mlp,
186 libvlc_exception_t * p_e );
191 * Sets the playback mode for the playlist
193 * \param p_mlp media list player instance
194 * \param e_mode playback mode specification
197 libvlc_media_list_player_set_playback_mode(
198 libvlc_media_list_player_t * p_mlp,
199 libvlc_playback_mode_t e_mode );
201 /** @} media_list_player */
207 #endif /* LIBVLC_MEDIA_LIST_PLAYER_H */