1 /*****************************************************************************
2 * vlc_media_library.h: SQL-based media library
3 *****************************************************************************
4 * Copyright (C) 2008-2010 the VideoLAN Team and AUTHORS
6 * Authors: Antoine Lejeune <phytos@videolan.org>
7 * Jean-Philippe André <jpeg@videolan.org>
8 * Rémi Duraffort <ivoire@videolan.org>
9 * Adrien Maglo <magsoft@videolan.org>
10 * Srikanth Raju <srikiraju at gmail dot com>
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU Lesser General Public License as published by
14 * the Free Software Foundation; either version 2.1 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public License
23 * along with this program; if not, write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
27 #ifndef VLC_MEDIA_LIBRARY_H
28 # define VLC_MEDIA_LIBRARY_H
31 #include <vlc_common.h>
37 typedef enum vlc_ml_media_type_t
39 VLC_ML_MEDIA_TYPE_UNKNOWN
,
40 VLC_ML_MEDIA_TYPE_VIDEO
,
41 VLC_ML_MEDIA_TYPE_AUDIO
,
42 } vlc_ml_media_type_t
;
44 typedef enum vlc_ml_media_subtype_t
46 VLC_ML_MEDIA_SUBTYPE_UNKNOWN
,
47 VLC_ML_MEDIA_SUBTYPE_SHOW_EPISODE
,
48 VLC_ML_MEDIA_SUBTYPE_MOVIE
,
49 VLC_ML_MEDIA_SUBTYPE_ALBUMTRACK
,
50 } vlc_ml_media_subtype_t
;
52 typedef enum vlc_ml_file_type_t
54 VLC_ML_FILE_TYPE_UNKNOWN
,
55 VLC_ML_FILE_TYPE_MAIN
,
56 VLC_ML_FILE_TYPE_PART
,
57 VLC_ML_FILE_TYPE_SOUNDTRACK
,
58 VLC_ML_FILE_TYPE_SUBTITLE
,
59 VLC_ML_FILE_TYPE_PLAYLIST
,
62 typedef enum vlc_ml_track_type_t
64 VLC_ML_TRACK_TYPE_UNKNOWN
,
65 VLC_ML_TRACK_TYPE_VIDEO
,
66 VLC_ML_TRACK_TYPE_AUDIO
,
67 } vlc_ml_track_type_t
;
69 typedef enum vlc_ml_thumbnail_size_t
71 VLC_ML_THUMBNAIL_SMALL
,
72 VLC_ML_THUMBNAIL_BANNER
,
74 VLC_ML_THUMBNAIL_SIZE_COUNT
75 } vlc_ml_thumbnail_size_t
;
77 typedef enum vlc_ml_thumbnail_status_t
79 VLC_ML_THUMBNAIL_STATUS_MISSING
,
80 VLC_ML_THUMBNAIL_STATUS_AVAILABLE
,
81 VLC_ML_THUMBNAIL_STATUS_FAILURE
,
82 VLC_ML_THUMBNAIL_STATUS_PERSISTENT_FAILURE
,
83 VLC_ML_THUMBNAIL_STATUS_CRASH
,
84 } vlc_ml_thumbnail_status_t
;
86 typedef enum vlc_ml_history_type_t
88 VLC_ML_HISTORY_TYPE_MEDIA
,
89 VLC_ML_HISTORY_TYPE_NETWORK
,
90 } vlc_ml_history_type_t
;
92 typedef struct vlc_ml_thumbnail_t
96 * True if a thumbnail is available, or if thumbnail generation was
97 * attempted but failed
99 vlc_ml_thumbnail_status_t i_status
;
100 } vlc_ml_thumbnail_t
;
102 typedef struct vlc_ml_movie_t
108 typedef struct vlc_ml_show_episode_t
112 uint32_t i_episode_nb
;
113 uint32_t i_season_number
;
114 } vlc_ml_show_episode_t
;
116 typedef struct vlc_ml_show_t
121 char* psz_artwork_mrl
;
123 unsigned int i_release_year
;
124 uint32_t i_nb_episodes
;
125 uint32_t i_nb_seasons
;
128 typedef struct vlc_ml_album_track_t
136 } vlc_ml_album_track_t
;
138 typedef struct vlc_ml_label_t
144 typedef struct vlc_ml_label_list_t
147 vlc_ml_label_t p_items
[];
148 } vlc_ml_label_list_t
;
150 typedef struct vlc_ml_file_t
153 vlc_ml_file_type_t i_type
;
159 typedef struct vlc_ml_file_list_t
162 vlc_ml_file_t p_items
[];
163 } vlc_ml_file_list_t
;
165 typedef struct vlc_ml_media_track_t
169 char* psz_description
;
170 vlc_ml_track_type_t i_type
;
177 uint32_t i_nbChannels
;
178 uint32_t i_sampleRate
;
191 } vlc_ml_media_track_t
;
193 typedef struct vlc_ml_media_track_list_t
196 vlc_ml_media_track_t p_items
[];
197 } vlc_ml_media_track_list_t
;
199 typedef struct vlc_ml_media_t
203 vlc_ml_media_type_t i_type
;
204 vlc_ml_media_subtype_t i_subtype
;
206 vlc_ml_file_list_t
* p_files
;
207 vlc_ml_media_track_list_t
* p_tracks
;
210 /* Duration in milliseconds */
212 uint32_t i_playcount
;
214 time_t i_last_played_date
;
217 vlc_ml_thumbnail_t thumbnails
[VLC_ML_THUMBNAIL_SIZE_COUNT
];
223 vlc_ml_show_episode_t show_episode
;
224 vlc_ml_movie_t movie
;
225 vlc_ml_album_track_t album_track
;
229 typedef struct vlc_ml_group_t
235 unsigned int i_nb_total_media
;
237 unsigned int i_duration
;
239 uint32_t i_creation_date
;
242 typedef struct vlc_ml_playlist_t
250 char* psz_artwork_mrl
;
252 uint32_t i_creation_date
;
257 typedef struct vlc_ml_artist_t
262 vlc_ml_thumbnail_t thumbnails
[VLC_ML_THUMBNAIL_SIZE_COUNT
];
265 unsigned int i_nb_album
;
266 unsigned int i_nb_tracks
;
269 typedef struct vlc_ml_artist_list_t
272 vlc_ml_artist_t p_items
[];
273 } vlc_ml_artist_list_t
;
275 typedef struct vlc_ml_album_t
{
279 vlc_ml_thumbnail_t thumbnails
[VLC_ML_THUMBNAIL_SIZE_COUNT
];
284 unsigned int i_duration
;
288 typedef struct vlc_ml_genre_t
295 typedef struct vlc_ml_media_list_t
298 vlc_ml_media_t p_items
[];
299 } vlc_ml_media_list_t
;
301 typedef struct vlc_ml_album_list_t
304 vlc_ml_album_t p_items
[];
305 } vlc_ml_album_list_t
;
307 typedef struct vlc_ml_show_list_t
310 vlc_ml_show_t p_items
[];
311 } vlc_ml_show_list_t
;
313 typedef struct vlc_ml_genre_list_t
316 vlc_ml_genre_t p_items
[];
317 } vlc_ml_genre_list_t
;
319 typedef struct vlc_ml_group_list_t
322 vlc_ml_group_t p_items
[];
323 } vlc_ml_group_list_t
;
325 typedef struct vlc_ml_playlist_list_t
328 vlc_ml_playlist_t p_items
[];
329 } vlc_ml_playlist_list_t
;
331 typedef struct vlc_ml_entry_point_t
333 char* psz_mrl
; /**< This entrypoint's MRL. Will be NULL if b_present is false */
334 bool b_present
; /**< The presence state for this entrypoint. */
335 bool b_banned
; /**< Will be true if the user required this entrypoint to be excluded */
336 } vlc_ml_entry_point_t
;
338 typedef struct vlc_ml_entry_point_list_t
341 vlc_ml_entry_point_t p_items
[];
342 } vlc_ml_entry_point_list_t
;
344 typedef struct vlc_ml_bookmark_t
346 int64_t i_media_id
; /**< The associated media ID */
347 int64_t i_time
; /**< The bookmark time. The unit is arbitrary */
348 char* psz_name
; /**< The bookmark name */
349 char* psz_description
; /**< The bookmark description */
352 typedef struct vlc_ml_boomkmark_list_t
355 vlc_ml_bookmark_t p_items
[];
356 } vlc_ml_bookmark_list_t
;
358 /* Opaque medialibrary pointer, to be used by any non-medialibrary module */
359 typedef struct vlc_medialibrary_t vlc_medialibrary_t
;
360 /* "Private" medialibrary pointer, to be used by the core & medialibrary modules */
361 typedef struct vlc_medialibrary_module_t vlc_medialibrary_module_t
;
362 /* Opaque event callback type */
363 typedef struct vlc_ml_event_callback_t vlc_ml_event_callback_t
;
365 typedef enum vlc_ml_sorting_criteria_t
368 * Default depends on the entity type:
369 * - By track number (and disc number) for album tracks
370 * - Alphabetical order for others
372 VLC_ML_SORTING_DEFAULT
,
373 VLC_ML_SORTING_ALPHA
,
374 VLC_ML_SORTING_DURATION
,
375 VLC_ML_SORTING_INSERTIONDATE
,
376 VLC_ML_SORTING_LASTMODIFICATIONDATE
,
377 VLC_ML_SORTING_RELEASEDATE
,
378 VLC_ML_SORTING_FILESIZE
,
379 VLC_ML_SORTING_ARTIST
,
380 VLC_ML_SORTING_PLAYCOUNT
,
381 VLC_ML_SORTING_ALBUM
,
382 VLC_ML_SORTING_FILENAME
,
383 VLC_ML_SORTING_TRACKNUMBER
,
384 } vlc_ml_sorting_criteria_t
;
386 typedef struct vlc_ml_query_params_t vlc_ml_query_params_t
;
387 struct vlc_ml_query_params_t
389 const char* psz_pattern
;
390 uint32_t i_nbResults
;
392 vlc_ml_sorting_criteria_t i_sort
;
396 enum vlc_ml_get_queries
398 VLC_ML_GET_MEDIA
, /**< arg1: Media ID; ret: vlc_ml_media_t* */
399 VLC_ML_GET_MEDIA_BY_MRL
, /**< arg1: Media MRL; ret: vlc_ml_media_t* */
400 VLC_ML_GET_INPUT_ITEM
, /**< arg1: Media ID; ret: input_item_t* */
401 VLC_ML_GET_INPUT_ITEM_BY_MRL
,/**< arg1: Media MRL; ret: input_item_t* */
402 VLC_ML_GET_ALBUM
, /**< arg1: Album ID; ret: vlc_ml_album_t* */
403 VLC_ML_GET_ARTIST
, /**< arg1: Artist ID; ret: vlc_ml_artist_t* */
404 VLC_ML_GET_GENRE
, /**< arg1: Genre ID; ret: vlc_ml_genre_t* */
405 VLC_ML_GET_SHOW
, /**< arg1: Show ID; ret: vlc_ml_show_t* */
406 VLC_ML_GET_GROUP
, /**< arg1: Group ID; ret: vlc_ml_group_t* */
407 VLC_ML_GET_PLAYLIST
, /**< arg1: Playlist ID; ret: vlc_ml_playlist_t* */
410 enum vlc_ml_list_queries
412 /* General listing: */
414 VLC_ML_LIST_VIDEOS
, /**< arg1 (out): vlc_ml_media_list_t** */
415 VLC_ML_COUNT_VIDEOS
, /**< arg1 (out): size_t* */
416 VLC_ML_LIST_AUDIOS
, /**< arg1 (out): vlc_ml_media_list_t** */
417 VLC_ML_COUNT_AUDIOS
, /**< arg1 (out): size_t* */
418 VLC_ML_LIST_ALBUMS
, /**< arg1 (out): vlc_ml_album_list_t** */
419 VLC_ML_COUNT_ALBUMS
, /**< arg1 (out): size_t* */
420 VLC_ML_LIST_GENRES
, /**< arg1 (out): vlc_ml_genre_list_t** */
421 VLC_ML_COUNT_GENRES
, /**< arg1 (out): size_t* */
422 VLC_ML_LIST_ARTISTS
, /**< arg1 bool: includeAll; arg2 (out): vlc_ml_genre_list_t** */
423 VLC_ML_COUNT_ARTISTS
, /**< arg1 bool: includeAll; arg2 (out): size_t* */
424 VLC_ML_LIST_SHOWS
, /**< arg1 (out): vlc_ml_show_list_t** */
425 VLC_ML_COUNT_SHOWS
, /**< arg1 (out): size_t* */
426 VLC_ML_LIST_GROUPS
, /**< arg1 (out): vlc_ml_group_list_t** */
427 VLC_ML_COUNT_GROUPS
, /**< arg1 (out): size_t* */
428 VLC_ML_LIST_PLAYLISTS
, /**< arg1 (out): vlc_ml_playlist_list_t** */
429 VLC_ML_COUNT_PLAYLISTS
, /**< arg1 (out): size_t* */
430 VLC_ML_LIST_HISTORY
, /**< arg1 (out): vlc_ml_media_list_t** */
431 VLC_ML_COUNT_HISTORY
, /**< arg1 (out): size_t* */
432 VLC_ML_LIST_HISTORY_BY_TYPE
, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t** */
433 VLC_ML_COUNT_HISTORY_BY_TYPE
, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t***/
434 VLC_ML_LIST_STREAM_HISTORY
, /**< arg1 (out): vlc_ml_media_list_t** */
435 VLC_ML_COUNT_STREAM_HISTORY
, /**< arg1 (out): size_t* */
437 /* Album specific listings */
438 VLC_ML_LIST_ALBUM_TRACKS
, /**< arg1: The album id. arg2 (out): vlc_ml_media_list_t** */
439 VLC_ML_COUNT_ALBUM_TRACKS
, /**< arg1: The album id. arg2 (out): size_t* */
440 VLC_ML_LIST_ALBUM_ARTISTS
, /**< arg1: The album id. arg2 (out): vlc_ml_album_list_t** */
441 VLC_ML_COUNT_ALBUM_ARTISTS
, /**< arg1: The album id. arg2 (out): size_t* */
443 /* Artist specific listings */
444 VLC_ML_LIST_ARTIST_ALBUMS
, /**< arg1: The artist id. arg2(out): vlc_ml_album_list_t** */
445 VLC_ML_COUNT_ARTIST_ALBUMS
, /**< arg1: The artist id. arg2(out): size_t* */
446 VLC_ML_LIST_ARTIST_TRACKS
, /**< arg1: The artist id. arg2(out): vlc_ml_media_list_t** */
447 VLC_ML_COUNT_ARTIST_TRACKS
, /**< arg1: The artist id. arg2(out): size_t* */
449 /* Genre specific listings */
450 VLC_ML_LIST_GENRE_ARTISTS
, /**< arg1: genre id; arg2 (out): vlc_ml_artist_list_t** */
451 VLC_ML_COUNT_GENRE_ARTISTS
, /**< arg1: genre id; arg2 (out): size_t* */
452 VLC_ML_LIST_GENRE_TRACKS
, /**< arg1: genre id; arg2 (out): vlc_ml_media_list_t** */
453 VLC_ML_COUNT_GENRE_TRACKS
, /**< arg1: genre id; arg2 (out): size_t* */
454 VLC_ML_LIST_GENRE_ALBUMS
, /**< arg1: genre id; arg2 (out): vlc_ml_album_list_t** */
455 VLC_ML_COUNT_GENRE_ALBUMS
, /**< arg1: genre id; arg2 (out): size_t* */
457 /* Show specific listings */
458 VLC_ML_LIST_SHOW_EPISODES
, /**< arg1: show id; arg2(out): vlc_ml_media_list_t** */
459 VLC_ML_COUNT_SHOW_EPISODES
, /**< arg1: show id; arg2(out): size_t* */
461 /* Media specific listings */
462 VLC_ML_LIST_MEDIA_LABELS
, /**< arg1: media id; arg2 (out): vlc_ml_label_list_t** */
463 VLC_ML_COUNT_MEDIA_LABELS
, /**< arg1: media id; arg2 (out): size_t* */
464 VLC_ML_LIST_MEDIA_BOOKMARKS
, /**< arg1: media id; arg2 (out): vlc_ml_bookmark_list_t** */
466 /* Groups specific listings */
467 VLC_ML_LIST_GROUP_MEDIA
, /**< arg1: playlist id; arg2 (out): vlc_ml_media_list_t** */
468 VLC_ML_COUNT_GROUP_MEDIA
, /**< arg1: playlist id; arg2 (out): size_t* */
470 /* Playlist specific listings */
471 VLC_ML_LIST_PLAYLIST_MEDIA
, /**< arg1: playlist id; arg2 (out): vlc_ml_media_list_t** */
472 VLC_ML_COUNT_PLAYLIST_MEDIA
, /**< arg1: playlist id; arg2 (out): size_t* */
474 /* Children entities listing */
475 VLC_ML_LIST_MEDIA_OF
, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): ml_media_list_t** */
476 VLC_ML_COUNT_MEDIA_OF
, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
477 VLC_ML_LIST_ARTISTS_OF
, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): ml_artist_list_t** */
478 VLC_ML_COUNT_ARTISTS_OF
, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
479 VLC_ML_LIST_ALBUMS_OF
, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): ml_album_list_t** */
480 VLC_ML_COUNT_ALBUMS_OF
, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
483 enum vlc_ml_parent_type
485 VLC_ML_PARENT_UNKNOWN
,
487 VLC_ML_PARENT_ARTIST
,
491 VLC_ML_PARENT_PLAYLIST
,
496 /* Adds a folder to discover through the medialibrary */
497 VLC_ML_ADD_FOLDER
, /**< arg1: mrl (const char*) res: can't fail */
498 VLC_ML_REMOVE_FOLDER
, /**< arg1: mrl (const char*) res: can't fail */
499 VLC_ML_BAN_FOLDER
, /**< arg1: mrl (const char*) res: can't fail */
500 VLC_ML_UNBAN_FOLDER
, /**< arg1: mrl (const char*) res: can't fail */
501 VLC_ML_LIST_FOLDERS
, /**< arg1: entrypoints (vlc_ml_entry_point_list_t**); res: can fail */
502 VLC_ML_LIST_BANNED_FOLDERS
, /**< arg1: entrypoints (vlc_ml_entry_point_list_t**); res: can fail */
503 VLC_ML_IS_INDEXED
, /**< arg1: mrl (const char*) arg2 (out): bool*; res: can fail */
505 * Reload a specific folder, or all.
506 * arg1: mrl (const char*), NULL to reload all folders
509 VLC_ML_RELOAD_FOLDER
,
511 /* Pause/resume background operations, such as media discovery & media analysis */
512 VLC_ML_PAUSE_BACKGROUND
, /**< no args; can't fail */
513 VLC_ML_RESUME_BACKGROUND
, /**< no args; can't fail */
515 /* Misc operations */
516 VLC_ML_CLEAR_HISTORY
, /**< no args; can't fail */
519 VLC_ML_NEW_EXTERNAL_MEDIA
, /**< arg1: const char*; arg2(out): vlc_ml_media_t** */
520 VLC_ML_NEW_STREAM
, /**< arg1: const char*; arg2(out): vlc_ml_media_t** */
522 /* Media management */
523 VLC_ML_MEDIA_UPDATE_PROGRESS
, /**< arg1: media id; arg2: playback position; can fail */
524 VLC_ML_MEDIA_GET_MEDIA_PLAYBACK_STATE
, /**< arg1: media id; arg2: vlc_ml_playback_state; arg3: char**; */
525 VLC_ML_MEDIA_SET_MEDIA_PLAYBACK_STATE
, /**< arg1: media id; arg2: vlc_ml_playback_state; arg3: const char*; */
526 VLC_ML_MEDIA_GET_ALL_MEDIA_PLAYBACK_STATES
, /**< arg1: media id; arg2(out): vlc_ml_playback_states_all* */
527 VLC_ML_MEDIA_SET_ALL_MEDIA_PLAYBACK_STATES
, /**< arg1: media id; arg2: const vlc_ml_playback_states_all* */
528 VLC_ML_MEDIA_SET_THUMBNAIL
, /**< arg1: media id; arg2: const char*; arg3: vlc_ml_thumbnail_size_t */
529 VLC_ML_MEDIA_GENERATE_THUMBNAIL
, /**< arg1: media id; arg2: vlc_ml_thumbnail_size_t; arg3: width; arg4: height; arg5: position */
530 VLC_ML_MEDIA_ADD_EXTERNAL_MRL
, /**< arg1: media id; arg2: const char*; arg3: type(vlc_ml_file_type_t) */
531 VLC_ML_MEDIA_SET_TYPE
, /**< arg1: media id; arg2: vlc_ml_media_type_t */
532 VLC_ML_MEDIA_ADD_BOOKMARK
, /**< arg1: media id; arg2: int64_t */
533 VLC_ML_MEDIA_REMOVE_BOOKMARK
, /**< arg1: media id; arg2: int64_t */
534 VLC_ML_MEDIA_REMOVE_ALL_BOOKMARKS
, /**< arg1: media id */
535 VLC_ML_MEDIA_UPDATE_BOOKMARK
, /**< arg1: media id; arg2: int64_t; arg3: const char*; arg4: const char* */
537 /* Playlist management */
538 VLC_ML_PLAYLIST_CREATE
, /**< arg1: const char*; arg2(out): vlc_ml_playlist_t**; can fail */
539 VLC_ML_PLAYLIST_DELETE
, /**< arg1: playlist id; can fail */
540 VLC_ML_PLAYLIST_APPEND
, /**< arg1: playlist id; arg2: media id; can fail */
541 VLC_ML_PLAYLIST_INSERT
, /**< arg1: playlist id; arg2: media id; arg3: position; can fail */
542 VLC_ML_PLAYLIST_MOVE
, /**< arg1: playlist id; arg2: from; arg3: to; can fail */
543 VLC_ML_PLAYLIST_REMOVE
/**< arg1: playlist id; arg2: position; can fail */
547 * User playback settings.
548 * All values/units are up to the caller and are not interpreted by the media
550 * All values are stored and returned as strings.
551 * When calling vlc_medialibrary_t::pf_control with vlc_ml_MEDIA_GET_MEDIA_PLAYBACK_STATE,
552 * the value will be returned stored in the provided char**. If the state was
553 * not set yet, NULL will be returned.
554 * When setting a state, NULL can be provided as a value to unset it.
556 enum vlc_ml_playback_state
558 VLC_ML_PLAYBACK_STATE_RATING
,
559 VLC_ML_PLAYBACK_STATE_SPEED
,
560 VLC_ML_PLAYBACK_STATE_TITLE
,
561 VLC_ML_PLAYBACK_STATE_CHAPTER
,
562 VLC_ML_PLAYBACK_STATE_PROGRAM
,
563 VLC_ML_PLAYBACK_STATE_SEEN
,
564 VLC_ML_PLAYBACK_STATE_VIDEO_TRACK
,
565 VLC_ML_PLAYBACK_STATE_ASPECT_RATIO
,
566 VLC_ML_PLAYBACK_STATE_ZOOM
,
567 VLC_ML_PLAYBACK_STATE_CROP
,
568 VLC_ML_PLAYBACK_STATE_DEINTERLACE
,
569 VLC_ML_PLAYBACK_STATE_VIDEO_FILTER
,
570 VLC_ML_PLAYBACK_STATE_AUDIO_TRACK
,
571 VLC_ML_PLAYBACK_STATE_GAIN
,
572 VLC_ML_PLAYBACK_STATE_AUDIO_DELAY
,
573 VLC_ML_PLAYBACK_STATE_SUBTITLE_TRACK
,
574 VLC_ML_PLAYBACK_STATE_SUBTITLE_DELAY
,
575 VLC_ML_PLAYBACK_STATE_APP_SPECIFIC
,
578 typedef struct vlc_ml_playback_states_all
583 char* current_video_track
;
584 char* current_audio_track
;
585 char *current_subtitle_track
;
590 } vlc_ml_playback_states_all
;
592 enum vlc_ml_event_type
595 * Entity modification callbacks. The affected entity will be passed:
596 * - As a vlc_ml_<type>_t, depending on the type of the modified/inserted
597 * entity, in vlc_ml_event_t::modification::p_<type>
598 * for ADDED and UPDATED variants.
599 * - as an id, in vlc_ml_event_t::deletion::i_entity_id
600 * When _DELETED callbacks get invoked, the entity will already have been
601 * deleted from the database, and cannot be retrieved anymore
603 VLC_ML_EVENT_MEDIA_ADDED
,
604 VLC_ML_EVENT_MEDIA_UPDATED
,
605 VLC_ML_EVENT_MEDIA_DELETED
,
606 VLC_ML_EVENT_ARTIST_ADDED
,
607 VLC_ML_EVENT_ARTIST_UPDATED
,
608 VLC_ML_EVENT_ARTIST_DELETED
,
609 VLC_ML_EVENT_ALBUM_ADDED
,
610 VLC_ML_EVENT_ALBUM_UPDATED
,
611 VLC_ML_EVENT_ALBUM_DELETED
,
612 VLC_ML_EVENT_GROUP_ADDED
,
613 VLC_ML_EVENT_GROUP_UPDATED
,
614 VLC_ML_EVENT_GROUP_DELETED
,
615 VLC_ML_EVENT_PLAYLIST_ADDED
,
616 VLC_ML_EVENT_PLAYLIST_UPDATED
,
617 VLC_ML_EVENT_PLAYLIST_DELETED
,
618 VLC_ML_EVENT_GENRE_ADDED
,
619 VLC_ML_EVENT_GENRE_UPDATED
,
620 VLC_ML_EVENT_GENRE_DELETED
,
621 VLC_ML_EVENT_BOOKMARKS_ADDED
,
622 VLC_ML_EVENT_BOOKMARKS_UPDATED
,
623 VLC_ML_EVENT_BOOKMARKS_DELETED
,
625 * A discovery started.
626 * For each VLC_ML_EVENT_DISCOVERY_STARTED event, there will be
627 * 1 VLC_ML_EVENT_DISCOVERY_COMPLETED event, and N
628 * VLC_ML_EVENT_DISCOVERY_PROGRESS events.
629 * The entry point being discovered is stored in
630 * vlc_ml_event_t::discovery_started::psz_entry_point.
632 VLC_ML_EVENT_DISCOVERY_STARTED
,
634 * Sent when a discovery or reload operation starts analyzing a new folder.
635 * The discovered entry point is stored in
636 * vlc_ml_event_t::discovery_progress::psz_entry_point.
638 VLC_ML_EVENT_DISCOVERY_PROGRESS
,
640 * Sent when an entry point discovery is completed.
641 * The entry point that was being discovered is stored in
642 * vlc_ml_event_t::discovery_completed::psz_entry_point.
643 * The success or failure state is stored in
644 * vlc_ml_event_t::discovery_completed::b_success
646 VLC_ML_EVENT_DISCOVERY_COMPLETED
,
648 * An entry point reload operation started.
649 * For all the entry points being reloaded, N VLC_EVENT_DISCOVERY_PROGRESS
650 * and 1 VLC_EVENT_RELOAD_COMPLETED event will be sent.
651 * The entry point being reloaded is stored in
652 * vlc_ml_event_t::reload_started::psz_entry_point.
654 VLC_ML_EVENT_RELOAD_STARTED
,
656 * Sent when an entry point reload is completed.
657 * The entry point that was being reloaded is stored in
658 * vlc_ml_event_t::reload_completed::psz_entry_point.
659 * The success or failure state is stored in
660 * vlc_ml_event_t::reload_completed::b_success
662 VLC_ML_EVENT_RELOAD_COMPLETED
,
664 * Sent when a new entry point gets added to the database.
665 * The entry point that was added is stored in
666 * vlc::ml_event_t::entry_point_added::psz_entry_point, and the success or failure
667 * state is stored in vlc_ml_event_t::entry_point_added::b_success
668 * If successful, this event won't be emited again for this entry point.
669 * In case of failure, this event will be fired again if the same entry point
670 * is queued for discovery again.
672 VLC_ML_EVENT_ENTRY_POINT_ADDED
,
674 * Sent when an entry point removal request has been processed.
675 * The removed entry point is stored in
676 * vlc_ml_event_t::entry_point_removed::psz_entry_point and the success or failure
677 * state is stored in vlc_ml_event_t::entry_point_removed::b_success
679 VLC_ML_EVENT_ENTRY_POINT_REMOVED
,
681 * Sent when an entry point ban request has been processed.
682 * The banned entry point is stored in
683 * vlc_ml_event_t::entry_point_banned::psz_entry_point and the operation success
684 * state is stored in vlc_ml_event_t::entry_point_banned::b_success
686 VLC_ML_EVENT_ENTRY_POINT_BANNED
,
688 * Sent when an entry point unban request has been processed.
689 * The unbanned entry point is stored in
690 * vlc_ml_event_t::entry_point_unbanned::psz_entry_point and the operation success
691 * state is stored in vlc_ml_event_t::entry_point_unbanned::b_success
693 VLC_ML_EVENT_ENTRY_POINT_UNBANNED
,
695 * Sent when a discoverer or parser threads changes its idle state.
696 * The idle state is stored in vlc_ml_event_t::background_idle_changed.b_idle.
697 * False means at least one background thread is in running, true means
698 * both discoverer & parser threads are paused.
700 VLC_ML_EVENT_BACKGROUND_IDLE_CHANGED
,
702 * Sent when the parsing progress percentage gets updated.
703 * The percentage is stored as a [0;100] integer, in
704 * vlc_ml_event_t::parsing_progress::i_percent
705 * This value might decrease as more media get discovered, but it will only
706 * increase once all discovery operations are completed.
708 VLC_ML_EVENT_PARSING_PROGRESS_UPDATED
,
710 * Sent after a media thumbnail was generated, or if it's generation failed.
711 * The media is stored in vlc_ml_event_t::media_thumbnail_generated::p_media
712 * and the success state is stored in
713 * vlc_ml_event_t::media_thumbnail_generated::b_success
715 VLC_ML_EVENT_MEDIA_THUMBNAIL_GENERATED
,
717 * Sent after the history gets changed. It can be either cleaned, or simply
718 * modified because a media was recently played/removed from the history.
719 * The history type (media/network) is stored in
720 * vlc_ml_event_t::history_changed::history_type
722 VLC_ML_EVENT_HISTORY_CHANGED
,
724 * Sent when an application requested rescan starts being processed.
726 VLC_ML_EVENT_RESCAN_STARTED
,
729 typedef struct vlc_ml_event_t
736 const char* psz_entry_point
;
740 const char* psz_entry_point
;
741 } discovery_progress
;
744 const char* psz_entry_point
;
746 } discovery_completed
;
749 const char* psz_entry_point
;
753 const char* psz_entry_point
;
758 const char* psz_entry_point
;
763 const char* psz_entry_point
;
765 } entry_point_removed
;
768 const char* psz_entry_point
;
770 } entry_point_banned
;
773 const char* psz_entry_point
;
775 } entry_point_unbanned
;
782 const vlc_ml_media_t
* p_media
;
783 const vlc_ml_artist_t
* p_artist
;
784 const vlc_ml_album_t
* p_album
;
785 const vlc_ml_group_t
* p_group
;
786 const vlc_ml_playlist_t
* p_playlist
;
787 const vlc_ml_genre_t
* p_genre
;
788 const vlc_ml_bookmark_t
* p_bookmark
;
801 } background_idle_changed
;
804 const vlc_ml_media_t
* p_media
;
805 vlc_ml_thumbnail_size_t i_size
;
807 } media_thumbnail_generated
;
810 vlc_ml_history_type_t history_type
;
815 typedef void (*vlc_ml_callback_t
)( void* p_data
, const vlc_ml_event_t
* p_event
);
817 typedef struct vlc_medialibrary_callbacks_t
819 void (*pf_send_event
)( vlc_medialibrary_module_t
* p_ml
, const vlc_ml_event_t
* p_event
);
820 } vlc_medialibrary_callbacks_t
;
822 struct vlc_medialibrary_module_t
824 struct vlc_object_t obj
;
830 int (*pf_control
)( struct vlc_medialibrary_module_t
* p_ml
, int i_query
, va_list args
);
832 * List some entities from the medialibrary.
834 * \param p_ml The medialibrary module instance.
835 * \param i_query The type search to be performed. \see vlc_ml_list enumeration
836 * \param p_params A pointer to a vlc_ml_query_params_t structure, or NULL for
837 * the default parameters (alphabetical ascending sort, no pagination)
839 * \return VLC_SUCCESS or an error code
841 * Refer to the individual list of vlc_ml_list requests for the additional
842 * per-query input/ouput parameters values & types
844 int (*pf_list
)( struct vlc_medialibrary_module_t
* p_ml
, int i_query
,
845 const vlc_ml_query_params_t
* p_params
, va_list args
);
848 * Get a specific entity by its id or another unique value
850 * \return The required entity, or a NULL pointer if couldn't be found.
852 * Refer to the list of queries for the specific return type
854 void* (*pf_get
)( struct vlc_medialibrary_module_t
* p_ml
, int i_query
, va_list args
);
856 const vlc_medialibrary_callbacks_t
* cbs
;
859 vlc_medialibrary_t
* libvlc_MlCreate( libvlc_int_t
* p_libvlc
);
860 void libvlc_MlRelease( vlc_medialibrary_t
* p_ml
);
862 VLC_API vlc_medialibrary_t
* vlc_ml_instance_get( vlc_object_t
* p_obj
) VLC_USED
;
863 #define vlc_ml_instance_get(x) vlc_ml_instance_get( VLC_OBJECT(x) )
865 VLC_API
void* vlc_ml_get( vlc_medialibrary_t
* p_ml
, int i_query
, ... ) VLC_USED
;
866 VLC_API
int vlc_ml_control( vlc_medialibrary_t
* p_ml
, int i_query
, ... ) VLC_USED
;
867 VLC_API
int vlc_ml_list( vlc_medialibrary_t
* p_ml
, int i_query
,
868 const vlc_ml_query_params_t
* p_params
, ... );
871 * \brief Registers a medialibrary callback.
872 * \returns A handle to the callback, to be passed to vlc_ml_event_unregister_callback
874 VLC_API vlc_ml_event_callback_t
*
875 vlc_ml_event_register_callback( vlc_medialibrary_t
* p_ml
, vlc_ml_callback_t cb
, void* p_data
);
878 * \brief Unregisters a medialibrary callback
879 * \param p_handle The handled returned by vlc_ml_register_callback
881 VLC_API
void vlc_ml_event_unregister_callback( vlc_medialibrary_t
* p_ml
,
882 vlc_ml_event_callback_t
* p_callback
);
884 * \brief Unregisters a medialibrary callback from the said callback.
885 * \param p_callback The handle returned by vlc_ml_register_callback
887 * This must only be called synchronously from the callback function provided to
888 * vlc_ml_event_register_callback
889 * The p_callback handle must be considered invalid when this function returns
891 VLC_API
void vlc_ml_event_unregister_from_callback( vlc_medialibrary_t
* p_ml
,
892 vlc_ml_event_callback_t
* p_callback
);
895 VLC_API
void vlc_ml_show_release( vlc_ml_show_t
* p_show
);
896 VLC_API
void vlc_ml_artist_release( vlc_ml_artist_t
* p_artist
);
897 VLC_API
void vlc_ml_genre_release( vlc_ml_genre_t
* p_genre
);
898 VLC_API
void vlc_ml_media_release( vlc_ml_media_t
* p_media
);
899 VLC_API
void vlc_ml_album_release( vlc_ml_album_t
* p_album
);
900 VLC_API
void vlc_ml_group_release( vlc_ml_group_t
* p_group
);
901 VLC_API
void vlc_ml_playlist_release( vlc_ml_playlist_t
* p_playlist
);
903 VLC_API
void vlc_ml_label_list_release( vlc_ml_label_list_t
* p_list
);
904 VLC_API
void vlc_ml_file_list_release( vlc_ml_file_list_t
* p_list
);
905 VLC_API
void vlc_ml_artist_list_release( vlc_ml_artist_list_t
* p_list
);
906 VLC_API
void vlc_ml_media_list_release( vlc_ml_media_list_t
* p_list
);
907 VLC_API
void vlc_ml_album_list_release( vlc_ml_album_list_t
* p_list
);
908 VLC_API
void vlc_ml_show_list_release( vlc_ml_show_list_t
* p_list
);
909 VLC_API
void vlc_ml_genre_list_release( vlc_ml_genre_list_t
* p_list
);
910 VLC_API
void vlc_ml_group_list_release( vlc_ml_group_list_t
* p_list
);
911 VLC_API
void vlc_ml_playlist_list_release( vlc_ml_playlist_list_t
* p_list
);
912 VLC_API
void vlc_ml_entry_point_list_release( vlc_ml_entry_point_list_t
* p_list
);
913 VLC_API
void vlc_ml_playback_states_all_release( vlc_ml_playback_states_all
* prefs
);
914 VLC_API
void vlc_ml_bookmark_release( vlc_ml_bookmark_t
* p_bookmark
);
915 VLC_API
void vlc_ml_bookmark_list_release( vlc_ml_bookmark_list_t
* p_list
);
917 static inline vlc_ml_query_params_t
vlc_ml_query_params_create()
919 return (vlc_ml_query_params_t
) {
923 .i_sort
= VLC_ML_SORTING_DEFAULT
,
928 static inline int vlc_ml_add_folder( vlc_medialibrary_t
* p_ml
, const char* psz_folder
)
930 return vlc_ml_control( p_ml
, VLC_ML_ADD_FOLDER
, psz_folder
);
933 static inline int vlc_ml_remove_folder( vlc_medialibrary_t
* p_ml
, const char* psz_folder
)
935 return vlc_ml_control( p_ml
, VLC_ML_REMOVE_FOLDER
, psz_folder
);
938 static inline int vlc_ml_ban_folder( vlc_medialibrary_t
* p_ml
, const char* psz_folder
)
940 return vlc_ml_control( p_ml
, VLC_ML_BAN_FOLDER
, psz_folder
);
943 static inline int vlc_ml_unban_folder( vlc_medialibrary_t
* p_ml
, const char* psz_folder
)
945 return vlc_ml_control( p_ml
, VLC_ML_UNBAN_FOLDER
, psz_folder
);
948 static inline int vlc_ml_list_folder( vlc_medialibrary_t
* p_ml
,
949 vlc_ml_entry_point_list_t
** pp_entrypoints
)
951 return vlc_ml_control( p_ml
, VLC_ML_LIST_FOLDERS
, pp_entrypoints
);
954 static inline int vlc_ml_list_banned_folder( vlc_medialibrary_t
* p_ml
,
955 vlc_ml_entry_point_list_t
** pp_entrypoints
)
957 return vlc_ml_control( p_ml
, VLC_ML_LIST_BANNED_FOLDERS
, pp_entrypoints
);
960 static inline int vlc_ml_is_indexed( vlc_medialibrary_t
* p_ml
,
961 const char* psz_mrl
, bool* p_res
)
963 return vlc_ml_control( p_ml
, VLC_ML_IS_INDEXED
, psz_mrl
, p_res
);
966 static inline int vlc_ml_reload_folder( vlc_medialibrary_t
* p_ml
, const char* psz_mrl
)
968 return vlc_ml_control( p_ml
, VLC_ML_RELOAD_FOLDER
, psz_mrl
);
971 static inline int vlc_ml_pause_background( vlc_medialibrary_t
* p_ml
)
973 return vlc_ml_control( p_ml
, VLC_ML_PAUSE_BACKGROUND
);
976 static inline int vlc_ml_resume_background( vlc_medialibrary_t
* p_ml
)
978 return vlc_ml_control( p_ml
, VLC_ML_RESUME_BACKGROUND
);
981 static inline int vlc_ml_clear_history( vlc_medialibrary_t
* p_ml
)
983 return vlc_ml_control( p_ml
, VLC_ML_CLEAR_HISTORY
);
986 static inline vlc_ml_media_t
* vlc_ml_new_external_media( vlc_medialibrary_t
* p_ml
, const char* psz_mrl
)
989 if ( vlc_ml_control( p_ml
, VLC_ML_NEW_EXTERNAL_MEDIA
, psz_mrl
, &res
) != VLC_SUCCESS
)
994 static inline vlc_ml_media_t
* vlc_ml_new_stream( vlc_medialibrary_t
* p_ml
, const char* psz_mrl
)
997 if ( vlc_ml_control( p_ml
, VLC_ML_NEW_STREAM
, psz_mrl
, &res
) != VLC_SUCCESS
)
1002 static inline int vlc_ml_media_update_progress( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
,
1005 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_UPDATE_PROGRESS
, i_media_id
, progress
);
1008 static inline int vlc_ml_media_get_playback_state( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
, int i_state
, char** ppsz_result
)
1010 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_GET_MEDIA_PLAYBACK_STATE
, i_media_id
, i_state
, ppsz_result
);
1013 static inline int vlc_ml_media_set_playback_state( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
, int i_state
, const char* psz_value
)
1015 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_SET_MEDIA_PLAYBACK_STATE
, i_media_id
, i_state
, psz_value
);
1018 static inline int vlc_ml_media_get_all_playback_pref( vlc_medialibrary_t
* p_ml
,
1020 vlc_ml_playback_states_all
* prefs
)
1022 return vlc_ml_control( p_ml
,VLC_ML_MEDIA_GET_ALL_MEDIA_PLAYBACK_STATES
, i_media_id
, prefs
);
1025 static inline int vlc_ml_media_set_all_playback_states( vlc_medialibrary_t
* p_ml
,
1027 const vlc_ml_playback_states_all
* prefs
)
1029 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_SET_ALL_MEDIA_PLAYBACK_STATES
, i_media_id
, prefs
);
1032 static inline int vlc_ml_media_set_thumbnail( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
,
1033 const char* psz_mrl
, vlc_ml_thumbnail_size_t sizeType
)
1035 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_SET_THUMBNAIL
, i_media_id
, psz_mrl
, sizeType
);
1038 static inline int vlc_ml_media_generate_thumbnail( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
,
1039 vlc_ml_thumbnail_size_t size_type
,
1040 uint32_t i_desired_width
,
1041 uint32_t i_desired_height
,
1044 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_GENERATE_THUMBNAIL
, i_media_id
,
1045 size_type
, i_desired_width
, i_desired_height
, position
);
1048 static inline int vlc_ml_media_add_external_mrl( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
,
1049 const char* psz_mrl
, int i_type
)
1051 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_ADD_EXTERNAL_MRL
, i_media_id
, psz_mrl
, i_type
);
1054 static inline int vlc_ml_media_set_type( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
,
1055 vlc_ml_media_type_t i_type
)
1057 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_SET_TYPE
, i_media_id
, (int)i_type
);
1060 static inline vlc_ml_bookmark_list_t
*
1061 vlc_ml_list_media_bookmarks( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
,
1062 int64_t i_media_id
)
1064 assert( p_ml
!= NULL
);
1065 vlc_ml_bookmark_list_t
* res
;
1066 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_MEDIA_BOOKMARKS
, params
, i_media_id
,
1067 &res
) != VLC_SUCCESS
)
1073 vlc_ml_media_add_bookmark( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
, int64_t i_time
)
1075 assert( p_ml
!= NULL
);
1076 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_ADD_BOOKMARK
, i_media_id
, i_time
);
1080 vlc_ml_media_remove_bookmark( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
, int64_t i_time
)
1082 assert( p_ml
!= NULL
);
1083 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_REMOVE_BOOKMARK
, i_media_id
, i_time
);
1087 vlc_ml_media_update_bookmark( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
,
1088 int64_t i_time
, const char* psz_name
,
1089 const char* psz_desc
)
1091 assert( p_ml
!= NULL
);
1092 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_UPDATE_BOOKMARK
, i_media_id
,
1093 i_time
, psz_name
, psz_desc
);
1097 vlc_ml_media_remove_all_bookmarks( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
)
1099 assert( p_ml
!= NULL
);
1100 return vlc_ml_control( p_ml
, VLC_ML_MEDIA_REMOVE_ALL_BOOKMARKS
, i_media_id
);
1103 static inline vlc_ml_playlist_t
*
1104 vlc_ml_playlist_create( vlc_medialibrary_t
* p_ml
, const char * name
)
1106 assert( p_ml
!= NULL
);
1108 vlc_ml_playlist_t
* result
;
1110 if (vlc_ml_control( p_ml
, VLC_ML_PLAYLIST_CREATE
, name
, &result
) != VLC_SUCCESS
)
1117 vlc_ml_playlist_delete( vlc_medialibrary_t
* p_ml
, int64_t i_playlist_id
)
1119 assert( p_ml
!= NULL
);
1121 return vlc_ml_control( p_ml
, VLC_ML_PLAYLIST_DELETE
, i_playlist_id
);
1125 vlc_ml_playlist_append( vlc_medialibrary_t
* p_ml
, int64_t i_playlist_id
, int64_t i_media_id
)
1127 assert( p_ml
!= NULL
);
1129 return vlc_ml_control( p_ml
, VLC_ML_PLAYLIST_APPEND
, i_playlist_id
, i_media_id
);
1133 vlc_ml_playlist_insert( vlc_medialibrary_t
* p_ml
, int64_t i_playlist_id
, int64_t i_media_id
,
1134 uint32_t i_position
)
1136 assert( p_ml
!= NULL
);
1138 return vlc_ml_control( p_ml
, VLC_ML_PLAYLIST_INSERT
, i_playlist_id
, i_media_id
, i_position
);
1142 vlc_ml_playlist_move( vlc_medialibrary_t
* p_ml
,
1143 int64_t i_playlist_id
, uint32_t i_from
, uint32_t i_to
)
1145 assert( p_ml
!= NULL
);
1147 return vlc_ml_control( p_ml
, VLC_ML_PLAYLIST_MOVE
, i_playlist_id
, i_from
, i_to
);
1151 vlc_ml_playlist_remove( vlc_medialibrary_t
* p_ml
, int64_t i_playlist_id
, uint32_t i_position
)
1153 assert( p_ml
!= NULL
);
1155 return vlc_ml_control( p_ml
, VLC_ML_PLAYLIST_REMOVE
, i_playlist_id
, i_position
);
1158 static inline vlc_ml_media_t
* vlc_ml_get_media( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
)
1160 return (vlc_ml_media_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_MEDIA
, i_media_id
);
1163 static inline vlc_ml_media_t
* vlc_ml_get_media_by_mrl( vlc_medialibrary_t
* p_ml
,
1164 const char* psz_mrl
)
1166 return (vlc_ml_media_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_MEDIA_BY_MRL
, psz_mrl
);
1169 static inline input_item_t
* vlc_ml_get_input_item( vlc_medialibrary_t
* p_ml
, int64_t i_media_id
)
1171 return (input_item_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_INPUT_ITEM
, i_media_id
);
1174 static inline input_item_t
* vlc_ml_get_input_item_by_mrl( vlc_medialibrary_t
* p_ml
,
1175 const char* psz_mrl
)
1177 return (input_item_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_INPUT_ITEM_BY_MRL
, psz_mrl
);
1180 static inline vlc_ml_album_t
* vlc_ml_get_album( vlc_medialibrary_t
* p_ml
, int64_t i_album_id
)
1182 return (vlc_ml_album_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_ALBUM
, i_album_id
);
1185 static inline vlc_ml_artist_t
* vlc_ml_get_artist( vlc_medialibrary_t
* p_ml
, int64_t i_artist_id
)
1187 return (vlc_ml_artist_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_ARTIST
, i_artist_id
);
1190 static inline vlc_ml_genre_t
* vlc_ml_get_genre( vlc_medialibrary_t
* p_ml
, int64_t i_genre_id
)
1192 return (vlc_ml_genre_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_GENRE
, i_genre_id
);
1195 static inline vlc_ml_show_t
* vlc_ml_get_show( vlc_medialibrary_t
* p_ml
, int64_t i_show_id
)
1197 return (vlc_ml_show_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_SHOW
, i_show_id
);
1200 static inline vlc_ml_group_t
* vlc_ml_get_group( vlc_medialibrary_t
* p_ml
, int64_t i_group_id
)
1202 return (vlc_ml_group_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_GROUP
, i_group_id
);
1205 static inline vlc_ml_playlist_t
* vlc_ml_get_playlist( vlc_medialibrary_t
* p_ml
, int64_t i_playlist_id
)
1207 return (vlc_ml_playlist_t
*)vlc_ml_get( p_ml
, VLC_ML_GET_PLAYLIST
, i_playlist_id
);
1210 static inline vlc_ml_media_list_t
* vlc_ml_list_media_of( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int i_parent_type
, int64_t i_parent_id
)
1212 vlc_assert( p_ml
!= NULL
);
1213 vlc_ml_media_list_t
* res
;
1214 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_MEDIA_OF
, params
, i_parent_type
, i_parent_id
, &res
) != VLC_SUCCESS
)
1219 static inline size_t vlc_ml_count_media_of( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int i_parent_type
, int64_t i_parent_id
)
1221 vlc_assert( p_ml
!= NULL
);
1223 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_MEDIA_OF
, params
, i_parent_type
, i_parent_id
, &res
) != VLC_SUCCESS
)
1228 static inline vlc_ml_artist_list_t
* vlc_ml_list_artist_of( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int i_parent_type
, int64_t i_parent_id
)
1230 vlc_assert( p_ml
!= NULL
);
1231 vlc_ml_artist_list_t
* res
;
1232 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ARTISTS_OF
, params
, i_parent_type
, i_parent_id
, &res
) != VLC_SUCCESS
)
1237 static inline size_t vlc_ml_count_artists_of( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int i_parent_type
, int64_t i_parent_id
)
1239 vlc_assert( p_ml
!= NULL
);
1241 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ARTISTS_OF
, params
, i_parent_type
, i_parent_id
, &res
) != VLC_SUCCESS
)
1246 static inline vlc_ml_album_list_t
* vlc_ml_list_albums_of( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int i_parent_type
, int64_t i_parent_id
)
1248 vlc_assert( p_ml
!= NULL
);
1249 vlc_ml_album_list_t
* res
;
1250 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ALBUMS_OF
, params
, i_parent_type
, i_parent_id
, &res
) != VLC_SUCCESS
)
1255 static inline size_t vlc_ml_count_albums_of( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int i_parent_type
, int64_t i_parent_id
)
1257 vlc_assert( p_ml
!= NULL
);
1259 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ALBUMS_OF
, params
, i_parent_type
, i_parent_id
, &res
) != VLC_SUCCESS
)
1264 static inline vlc_ml_media_list_t
* vlc_ml_list_album_tracks( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_album_id
)
1266 vlc_assert( p_ml
!= NULL
);
1267 vlc_ml_media_list_t
* res
;
1268 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ALBUM_TRACKS
, params
, i_album_id
, &res
) != VLC_SUCCESS
)
1273 static inline size_t vlc_ml_count_album_tracks( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_album_id
)
1275 vlc_assert( p_ml
!= NULL
);
1277 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ALBUM_TRACKS
, params
, i_album_id
, &count
) != VLC_SUCCESS
)
1282 static inline vlc_ml_media_list_t
* vlc_ml_list_album_artists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_album_id
)
1284 vlc_assert( p_ml
!= NULL
);
1285 vlc_ml_media_list_t
* res
;
1286 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ALBUM_ARTISTS
, params
, i_album_id
, &res
) != VLC_SUCCESS
)
1291 static inline size_t vlc_ml_count_album_artists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_album_id
)
1293 vlc_assert( p_ml
!= NULL
);
1295 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ALBUM_ARTISTS
, params
, i_album_id
, &count
) != VLC_SUCCESS
)
1300 static inline vlc_ml_album_list_t
* vlc_ml_list_artist_albums( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_artist_id
)
1302 vlc_assert( p_ml
!= NULL
);
1303 vlc_ml_album_list_t
* res
;
1304 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ARTIST_ALBUMS
, params
, i_artist_id
, &res
) != VLC_SUCCESS
)
1309 static inline size_t vlc_ml_count_artist_albums( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_artist_id
)
1311 vlc_assert( p_ml
!= NULL
);
1313 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ARTIST_ALBUMS
, params
, i_artist_id
, &count
) != VLC_SUCCESS
)
1318 static inline vlc_ml_media_list_t
* vlc_ml_list_artist_tracks( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_artist_id
)
1320 vlc_assert( p_ml
!= NULL
);
1321 vlc_ml_media_list_t
* res
;
1322 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ARTIST_TRACKS
, params
, i_artist_id
, &res
) != VLC_SUCCESS
)
1327 static inline size_t vlc_ml_count_artist_tracks( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_artist_id
)
1329 vlc_assert( p_ml
!= NULL
);
1331 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ARTIST_TRACKS
, params
, i_artist_id
, &count
) != VLC_SUCCESS
)
1336 static inline vlc_ml_media_list_t
* vlc_ml_list_video_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1338 vlc_assert( p_ml
!= NULL
);
1339 vlc_ml_media_list_t
* res
;
1340 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_VIDEOS
, params
, &res
) != VLC_SUCCESS
)
1345 static inline size_t vlc_ml_count_video_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1347 vlc_assert( p_ml
!= NULL
);
1349 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_VIDEOS
, params
, &count
) != VLC_SUCCESS
)
1354 static inline vlc_ml_media_list_t
* vlc_ml_list_audio_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1356 vlc_assert( p_ml
!= NULL
);
1357 vlc_ml_media_list_t
* res
;
1358 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_AUDIOS
, params
, &res
) != VLC_SUCCESS
)
1363 static inline size_t vlc_ml_count_audio_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1365 vlc_assert( p_ml
!= NULL
);
1367 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_AUDIOS
, params
, &count
) != VLC_SUCCESS
)
1372 static inline vlc_ml_album_list_t
* vlc_ml_list_albums( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1374 vlc_assert( p_ml
!= NULL
);
1375 vlc_ml_album_list_t
* res
;
1376 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ALBUMS
, params
, &res
) != VLC_SUCCESS
)
1381 static inline size_t vlc_ml_count_albums( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1383 vlc_assert( p_ml
!= NULL
);
1385 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ALBUMS
, params
, &count
) != VLC_SUCCESS
)
1390 static inline vlc_ml_genre_list_t
* vlc_ml_list_genres( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1392 vlc_assert( p_ml
!= NULL
);
1393 vlc_ml_genre_list_t
* res
;
1394 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_GENRES
, params
, &res
) != VLC_SUCCESS
)
1399 static inline size_t vlc_ml_count_genres( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1401 vlc_assert( p_ml
!= NULL
);
1403 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_GENRES
, params
, &count
) != VLC_SUCCESS
)
1409 * @brief vlc_ml_list_artists
1410 * @param params Query parameters, or NULL for the default
1411 * @param b_include_all True if you wish to fetch artists without at least one album.
1414 static inline vlc_ml_artist_list_t
* vlc_ml_list_artists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, bool b_include_all
)
1416 vlc_assert( p_ml
!= NULL
);
1417 vlc_ml_artist_list_t
* res
;
1418 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_ARTISTS
, params
, (int)b_include_all
, &res
) != VLC_SUCCESS
)
1423 static inline size_t vlc_ml_count_artists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, bool includeAll
)
1425 vlc_assert( p_ml
!= NULL
);
1427 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_ARTISTS
, params
, includeAll
, &count
) != VLC_SUCCESS
)
1432 static inline vlc_ml_show_list_t
* vlc_ml_list_shows( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1434 vlc_assert( p_ml
!= NULL
);
1435 vlc_ml_show_list_t
* res
;
1436 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_SHOWS
, params
, &res
) != VLC_SUCCESS
)
1441 static inline size_t vlc_ml_count_shows( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1443 vlc_assert( p_ml
!= NULL
);
1445 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_SHOWS
, params
, &count
) != VLC_SUCCESS
)
1450 static inline vlc_ml_artist_list_t
* vlc_ml_list_genre_artists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_genre_id
)
1452 vlc_assert( p_ml
!= NULL
);
1453 vlc_ml_artist_list_t
* res
;
1454 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_GENRE_ARTISTS
, params
, i_genre_id
, &res
) != VLC_SUCCESS
)
1459 static inline size_t vlc_ml_count_genre_artists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_genre_id
)
1461 vlc_assert( p_ml
!= NULL
);
1463 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_GENRE_ARTISTS
, params
, i_genre_id
, &count
) != VLC_SUCCESS
)
1468 static inline vlc_ml_media_list_t
* vlc_ml_list_genre_tracks( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_genre_id
)
1470 vlc_assert( p_ml
!= NULL
);
1471 vlc_ml_media_list_t
* res
;
1472 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_GENRE_TRACKS
, params
, i_genre_id
, &res
) != VLC_SUCCESS
)
1477 static inline size_t vlc_ml_count_genre_tracks( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_genre_id
)
1479 vlc_assert( p_ml
!= NULL
);
1481 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_GENRE_TRACKS
, params
, i_genre_id
, &count
) != VLC_SUCCESS
)
1486 static inline vlc_ml_album_list_t
* vlc_ml_list_genre_albums( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_genre_id
)
1488 vlc_assert( p_ml
!= NULL
);
1489 vlc_ml_album_list_t
* res
;
1490 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_GENRE_ALBUMS
, params
, i_genre_id
, &res
) != VLC_SUCCESS
)
1495 static inline size_t vlc_ml_count_genre_albums( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_genre_id
)
1497 vlc_assert( p_ml
!= NULL
);
1499 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_GENRE_ALBUMS
, params
, i_genre_id
, &count
) != VLC_SUCCESS
)
1504 static inline vlc_ml_media_list_t
* vlc_ml_list_show_episodes( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_show_id
)
1506 vlc_assert( p_ml
!= NULL
);
1507 vlc_ml_media_list_t
* res
;
1508 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_SHOW_EPISODES
, params
, i_show_id
, &res
) != VLC_SUCCESS
)
1513 static inline size_t vlc_ml_count_show_episodes( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_show_id
)
1515 vlc_assert( p_ml
!= NULL
);
1517 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_GENRE_ALBUMS
, params
, i_show_id
, &count
) != VLC_SUCCESS
)
1522 static inline vlc_ml_label_list_t
* vlc_ml_list_media_labels( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_media_id
)
1524 vlc_assert( p_ml
!= NULL
);
1525 vlc_ml_label_list_t
* res
;
1526 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_MEDIA_LABELS
, params
, i_media_id
, &res
) != VLC_SUCCESS
)
1531 static inline size_t vlc_ml_count_media_labels( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_media_id
)
1533 vlc_assert( p_ml
!= NULL
);
1535 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_MEDIA_LABELS
, params
, i_media_id
, &count
) != VLC_SUCCESS
)
1540 static inline vlc_ml_media_list_t
* vlc_ml_list_history( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1542 vlc_assert( p_ml
!= NULL
);
1543 vlc_ml_media_list_t
* res
;
1544 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_HISTORY
, params
, &res
) != VLC_SUCCESS
)
1549 static inline size_t vlc_ml_count_history( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1551 vlc_assert( p_ml
!= NULL
);
1553 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_HISTORY
, params
, &count
) != VLC_SUCCESS
)
1559 static inline vlc_ml_media_list_t
* vlc_ml_list_history_by_type( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, vlc_ml_media_type_t type
)
1561 vlc_assert( p_ml
!= NULL
);
1562 vlc_ml_media_list_t
* res
;
1563 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_HISTORY_BY_TYPE
, params
, (int)type
, &res
) != VLC_SUCCESS
)
1568 static inline size_t vlc_ml_count_history_by_type( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, vlc_ml_media_type_t type
)
1570 vlc_assert( p_ml
!= NULL
);
1572 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_HISTORY_BY_TYPE
, params
, (int)type
, &count
) != VLC_SUCCESS
)
1579 static inline vlc_ml_media_list_t
* vlc_ml_list_stream_history( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1581 vlc_assert( p_ml
!= NULL
);
1582 vlc_ml_media_list_t
* res
;
1583 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_STREAM_HISTORY
, params
, &res
) != VLC_SUCCESS
)
1588 static inline size_t vlc_ml_count_stream_history( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1590 vlc_assert( p_ml
!= NULL
);
1592 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_STREAM_HISTORY
, params
, &count
) != VLC_SUCCESS
)
1597 //-------------------------------------------------------------------------------------------------
1600 static inline vlc_ml_group_list_t
* vlc_ml_list_groups( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1602 vlc_assert( p_ml
!= NULL
);
1603 vlc_ml_group_list_t
* res
;
1604 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_GROUPS
, params
, &res
) != VLC_SUCCESS
)
1609 static inline size_t vlc_ml_count_groups( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1611 vlc_assert( p_ml
!= NULL
);
1613 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_GROUPS
, params
, &count
) != VLC_SUCCESS
)
1618 static inline vlc_ml_media_list_t
* vlc_ml_list_group_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_group_id
)
1620 vlc_assert( p_ml
!= NULL
);
1621 vlc_ml_media_list_t
* res
;
1622 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_GROUP_MEDIA
, params
, i_group_id
, &res
) != VLC_SUCCESS
)
1627 static inline size_t vlc_ml_count_group_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_group_id
)
1629 vlc_assert( p_ml
!= NULL
);
1631 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_GROUP_MEDIA
, params
, i_group_id
, &count
) != VLC_SUCCESS
)
1636 //-------------------------------------------------------------------------------------------------
1638 static inline vlc_ml_playlist_list_t
* vlc_ml_list_playlists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1640 vlc_assert( p_ml
!= NULL
);
1641 vlc_ml_playlist_list_t
* res
;
1642 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_PLAYLISTS
, params
, &res
) != VLC_SUCCESS
)
1647 static inline size_t vlc_ml_count_playlists( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
)
1649 vlc_assert( p_ml
!= NULL
);
1651 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_PLAYLISTS
, params
, &count
) != VLC_SUCCESS
)
1656 static inline vlc_ml_media_list_t
* vlc_ml_list_playlist_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_playlist_id
)
1658 vlc_assert( p_ml
!= NULL
);
1659 vlc_ml_media_list_t
* res
;
1660 if ( vlc_ml_list( p_ml
, VLC_ML_LIST_PLAYLIST_MEDIA
, params
, i_playlist_id
, &res
) != VLC_SUCCESS
)
1665 static inline size_t vlc_ml_count_playlist_media( vlc_medialibrary_t
* p_ml
, const vlc_ml_query_params_t
* params
, int64_t i_playlist_id
)
1667 vlc_assert( p_ml
!= NULL
);
1669 if ( vlc_ml_list( p_ml
, VLC_ML_COUNT_PLAYLIST_MEDIA
, params
, i_playlist_id
, &count
) != VLC_SUCCESS
)
1679 # define vlc_ml_release( OBJ ) _Generic( ( OBJ ), \
1680 vlc_ml_show_t*: vlc_ml_show_release, \
1681 vlc_ml_artist_t*: vlc_ml_artist_release, \
1682 vlc_ml_album_t*: vlc_ml_album_release, \
1683 vlc_ml_genre_t*: vlc_ml_genre_release, \
1684 vlc_ml_media_t*: vlc_ml_media_release, \
1685 vlc_ml_group_t*: vlc_ml_group_release, \
1686 vlc_ml_playlist_t*: vlc_ml_playlist_release, \
1687 vlc_ml_label_list_t*: vlc_ml_label_list_release, \
1688 vlc_ml_file_list_t*: vlc_ml_file_list_release, \
1689 vlc_ml_artist_list_t*: vlc_ml_artist_list_release, \
1690 vlc_ml_media_list_t*: vlc_ml_media_list_release, \
1691 vlc_ml_album_list_t*: vlc_ml_album_list_release, \
1692 vlc_ml_show_list_t*: vlc_ml_show_list_release, \
1693 vlc_ml_genre_list_t*: vlc_ml_genre_list_release, \
1694 vlc_ml_group_list_t*: vlc_ml_group_list_release, \
1695 vlc_ml_playlist_list_t*: vlc_ml_playlist_list_release, \
1696 vlc_ml_entry_point_list_t*: vlc_ml_entry_point_list_release, \
1697 vlc_ml_playback_states_all*: vlc_ml_playback_states_all_release, \
1698 vlc_ml_bookmark_t*: vlc_ml_bookmark_release, \
1699 vlc_ml_bookmark_list_t*: vlc_ml_bookmark_list_release \
1702 static inline void vlc_ml_release( vlc_ml_show_t
* show
) { vlc_ml_show_release( show
); }
1703 static inline void vlc_ml_release( vlc_ml_artist_t
* artist
) { vlc_ml_artist_release( artist
); }
1704 static inline void vlc_ml_release( vlc_ml_album_t
* album
) { vlc_ml_album_release( album
); }
1705 static inline void vlc_ml_release( vlc_ml_genre_t
* genre
) { vlc_ml_genre_release( genre
); }
1706 static inline void vlc_ml_release( vlc_ml_media_t
* media
) { vlc_ml_media_release( media
); }
1707 static inline void vlc_ml_release( vlc_ml_group_t
* group
) { vlc_ml_group_release( group
); }
1708 static inline void vlc_ml_release( vlc_ml_playlist_t
* playlist
) { vlc_ml_playlist_release( playlist
); }
1709 static inline void vlc_ml_release( vlc_ml_label_list_t
* list
) { vlc_ml_label_list_release( list
); }
1710 static inline void vlc_ml_release( vlc_ml_file_list_t
* list
) { vlc_ml_file_list_release( list
); }
1711 static inline void vlc_ml_release( vlc_ml_artist_list_t
* list
) { vlc_ml_artist_list_release( list
); }
1712 static inline void vlc_ml_release( vlc_ml_media_list_t
* list
) { vlc_ml_media_list_release( list
); }
1713 static inline void vlc_ml_release( vlc_ml_album_list_t
* list
) { vlc_ml_album_list_release( list
); }
1714 static inline void vlc_ml_release( vlc_ml_show_list_t
* list
) { vlc_ml_show_list_release( list
); }
1715 static inline void vlc_ml_release( vlc_ml_genre_list_t
* list
) { vlc_ml_genre_list_release( list
); }
1716 static inline void vlc_ml_release( vlc_ml_group_list_t
* list
) { vlc_ml_group_list_release( list
); }
1717 static inline void vlc_ml_release( vlc_ml_playlist_list_t
* list
) { vlc_ml_playlist_list_release( list
); }
1718 static inline void vlc_ml_release( vlc_ml_entry_point_list_t
* list
) { vlc_ml_entry_point_list_release( list
); }
1719 static inline void vlc_ml_release( vlc_ml_playback_states_all
* prefs
) { vlc_ml_playback_states_all_release( prefs
); }
1720 static inline void vlc_ml_release( vlc_ml_bookmark_t
* bookmark
) { vlc_ml_bookmark_release( bookmark
); }
1721 static inline void vlc_ml_release( vlc_ml_bookmark_list_t
* list
) { vlc_ml_bookmark_list_release( list
); }
1724 #endif /* VLC_MEDIA_LIBRARY_H */