VLC 4.0.0-dev
LibVLC media list player

The LibVLC media list player plays a libvlc_media_list_t list of media, in a certain order. More...

Collaboration diagram for LibVLC media list player:

Files

file  libvlc_media_list_player.h
 LibVLC media list player external API.
 

Typedefs

typedef struct libvlc_media_list_player_t libvlc_media_list_player_t
 
typedef enum libvlc_playback_mode_t libvlc_playback_mode_t
 Defines playback modes for playlist. More...
 

Enumerations

enum  libvlc_playback_mode_t { libvlc_playback_mode_default , libvlc_playback_mode_loop , libvlc_playback_mode_repeat }
 Defines playback modes for playlist. More...
 

Functions

LIBVLC_API libvlc_media_list_player_tlibvlc_media_list_player_new (libvlc_instance_t *p_instance)
 Create new media_list_player. More...
 
LIBVLC_API void libvlc_media_list_player_release (libvlc_media_list_player_t *p_mlp)
 Release a media_list_player after use Decrement the reference count of a media player object. More...
 
LIBVLC_API libvlc_media_list_player_tlibvlc_media_list_player_retain (libvlc_media_list_player_t *p_mlp)
 Retain a reference to a media player list object. More...
 
LIBVLC_API libvlc_event_manager_tlibvlc_media_list_player_event_manager (libvlc_media_list_player_t *p_mlp)
 Return the event manager of this media_list_player. More...
 
LIBVLC_API void libvlc_media_list_player_set_media_player (libvlc_media_list_player_t *p_mlp, libvlc_media_player_t *p_mi)
 Replace media player in media_list_player with this instance. More...
 
LIBVLC_API libvlc_media_player_tlibvlc_media_list_player_get_media_player (libvlc_media_list_player_t *p_mlp)
 Get media player of the media_list_player instance. More...
 
LIBVLC_API void libvlc_media_list_player_set_media_list (libvlc_media_list_player_t *p_mlp, libvlc_media_list_t *p_mlist)
 Set the media list associated with the player. More...
 
LIBVLC_API void libvlc_media_list_player_play (libvlc_media_list_player_t *p_mlp)
 Play media list. More...
 
LIBVLC_API void libvlc_media_list_player_pause (libvlc_media_list_player_t *p_mlp)
 Toggle pause (or resume) media list. More...
 
LIBVLC_API void libvlc_media_list_player_set_pause (libvlc_media_list_player_t *p_mlp, int do_pause)
 Pause or resume media list. More...
 
LIBVLC_API bool libvlc_media_list_player_is_playing (libvlc_media_list_player_t *p_mlp)
 Is media list playing? More...
 
LIBVLC_API libvlc_state_t libvlc_media_list_player_get_state (libvlc_media_list_player_t *p_mlp)
 Get current libvlc_state of media list player. More...
 
LIBVLC_API int libvlc_media_list_player_play_item_at_index (libvlc_media_list_player_t *p_mlp, int i_index)
 Play media list item at position index. More...
 
LIBVLC_API int libvlc_media_list_player_play_item (libvlc_media_list_player_t *p_mlp, libvlc_media_t *p_md)
 Play the given media item. More...
 
LIBVLC_API void libvlc_media_list_player_stop_async (libvlc_media_list_player_t *p_mlp)
 Stop playing media list. More...
 
LIBVLC_API int libvlc_media_list_player_next (libvlc_media_list_player_t *p_mlp)
 Play next item from media list. More...
 
LIBVLC_API int libvlc_media_list_player_previous (libvlc_media_list_player_t *p_mlp)
 Play previous item from media list. More...
 
LIBVLC_API void libvlc_media_list_player_set_playback_mode (libvlc_media_list_player_t *p_mlp, libvlc_playback_mode_t e_mode)
 Sets the playback mode for the playlist. More...
 

Detailed Description

The LibVLC media list player plays a libvlc_media_list_t list of media, in a certain order.

This is required to especially support playlist files. The normal libvlc_media_player_t LibVLC media player can only play a single media, and does not handle playlist files properly.

Typedef Documentation

◆ libvlc_media_list_player_t

◆ libvlc_playback_mode_t

Defines playback modes for playlist.

Enumeration Type Documentation

◆ libvlc_playback_mode_t

Defines playback modes for playlist.

Enumerator
libvlc_playback_mode_default 
libvlc_playback_mode_loop 
libvlc_playback_mode_repeat 

Function Documentation

◆ libvlc_media_list_player_event_manager()

LIBVLC_API libvlc_event_manager_t * libvlc_media_list_player_event_manager ( libvlc_media_list_player_t p_mlp)

Return the event manager of this media_list_player.

Parameters
p_mlpmedia list player instance
Returns
the event manager

◆ libvlc_media_list_player_get_media_player()

LIBVLC_API libvlc_media_player_t * libvlc_media_list_player_get_media_player ( libvlc_media_list_player_t p_mlp)

Get media player of the media_list_player instance.

Parameters
p_mlpmedia list player instance
Returns
media player instance
Note
the caller is responsible for releasing the returned instance with libvlc_media_list_player_set_media_player().

◆ libvlc_media_list_player_get_state()

LIBVLC_API libvlc_state_t libvlc_media_list_player_get_state ( libvlc_media_list_player_t p_mlp)

Get current libvlc_state of media list player.

Parameters
p_mlpmedia list player instance
Returns
libvlc_state_t for media list player

◆ libvlc_media_list_player_is_playing()

LIBVLC_API bool libvlc_media_list_player_is_playing ( libvlc_media_list_player_t p_mlp)

Is media list playing?

Parameters
p_mlpmedia list player instance
Return values
trueplaying
falsenot playing

◆ libvlc_media_list_player_new()

LIBVLC_API libvlc_media_list_player_t * libvlc_media_list_player_new ( libvlc_instance_t p_instance)

Create new media_list_player.

Parameters
p_instancelibvlc instance
Returns
media list player instance or NULL on error (it must be released by libvlc_media_list_player_release())

◆ libvlc_media_list_player_next()

LIBVLC_API int libvlc_media_list_player_next ( libvlc_media_list_player_t p_mlp)

Play next item from media list.

Parameters
p_mlpmedia list player instance
Returns
0 upon success -1 if there is no next item

◆ libvlc_media_list_player_pause()

LIBVLC_API void libvlc_media_list_player_pause ( libvlc_media_list_player_t p_mlp)

Toggle pause (or resume) media list.

Parameters
p_mlpmedia list player instance

◆ libvlc_media_list_player_play()

LIBVLC_API void libvlc_media_list_player_play ( libvlc_media_list_player_t p_mlp)

Play media list.

Parameters
p_mlpmedia list player instance

◆ libvlc_media_list_player_play_item()

LIBVLC_API int libvlc_media_list_player_play_item ( libvlc_media_list_player_t p_mlp,
libvlc_media_t p_md 
)

Play the given media item.

Parameters
p_mlpmedia list player instance
p_mdthe media instance
Returns
0 upon success, -1 if the media is not part of the media list

◆ libvlc_media_list_player_play_item_at_index()

LIBVLC_API int libvlc_media_list_player_play_item_at_index ( libvlc_media_list_player_t p_mlp,
int  i_index 
)

Play media list item at position index.

Parameters
p_mlpmedia list player instance
i_indexindex in media list to play
Returns
0 upon success -1 if the item wasn't found

◆ libvlc_media_list_player_previous()

LIBVLC_API int libvlc_media_list_player_previous ( libvlc_media_list_player_t p_mlp)

Play previous item from media list.

Parameters
p_mlpmedia list player instance
Returns
0 upon success -1 if there is no previous item

◆ libvlc_media_list_player_release()

LIBVLC_API void libvlc_media_list_player_release ( libvlc_media_list_player_t p_mlp)

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.

Parameters
p_mlpmedia list player instance

◆ libvlc_media_list_player_retain()

LIBVLC_API libvlc_media_list_player_t * libvlc_media_list_player_retain ( 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.

Parameters
p_mlpmedia player list object
Returns
the same object

◆ libvlc_media_list_player_set_media_list()

LIBVLC_API void libvlc_media_list_player_set_media_list ( libvlc_media_list_player_t p_mlp,
libvlc_media_list_t p_mlist 
)

Set the media list associated with the player.

Parameters
p_mlpmedia list player instance
p_mlistlist of media

◆ libvlc_media_list_player_set_media_player()

LIBVLC_API void libvlc_media_list_player_set_media_player ( libvlc_media_list_player_t p_mlp,
libvlc_media_player_t p_mi 
)

Replace media player in media_list_player with this instance.

Parameters
p_mlpmedia list player instance
p_mimedia player instance

◆ libvlc_media_list_player_set_pause()

LIBVLC_API void libvlc_media_list_player_set_pause ( libvlc_media_list_player_t p_mlp,
int  do_pause 
)

Pause or resume media list.

Parameters
p_mlpmedia list player instance
do_pauseplay/resume if zero, pause if non-zero
Version
LibVLC 3.0.0 or later

◆ libvlc_media_list_player_set_playback_mode()

LIBVLC_API void libvlc_media_list_player_set_playback_mode ( libvlc_media_list_player_t p_mlp,
libvlc_playback_mode_t  e_mode 
)

Sets the playback mode for the playlist.

Parameters
p_mlpmedia list player instance
e_modeplayback mode specification

◆ libvlc_media_list_player_stop_async()

LIBVLC_API void libvlc_media_list_player_stop_async ( libvlc_media_list_player_t p_mlp)

Stop playing media list.

Parameters
p_mlpmedia list player instance