VLC 4.0.0-dev
Loading...
Searching...
No Matches
playlist.h
Go to the documentation of this file.
1/*****************************************************************************
2 * playlist/playlist.h
3 *****************************************************************************
4 * Copyright (C) 2018 VLC authors and VideoLAN
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
20
21#ifndef VLC_PLAYLIST_NEW_INTERNAL_H
22#define VLC_PLAYLIST_NEW_INTERNAL_H
23
24#include <vlc_common.h>
25#include <vlc_playlist.h>
26#include <vlc_preparser.h>
27#include <vlc_vector.h>
28#include "../player/player.h"
29#include "randomizer.h"
30
32
33#ifdef TEST_PLAYLIST
34/* mock the player in tests */
35# define vlc_player_New(a,b) (VLC_UNUSED(a), malloc(sizeof (vlc_player_t)))
36# define vlc_player_Delete(p) free(p)
37# define vlc_player_Lock(p) VLC_UNUSED(p)
38# define vlc_player_Unlock(p) VLC_UNUSED(p)
39# define vlc_player_AddListener(a,b,c) (VLC_UNUSED(b), malloc(sizeof(vlc_player_listener_id)))
40# define vlc_player_RemoveListener(a,b) free(b)
41# define vlc_player_SetCurrentMedia(a,b) (VLC_UNUSED(b), VLC_SUCCESS)
42# define vlc_player_SetNextMedia(a,b) VLC_UNUSED(b)
43# define vlc_player_osd_Message(p, fmt...) VLC_UNUSED(p)
44#endif /* TEST_PLAYLIST */
45
47
67
68/* Also disable vlc_assert_locked in tests since the symbol is not exported */
69#if !defined(NDEBUG) && !defined(TEST_PLAYLIST)
70static inline void
75#else
76#define vlc_playlist_AssertLocked(x) ((void) (0))
77#endif
78
79#endif
vlc_playlist_media_stopped_action
Action when a media is stopped.
Definition vlc_playlist.h:177
vlc_playlist_playback_repeat
Definition vlc_playlist.h:118
vlc_playlist_preparsing
Preparsing depth.
Definition vlc_playlist.h:161
vlc_playlist_playback_order
Definition vlc_playlist.h:125
#define VLC_VECTOR(type)
Vector struct body.
Definition vlc_vector.h:66
static void vlc_player_assert_locked(vlc_player_t *player)
Definition player.h:301
static void vlc_playlist_AssertLocked(vlc_playlist_t *playlist)
Definition playlist.h:71
Describes an input and is used to spawn input_thread_t objects.
Definition vlc_input_item.h:98
Definition vlc_objects.h:103
Definition playlist.h:46
Playlist helper to manage random playback.
Definition randomizer.h:39
Doubly-linked list node.
Definition vlc_list.h:44
Definition player.h:132
Definition player.h:236
Definition item.h:30
Definition playlist.h:49
vlc_player_t * player
Definition playlist.h:50
ssize_t current
Definition playlist.h:59
struct vlc_list listeners
list of vlc_playlist_listener_id.node
Definition playlist.h:62
vlc_preparser_t * parser
Definition playlist.h:51
playlist_item_vector_t items
Definition playlist.h:57
libvlc_int_t * libvlc
Definition playlist.h:52
bool has_prev
Definition playlist.h:60
enum vlc_playlist_playback_repeat repeat
Definition playlist.h:63
enum vlc_playlist_playback_order order
Definition playlist.h:64
bool has_next
Definition playlist.h:61
enum vlc_playlist_preparsing recursive
Definition playlist.h:54
struct vlc_player_listener_id * player_listener
Definition playlist.h:56
uint64_t idgen
Definition playlist.h:65
enum vlc_playlist_media_stopped_action stopped_action
Definition playlist.h:53
Definition preparser.c:41
This file is a collection of common definitions and types.
VLC Preparser API.
This provides convenience helpers for vectors.