VLC 4.0.0-dev
vlc_media_library.h
Go to the documentation of this file.
1/*****************************************************************************
2 * vlc_media_library.h: SQL-based media library
3 *****************************************************************************
4 * Copyright (C) 2008-2010 the VideoLAN Team and AUTHORS
5 *
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>
11 *
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.
16 *
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.
21 *
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 *****************************************************************************/
26
27#ifndef VLC_MEDIA_LIBRARY_H
28# define VLC_MEDIA_LIBRARY_H
29
30#include <assert.h>
31#include <vlc_common.h>
32
33# ifdef __cplusplus
34extern "C" {
35# endif
36
37typedef enum vlc_ml_media_type_t
44typedef enum vlc_ml_media_subtype_t
52typedef enum vlc_ml_file_type_t
62typedef enum vlc_ml_track_type_t
69typedef enum vlc_ml_thumbnail_size_t
86typedef enum vlc_ml_history_type_t
92typedef enum vlc_ml_playlist_type_t
99typedef struct vlc_ml_thumbnail_t
101 char* psz_mrl;
102 /**
103 * True if a thumbnail is available, or if thumbnail generation was
104 * attempted but failed
105 */
109typedef struct vlc_ml_movie_t
111 char* psz_summary;
115typedef struct vlc_ml_show_episode_t
117 char* psz_summary;
119 uint32_t i_episode_nb;
123typedef struct vlc_ml_show_t
125 int64_t i_id;
126 char* psz_name;
130 unsigned int i_release_year;
132 uint32_t i_nb_seasons;
135typedef struct vlc_ml_label_t
137 int64_t i_id;
138 char* psz_name;
141typedef struct vlc_ml_label_list_t
143 size_t i_nb_items;
147typedef struct vlc_ml_file_t
149 char* psz_mrl;
150 int64_t i_size;
158typedef struct vlc_ml_file_list_t
160 size_t i_nb_items;
164typedef struct vlc_ml_media_track_t
166 char* psz_codec;
170 uint32_t i_bitrate;
171 union
172 {
173 struct
174 {
175 // Audio
176 uint32_t i_nbChannels;
177 uint32_t i_sampleRate;
178 } a;
179 struct
180 {
181 // Video
182 uint32_t i_height;
183 uint32_t i_width;
184 uint32_t i_sarNum;
185 uint32_t i_sarDen;
186 uint32_t i_fpsNum;
187 uint32_t i_fpsDen;
188 } v;
189 };
192typedef struct vlc_ml_media_track_list_t
194 size_t i_nb_items;
198typedef struct vlc_ml_media_t
200 int64_t i_id;
208 int32_t i_year;
209 /* Duration in milliseconds */
210 int64_t i_duration;
211 uint32_t i_playcount;
219 bool b_is_favorite;
221 union
222 {
225 struct
226 {
227 int64_t i_artist_id;
228 int64_t i_album_id;
229 int64_t i_genre_id;
231 int i_track_nb;
234 };
237typedef struct vlc_ml_group_t
239 int64_t i_id;
241 char* psz_name;
243 uint32_t i_nb_total_media;
244 uint32_t i_nb_video;
245 uint32_t i_nb_audio;
246 uint32_t i_nb_unknown;
252 uint32_t i_nb_seen;
255 int64_t i_duration;
257 time_t i_creation_date;
261typedef struct vlc_ml_playlist_t
263 int64_t i_id;
265 char* psz_name;
267 char* psz_mrl;
269 char* psz_artwork_mrl;
271 unsigned int i_nb_media;
272 uint32_t i_nb_video;
273 uint32_t i_nb_audio;
274 uint32_t i_nb_unknown;
276 unsigned int i_nb_present_media;
281 uint32_t i_creation_date;
283 int64_t i_duration; /* In ms */
286 bool b_is_read_only;
289typedef struct vlc_ml_artist_t
291 int64_t i_id;
292 char* psz_name;
297 unsigned int i_nb_album;
298 unsigned int i_nb_tracks;
302typedef struct vlc_ml_artist_list_t
304 size_t i_nb_items;
308typedef struct vlc_ml_album_t {
309 int64_t i_id;
314 int64_t i_artist_id;
316 uint32_t i_nb_tracks;
318 uint32_t i_nb_discs;
319 int64_t i_duration; /* in ms */
320 unsigned int i_year;
323typedef struct vlc_ml_genre_t
325 int64_t i_id;
326 char* psz_name;
331typedef struct vlc_ml_media_list_t
333 size_t i_nb_items;
337typedef struct vlc_ml_album_list_t
339 size_t i_nb_items;
343typedef struct vlc_ml_show_list_t
345 size_t i_nb_items;
349typedef struct vlc_ml_genre_list_t
351 size_t i_nb_items;
355typedef struct vlc_ml_group_list_t
357 size_t i_nb_items;
361typedef struct vlc_ml_playlist_list_t
363 size_t i_nb_items;
367typedef struct vlc_ml_folder_t
369 int64_t i_id; /**< The folder's MRL. Will be NULL if b_present is false */
370 char* psz_name; /**< The folder's name */
371 char* psz_mrl; /**< The folder's MRL. Will be NULL if b_present is false */
372 unsigned int i_nb_media; /**< The media count */
373 unsigned int i_nb_video; /**< The number of video for this folder */
374 unsigned int i_nb_audio; /**< The number of audio for this volder */
375 bool b_present; /**< The folder's presence state */
376 bool b_banned; /**< Will be true if the user required this folder to be excluded */
379typedef struct vlc_ml_folder_list_t
381 size_t i_nb_items;
385typedef struct vlc_ml_bookmark_t
387 int64_t i_media_id; /**< The associated media ID */
388 int64_t i_time; /**< The bookmark time. The unit is arbitrary */
389 char* psz_name; /**< The bookmark name */
390 char* psz_description; /**< The bookmark description */
393typedef struct vlc_ml_boomkmark_list_t
395 size_t i_nb_items;
399/* Opaque medialibrary pointer, to be used by any non-medialibrary module */
401/* "Private" medialibrary pointer, to be used by the core & medialibrary modules */
403/* Opaque event callback type */
406typedef enum vlc_ml_sorting_criteria_t
408 /*
409 * Default depends on the entity type:
410 * - By track number (and disc number) for album tracks
411 * - Alphabetical order for others
412 */
430 const char* psz_pattern;
431 uint32_t i_nbResults;
432 uint32_t i_offset;
434 bool b_desc;
436
439 VLC_ML_GET_MEDIA, /**< arg1: Media ID; ret: vlc_ml_media_t* */
440 VLC_ML_GET_MEDIA_BY_MRL, /**< arg1: Media MRL; ret: vlc_ml_media_t* */
441 VLC_ML_GET_INPUT_ITEM, /**< arg1: Media ID; ret: input_item_t* */
442 VLC_ML_GET_INPUT_ITEM_BY_MRL, /**< arg1: Media MRL; ret: input_item_t* */
443 VLC_ML_GET_ALBUM, /**< arg1: Album ID; ret: vlc_ml_album_t* */
444 VLC_ML_GET_ARTIST, /**< arg1: Artist ID; ret: vlc_ml_artist_t* */
445 VLC_ML_GET_GENRE, /**< arg1: Genre ID; ret: vlc_ml_genre_t* */
446 VLC_ML_GET_SHOW, /**< arg1: Show ID; ret: vlc_ml_show_t* */
447 VLC_ML_GET_PLAYLIST, /**< arg1: Playlist ID; ret: vlc_ml_playlist_t* */
448 VLC_ML_GET_GROUP, /**< arg1: Group ID; ret: vlc_ml_group_t* */
449 VLC_ML_GET_FOLDER, /**< arg1: folder ID; ret: vlc_ml_folder_t* */
451
454 /* General listing: */
455
456 VLC_ML_LIST_VIDEOS, /**< arg1 (out): vlc_ml_media_list_t** */
457 VLC_ML_COUNT_VIDEOS, /**< arg1 (out): size_t* */
458 VLC_ML_LIST_AUDIOS, /**< arg1 (out): vlc_ml_media_list_t** */
459 VLC_ML_COUNT_AUDIOS, /**< arg1 (out): size_t* */
460 VLC_ML_LIST_ALBUMS, /**< arg1 (out): vlc_ml_album_list_t** */
461 VLC_ML_COUNT_ALBUMS, /**< arg1 (out): size_t* */
462 VLC_ML_LIST_GENRES, /**< arg1 (out): vlc_ml_genre_list_t** */
463 VLC_ML_COUNT_GENRES, /**< arg1 (out): size_t* */
464 VLC_ML_LIST_ARTISTS, /**< arg1 bool: includeAll; arg2 (out): vlc_ml_genre_list_t** */
465 VLC_ML_COUNT_ARTISTS, /**< arg1 bool: includeAll; arg2 (out): size_t* */
466 VLC_ML_LIST_SHOWS, /**< arg1 (out): vlc_ml_show_list_t** */
467 VLC_ML_COUNT_SHOWS, /**< arg1 (out): size_t* */
468 VLC_ML_LIST_GROUPS, /**< arg1 (out): vlc_ml_group_list_t** */
469 VLC_ML_COUNT_GROUPS, /**< arg1 (out): size_t* */
470 VLC_ML_LIST_PLAYLISTS, /**< arg1 (out): vlc_ml_playlist_list_t** */
471 VLC_ML_COUNT_PLAYLISTS, /**< arg1 (out): size_t* */
472 VLC_ML_LIST_HISTORY, /**< arg1 (out): vlc_ml_media_list_t** */
473 VLC_ML_COUNT_HISTORY, /**< arg1 (out): size_t* */
474 VLC_ML_LIST_HISTORY_BY_TYPE, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t** */
475 VLC_ML_COUNT_HISTORY_BY_TYPE, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t** */
476 VLC_ML_LIST_STREAM_HISTORY, /**< arg1 (out): vlc_ml_media_list_t** */
477 VLC_ML_COUNT_STREAM_HISTORY, /**< arg1 (out): size_t* */
478 VLC_ML_LIST_ENTRY_POINTS, /**< arg1 bool: list_banned; arg2 (out): vlc_ml_folder_list_t** */
479 VLC_ML_COUNT_ENTRY_POINTS, /**< arg1 bool: list_banned; arg2 (out): size_t* */
480 VLC_ML_LIST_FOLDERS, /**< arg1 (out): vlc_ml_folder_list_t** */
481 VLC_ML_COUNT_FOLDERS, /**< arg1 (out): size_t* */
482 VLC_ML_LIST_FOLDERS_BY_TYPE, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t** */
483 VLC_ML_COUNT_FOLDERS_BY_TYPE, /**< arg1 vlc_ml_media_type_t: the media type. arg2 (out): vlc_ml_media_list_t** */
485 /* Album specific listings */
486 VLC_ML_LIST_ALBUM_TRACKS, /**< arg1: The album id. arg2 (out): vlc_ml_media_list_t** */
487 VLC_ML_COUNT_ALBUM_TRACKS, /**< arg1: The album id. arg2 (out): size_t* */
488 VLC_ML_LIST_ALBUM_ARTISTS, /**< arg1: The album id. arg2 (out): vlc_ml_album_list_t** */
489 VLC_ML_COUNT_ALBUM_ARTISTS, /**< arg1: The album id. arg2 (out): size_t* */
491 /* Artist specific listings */
492 VLC_ML_LIST_ARTIST_ALBUMS, /**< arg1: The artist id. arg2(out): vlc_ml_album_list_t** */
493 VLC_ML_COUNT_ARTIST_ALBUMS, /**< arg1: The artist id. arg2(out): size_t* */
494 VLC_ML_LIST_ARTIST_TRACKS, /**< arg1: The artist id. arg2(out): vlc_ml_media_list_t** */
495 VLC_ML_COUNT_ARTIST_TRACKS, /**< arg1: The artist id. arg2(out): size_t* */
497 /* Genre specific listings */
498 VLC_ML_LIST_GENRE_ARTISTS, /**< arg1: genre id; arg2 (out): vlc_ml_artist_list_t** */
499 VLC_ML_COUNT_GENRE_ARTISTS, /**< arg1: genre id; arg2 (out): size_t* */
500 VLC_ML_LIST_GENRE_TRACKS, /**< arg1: genre id; arg2 (out): vlc_ml_media_list_t** */
501 VLC_ML_COUNT_GENRE_TRACKS, /**< arg1: genre id; arg2 (out): size_t* */
502 VLC_ML_LIST_GENRE_ALBUMS, /**< arg1: genre id; arg2 (out): vlc_ml_album_list_t** */
503 VLC_ML_COUNT_GENRE_ALBUMS, /**< arg1: genre id; arg2 (out): size_t* */
505 /* Show specific listings */
506 VLC_ML_LIST_SHOW_EPISODES, /**< arg1: show id; arg2(out): vlc_ml_media_list_t** */
507 VLC_ML_COUNT_SHOW_EPISODES, /**< arg1: show id; arg2(out): size_t* */
509 /* Media specific listings */
510 VLC_ML_LIST_MEDIA_LABELS, /**< arg1: media id; arg2 (out): vlc_ml_label_list_t** */
511 VLC_ML_COUNT_MEDIA_LABELS, /**< arg1: media id; arg2 (out): size_t* */
512 VLC_ML_LIST_MEDIA_BOOKMARKS, /**< arg1: media id; arg2 (out): vlc_ml_bookmark_list_t** */
514 /* Groups specific listings */
515 VLC_ML_LIST_GROUP_MEDIA, /**< arg1: playlist id; arg2 (out): vlc_ml_media_list_t** */
516 VLC_ML_COUNT_GROUP_MEDIA, /**< arg1: playlist id; arg2 (out): size_t* */
518 /* Playlist specific listings */
519 VLC_ML_LIST_PLAYLIST_MEDIA, /**< arg1: playlist id; arg2 (out): vlc_ml_media_list_t** */
520 VLC_ML_COUNT_PLAYLIST_MEDIA, /**< arg1: playlist id; arg2 (out): size_t* */
522 /* Folder specific listings */
523 VLC_ML_LIST_SUBFOLDERS, /**< arg1: parent id; arg2 (out): vlc_ml_folder_list_t** */
524 VLC_ML_COUNT_SUBFOLDERS, /**< arg1: parent id; arg2 (out): size_t* */
525 VLC_ML_LIST_FOLDER_MEDIA, /**< arg1: folder id; arg2 (out): vlc_ml_media_list_t** */
526 VLC_ML_COUNT_FOLDER_MEDIA, /**< arg1: folder id; arg2 (out): size_t* */
528 /* Children entities listing */
529 VLC_ML_LIST_MEDIA_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): ml_media_list_t** */
530 VLC_ML_COUNT_MEDIA_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
531 VLC_ML_LIST_VIDEO_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
532 VLC_ML_COUNT_VIDEO_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
533 VLC_ML_LIST_AUDIO_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
534 VLC_ML_COUNT_AUDIO_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
535 VLC_ML_LIST_ARTISTS_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): ml_artist_list_t** */
536 VLC_ML_COUNT_ARTISTS_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
537 VLC_ML_LIST_ALBUMS_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): ml_album_list_t** */
538 VLC_ML_COUNT_ALBUMS_OF, /**< arg1: parent entity type; arg2: parent entity id; arg3(out): size_t* */
540
552
555 /* Adds a folder to discover through the medialibrary */
556 VLC_ML_ADD_FOLDER, /**< arg1: mrl (const char*) res: can't fail */
557 VLC_ML_REMOVE_FOLDER, /**< arg1: mrl (const char*) res: can't fail */
558 VLC_ML_BAN_FOLDER, /**< arg1: mrl (const char*) res: can't fail */
559 VLC_ML_UNBAN_FOLDER, /**< arg1: mrl (const char*) res: can't fail */
560 VLC_ML_IS_INDEXED, /**< arg1: mrl (const char*) arg2 (out): bool*; res: can fail */
561 /**
562 * Reload a specific folder, or all.
563 * arg1: mrl (const char*), NULL to reload all folders
564 * res: can't fail
565 */
568 /* Pause/resume background operations, such as media discovery & media analysis */
569 VLC_ML_PAUSE_BACKGROUND, /**< no args; can't fail */
570 VLC_ML_RESUME_BACKGROUND, /**< no args; can't fail */
572 /* Misc operations */
573 VLC_ML_CLEAR_HISTORY, /**< no args; can't fail */
575 /* Create media */
576 VLC_ML_NEW_EXTERNAL_MEDIA, /**< arg1: const char*; arg2(out): vlc_ml_media_t** */
577 VLC_ML_NEW_STREAM, /**< arg1: const char*; arg2(out): vlc_ml_media_t** */
579 /* Media management */
580 VLC_ML_MEDIA_UPDATE_PROGRESS, /**< arg1: media id; arg2: playback position; can fail */
581 VLC_ML_MEDIA_GET_MEDIA_PLAYBACK_STATE, /**< arg1: media id; arg2: vlc_ml_playback_state; arg3: char**; */
582 VLC_ML_MEDIA_SET_MEDIA_PLAYBACK_STATE, /**< arg1: media id; arg2: vlc_ml_playback_state; arg3: const char*; */
583 VLC_ML_MEDIA_GET_ALL_MEDIA_PLAYBACK_STATES, /**< arg1: media id; arg2(out): vlc_ml_playback_states_all* */
584 VLC_ML_MEDIA_SET_ALL_MEDIA_PLAYBACK_STATES, /**< arg1: media id; arg2: const vlc_ml_playback_states_all* */
585 VLC_ML_MEDIA_SET_THUMBNAIL, /**< arg1: media id; arg2: const char*; arg3: vlc_ml_thumbnail_size_t */
586 VLC_ML_MEDIA_SET_GENRE_THUMBNAIL, /**< arg1: media id; arg2: const char*; arg3: vlc_ml_thumbnail_size_t */
587 VLC_ML_MEDIA_GENERATE_THUMBNAIL, /**< arg1: media id; arg2: vlc_ml_thumbnail_size_t; arg3: width; arg4: height; arg5: position */
588 VLC_ML_MEDIA_ADD_EXTERNAL_MRL, /**< arg1: media id; arg2: const char*; arg3: type(vlc_ml_file_type_t) */
589 VLC_ML_MEDIA_SET_TYPE, /**< arg1: media id; arg2: vlc_ml_media_type_t */
590 VLC_ML_MEDIA_SET_PLAYED, /**< arg1: media id; arg2: bool */
591 VLC_ML_MEDIA_SET_FAVORITE, /**< arg1: media id; arg2: bool */
592 VLC_ML_MEDIA_ADD_BOOKMARK, /**< arg1: media id; arg2: int64_t */
593 VLC_ML_MEDIA_REMOVE_BOOKMARK, /**< arg1: media id; arg2: int64_t */
594 VLC_ML_MEDIA_REMOVE_ALL_BOOKMARKS, /**< arg1: media id */
595 VLC_ML_MEDIA_UPDATE_BOOKMARK, /**< arg1: media id; arg2: int64_t; arg3: const char*; arg4: const char* */
597 /* Playlist management */
598 VLC_ML_PLAYLIST_CREATE, /**< arg1: const char*; arg2(out): vlc_ml_playlist_t**; can fail */
599 VLC_ML_PLAYLIST_DELETE, /**< arg1: playlist id; can fail */
600 VLC_ML_PLAYLIST_APPEND, /**< arg1: playlist id; arg2: media id; can fail */
601 VLC_ML_PLAYLIST_INSERT, /**< arg1: playlist id; arg2: media id; arg3: position; can fail */
602 VLC_ML_PLAYLIST_MOVE, /**< arg1: playlist id; arg2: from; arg3: to; can fail */
603 VLC_ML_PLAYLIST_REMOVE, /**< arg1: playlist id; arg2: position; can fail */
604 VLC_ML_PLAYLIST_RENAME /**< arg1: playlist id; arg2: const char*; can fail */
605};
607/**
608 * User playback settings.
609 * All values/units are up to the caller and are not interpreted by the media
610 * library.
611 * All values are stored and returned as strings.
612 * When calling vlc_medialibrary_t::pf_control with vlc_ml_MEDIA_GET_MEDIA_PLAYBACK_STATE,
613 * the value will be returned stored in the provided char**. If the state was
614 * not set yet, NULL will be returned.
615 * When setting a state, NULL can be provided as a value to unset it.
616 */
637
638typedef struct vlc_ml_playback_states_all
640 float rate;
641 float zoom;
647 char* crop;
654 /**
655 * Entity modification callbacks. The affected entity will be passed:
656 * - As a vlc_ml_<type>_t, depending on the type of the modified/inserted
657 * entity, in vlc_ml_event_t::modification::p_<type>
658 * for ADDED and UPDATED variants.
659 * - as an id, in vlc_ml_event_t::deletion::i_entity_id
660 * When _DELETED callbacks get invoked, the entity will already have been
661 * deleted from the database, and cannot be retrieved anymore
662 */
687 /**
688 * A discovery started.
689 *
690 * This event will be emitted when the media library starts discovering a
691 * scheduled entry point.
692 * If more than a single entry point are queued, this event won't be fired
693 * again until all operations are completed and a new operation is scheduled.
694 * Once all currently queued operations are done
695 * VLC_ML_EVENT_DISCOVERY_COMPLETED will be emitted.
696 */
698 /**
699 * Sent when a discovery or reload operation starts analyzing a new folder.
700 * The discovered entry point is stored in
701 * vlc_ml_event_t::discovery_progress::psz_entry_point.
702 */
704 /**
705 * Sent when all queued discovery operations are done being processed.
706 */
708 /**
709 * This event is sent when a discovery failed. The entry point that failed to
710 * be discovered is stored in
711 * vlc_ml_event_t::discovery_failed::psz_entry_point
712 */
714 /**
715 * Sent when a new entry point gets added to the database.
716 * The entry point that was added is stored in
717 * vlc::ml_event_t::entry_point_added::psz_entry_point, and the success or failure
718 * state is stored in vlc_ml_event_t::entry_point_added::b_success
719 * If successful, this event won't be emitted again for this entry point.
720 * In case of failure, this event will be fired again if the same entry point
721 * is queued for discovery again.
722 */
724 /**
725 * Sent when an entry point removal request has been processed.
726 * The removed entry point is stored in
727 * vlc_ml_event_t::entry_point_removed::psz_entry_point and the success or failure
728 * state is stored in vlc_ml_event_t::entry_point_removed::b_success
729 */
731 /**
732 * Sent when an entry point ban request has been processed.
733 * The banned entry point is stored in
734 * vlc_ml_event_t::entry_point_banned::psz_entry_point and the operation success
735 * state is stored in vlc_ml_event_t::entry_point_banned::b_success
736 */
738 /**
739 * Sent when an entry point unban request has been processed.
740 * The unbanned entry point is stored in
741 * vlc_ml_event_t::entry_point_unbanned::psz_entry_point and the operation success
742 * state is stored in vlc_ml_event_t::entry_point_unbanned::b_success
743 */
745 /**
746 * Sent when a discoverer or parser threads changes its idle state.
747 * The idle state is stored in vlc_ml_event_t::background_idle_changed.b_idle.
748 * False means at least one background thread is in running, true means
749 * both discoverer & parser threads are paused.
750 */
752 /**
753 * Sent when the parsing progress percentage gets updated.
754 * The percentage is stored as a [0;100] integer, in
755 * vlc_ml_event_t::parsing_progress::i_percent
756 * This value might decrease as more media get discovered, but it will only
757 * increase once all discovery operations are completed.
758 */
760 /**
761 * Sent after a media thumbnail was generated, or if it's generation failed.
762 * The media is stored in vlc_ml_event_t::media_thumbnail_generated::p_media
763 * and the success state is stored in
764 * vlc_ml_event_t::media_thumbnail_generated::b_success
765 */
767 /**
768 * Sent after the history gets changed. It can be either cleaned, or simply
769 * modified because a media was recently played/removed from the history.
770 * The history type (media/network) is stored in
771 * vlc_ml_event_t::history_changed::history_type
772 */
774 /**
775 * Sent when an application requested rescan starts being processed.
776 */
779
780typedef struct vlc_ml_event_t
782 int i_type;
783 union
784 {
785 struct
786 {
787 const char* psz_entry_point;
789 struct
790 {
791 const char* psz_entry_point;
793 struct
794 {
795 const char* psz_entry_point;
796 bool b_success;
798 struct
799 {
800 const char* psz_entry_point;
801 bool b_success;
803 struct
804 {
805 const char* psz_entry_point;
806 bool b_success;
808 struct
809 {
810 const char* psz_entry_point;
811 bool b_success;
813 struct
814 {
815 uint8_t i_percent;
817 union
818 {
819 const vlc_ml_media_t* p_media;
828 struct
829 {
830 int64_t i_entity_id;
832 struct
833 {
834 int64_t i_entity_id;
835 } deletion;
836 struct
837 {
838 bool b_idle;
840 struct
841 {
842 const vlc_ml_media_t* p_media;
846 struct
847 {
850 };
853typedef void (*vlc_ml_callback_t)( void* p_data, const vlc_ml_event_t* p_event );
855typedef struct vlc_medialibrary_callbacks_t
857 void (*pf_send_event)( vlc_medialibrary_module_t* p_ml, const vlc_ml_event_t* p_event );
862 struct vlc_object_t obj;
866 void* p_sys;
868 int (*pf_control)( struct vlc_medialibrary_module_t* p_ml, int i_query, va_list args );
869 /**
870 * List some entities from the medialibrary.
871 *
872 * \param p_ml The medialibrary module instance.
873 * \param i_query The type search to be performed. \see vlc_ml_list enumeration
874 * \param p_params A pointer to a vlc_ml_query_params_t structure, or NULL for
875 * the default parameters (alphabetical ascending sort, no pagination)
876 *
877 * \return VLC_SUCCESS or an error code
878 *
879 * Refer to the individual list of vlc_ml_list requests for the additional
880 * per-query input/output parameters values & types
881 */
882 int (*pf_list)( struct vlc_medialibrary_module_t* p_ml, int i_query,
883 const vlc_ml_query_params_t* p_params, va_list args );
884
885 /**
886 * Get a specific entity by its id or another unique value
887 *
888 * \return The required entity, or a NULL pointer if couldn't be found.
889 *
890 * Refer to the list of queries for the specific return type
891 */
892 void* (*pf_get)( struct vlc_medialibrary_module_t* p_ml, int i_query, va_list args );
896
899
901#define vlc_ml_instance_get(x) vlc_ml_instance_get( VLC_OBJECT(x) )
903VLC_API void* vlc_ml_get( vlc_medialibrary_t* p_ml, int i_query, ... ) VLC_USED;
904VLC_API int vlc_ml_control( vlc_medialibrary_t* p_ml, int i_query, ... ) VLC_USED;
905VLC_API int vlc_ml_list( vlc_medialibrary_t* p_ml, int i_query,
906 const vlc_ml_query_params_t* p_params, ... );
907
908/**
909 * \brief Registers a medialibrary callback.
910 * \returns A handle to the callback, to be passed to vlc_ml_event_unregister_callback
911 */
914
915/**
916 * \brief Unregisters a medialibrary callback
917 * \param p_handle The handled returned by vlc_ml_register_callback
918 */
920 vlc_ml_event_callback_t* p_callback );
921/**
922 * \brief Unregisters a medialibrary callback from the said callback.
923 * \param p_callback The handle returned by vlc_ml_register_callback
924 *
925 * This must only be called synchronously from the callback function provided to
926 * vlc_ml_event_register_callback
927 * The p_callback handle must be considered invalid when this function returns
928 */
930 vlc_ml_event_callback_t* p_callback );
931
932
941
955
958#ifdef __cplusplus
959 vlc_ml_query_params_t ret = { };
961#else
963#endif
964 return ret;
965}
966
967static inline int vlc_ml_add_folder( vlc_medialibrary_t* p_ml, const char* psz_folder )
969 return vlc_ml_control( p_ml, VLC_ML_ADD_FOLDER, psz_folder );
970}
971
972static inline int vlc_ml_remove_folder( vlc_medialibrary_t* p_ml, const char* psz_folder )
974 return vlc_ml_control( p_ml, VLC_ML_REMOVE_FOLDER, psz_folder );
975}
976
977static inline int vlc_ml_ban_folder( vlc_medialibrary_t* p_ml, const char* psz_folder )
979 return vlc_ml_control( p_ml, VLC_ML_BAN_FOLDER, psz_folder );
980}
981
982static inline int vlc_ml_unban_folder( vlc_medialibrary_t* p_ml, const char* psz_folder )
984 return vlc_ml_control( p_ml, VLC_ML_UNBAN_FOLDER, psz_folder );
985}
986
987static inline int vlc_ml_is_indexed( vlc_medialibrary_t* p_ml,
988 const char* psz_mrl, bool* p_res )
989{
990 return vlc_ml_control( p_ml, VLC_ML_IS_INDEXED, psz_mrl, p_res );
991}
992
993static inline int vlc_ml_reload_folder( vlc_medialibrary_t* p_ml, const char* psz_mrl )
995 return vlc_ml_control( p_ml, VLC_ML_RELOAD_FOLDER, psz_mrl );
996}
997
998static inline int vlc_ml_pause_background( vlc_medialibrary_t* p_ml )
1001}
1002
1003static inline int vlc_ml_resume_background( vlc_medialibrary_t* p_ml )
1006}
1007
1008static inline int vlc_ml_clear_history( vlc_medialibrary_t* p_ml )
1010 return vlc_ml_control( p_ml, VLC_ML_CLEAR_HISTORY );
1011}
1012
1013static inline vlc_ml_media_t* vlc_ml_new_external_media( vlc_medialibrary_t* p_ml, const char* psz_mrl )
1015 vlc_ml_media_t* res;
1016 if ( vlc_ml_control( p_ml, VLC_ML_NEW_EXTERNAL_MEDIA, psz_mrl, &res ) != VLC_SUCCESS )
1017 return NULL;
1018 return res;
1019}
1020
1021static inline vlc_ml_media_t* vlc_ml_new_stream( vlc_medialibrary_t* p_ml, const char* psz_mrl )
1023 vlc_ml_media_t* res;
1024 if ( vlc_ml_control( p_ml, VLC_ML_NEW_STREAM, psz_mrl, &res ) != VLC_SUCCESS )
1025 return NULL;
1026 return res;
1027}
1028
1029static inline int vlc_ml_media_update_progress( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1030 double progress )
1031{
1032 return vlc_ml_control( p_ml, VLC_ML_MEDIA_UPDATE_PROGRESS, i_media_id, progress );
1033}
1034
1035static inline int vlc_ml_media_get_playback_state( vlc_medialibrary_t* p_ml, int64_t i_media_id, int i_state, char** ppsz_result )
1037 return vlc_ml_control( p_ml, VLC_ML_MEDIA_GET_MEDIA_PLAYBACK_STATE, i_media_id, i_state, ppsz_result );
1038}
1039
1040static 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 )
1042 return vlc_ml_control( p_ml, VLC_ML_MEDIA_SET_MEDIA_PLAYBACK_STATE, i_media_id, i_state, psz_value );
1043}
1044
1046 int64_t i_media_id,
1048{
1049 return vlc_ml_control( p_ml,VLC_ML_MEDIA_GET_ALL_MEDIA_PLAYBACK_STATES, i_media_id, prefs );
1050}
1051
1053 int64_t i_media_id,
1054 const vlc_ml_playback_states_all* prefs )
1055{
1056 return vlc_ml_control( p_ml, VLC_ML_MEDIA_SET_ALL_MEDIA_PLAYBACK_STATES, i_media_id, prefs );
1057}
1058
1059static inline int vlc_ml_media_set_thumbnail( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1060 const char* psz_mrl, vlc_ml_thumbnail_size_t sizeType )
1061{
1062 return vlc_ml_control( p_ml, VLC_ML_MEDIA_SET_THUMBNAIL, i_media_id, psz_mrl, sizeType );
1063}
1064
1065static inline int vlc_ml_media_set_genre_thumbnail( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1066 const char* psz_mrl, vlc_ml_thumbnail_size_t sizeType )
1067{
1068 return vlc_ml_control( p_ml, VLC_ML_MEDIA_SET_GENRE_THUMBNAIL, i_media_id, psz_mrl, sizeType );
1069}
1070
1071
1072static inline int vlc_ml_media_generate_thumbnail( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1074 uint32_t i_desired_width,
1075 uint32_t i_desired_height,
1076 double position )
1077{
1078 return vlc_ml_control( p_ml, VLC_ML_MEDIA_GENERATE_THUMBNAIL, i_media_id,
1079 size_type, i_desired_width, i_desired_height, position );
1080}
1081
1082static inline int vlc_ml_media_add_external_mrl( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1083 const char* psz_mrl, int i_type )
1084{
1085 return vlc_ml_control( p_ml, VLC_ML_MEDIA_ADD_EXTERNAL_MRL, i_media_id, psz_mrl, i_type );
1086}
1087
1088static inline int vlc_ml_media_set_type( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1090{
1091 return vlc_ml_control( p_ml, VLC_ML_MEDIA_SET_TYPE, i_media_id, (int)i_type );
1092}
1093
1094static inline int vlc_ml_media_set_played( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1095 bool b_played )
1096{
1097 return vlc_ml_control( p_ml, VLC_ML_MEDIA_SET_PLAYED, i_media_id, (int) b_played );
1098}
1099
1100static inline int vlc_ml_media_set_favorite( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1101 bool b_favorite )
1102{
1103 return vlc_ml_control( p_ml, VLC_ML_MEDIA_SET_FAVORITE, i_media_id, (int) b_favorite );
1104}
1105
1106static inline vlc_ml_bookmark_list_t*
1108 int64_t i_media_id )
1109{
1110 assert( p_ml != NULL );
1112 if ( vlc_ml_list( p_ml, VLC_ML_LIST_MEDIA_BOOKMARKS, params, i_media_id,
1113 &res ) != VLC_SUCCESS )
1114 return NULL;
1115 return res;
1116}
1117
1118static inline int
1119vlc_ml_media_add_bookmark( vlc_medialibrary_t* p_ml, int64_t i_media_id, int64_t i_time )
1121 assert( p_ml != NULL );
1122 return vlc_ml_control( p_ml, VLC_ML_MEDIA_ADD_BOOKMARK, i_media_id, i_time );
1123}
1124
1125static inline int
1126vlc_ml_media_remove_bookmark( vlc_medialibrary_t* p_ml, int64_t i_media_id, int64_t i_time )
1128 assert( p_ml != NULL );
1129 return vlc_ml_control( p_ml, VLC_ML_MEDIA_REMOVE_BOOKMARK, i_media_id, i_time );
1130}
1131
1132static inline int
1133vlc_ml_media_update_bookmark( vlc_medialibrary_t* p_ml, int64_t i_media_id,
1134 int64_t i_time, const char* psz_name,
1135 const char* psz_desc )
1136{
1137 assert( p_ml != NULL );
1138 return vlc_ml_control( p_ml, VLC_ML_MEDIA_UPDATE_BOOKMARK, i_media_id,
1139 i_time, psz_name, psz_desc );
1140}
1141
1142static inline int
1143vlc_ml_media_remove_all_bookmarks( vlc_medialibrary_t* p_ml, int64_t i_media_id )
1145 assert( p_ml != NULL );
1146 return vlc_ml_control( p_ml, VLC_ML_MEDIA_REMOVE_ALL_BOOKMARKS, i_media_id );
1147}
1148
1149static inline vlc_ml_playlist_t*
1150vlc_ml_playlist_create( vlc_medialibrary_t * p_ml, const char * name)
1152 assert( p_ml != NULL );
1153
1154 vlc_ml_playlist_t* result;
1155
1156 if (vlc_ml_control( p_ml, VLC_ML_PLAYLIST_CREATE, name, &result ) != VLC_SUCCESS )
1157 return NULL;
1158
1159 return result;
1160}
1161
1162static inline int
1163vlc_ml_playlist_delete( vlc_medialibrary_t * p_ml, int64_t i_playlist_id )
1165 assert( p_ml != NULL );
1166
1167 return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_DELETE, i_playlist_id );
1168}
1169
1170static inline int
1171vlc_ml_playlist_append( vlc_medialibrary_t * p_ml, int64_t i_playlist_id, int64_t i_media_id )
1173 assert( p_ml != NULL );
1174
1175 return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_APPEND, i_playlist_id, i_media_id );
1176}
1177
1178static inline int
1179vlc_ml_playlist_insert( vlc_medialibrary_t * p_ml, int64_t i_playlist_id, int64_t i_media_id,
1180 uint32_t i_position )
1181{
1182 assert( p_ml != NULL );
1183
1184 return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_INSERT, i_playlist_id, i_media_id, i_position );
1185}
1186
1187static inline int
1189 int64_t i_playlist_id, uint32_t i_from, uint32_t i_to )
1190{
1191 assert( p_ml != NULL );
1192
1193 return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_MOVE, i_playlist_id, i_from, i_to );
1194}
1195
1196static inline int
1197vlc_ml_playlist_remove( vlc_medialibrary_t * p_ml, int64_t i_playlist_id, uint32_t i_position )
1199 assert( p_ml != NULL );
1200
1201 return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_REMOVE, i_playlist_id, i_position );
1202}
1203
1204static inline int
1205vlc_ml_playlist_rename( vlc_medialibrary_t * p_ml, int64_t i_playlist_id, const char* name )
1207 assert( p_ml != NULL );
1208
1209 return vlc_ml_control( p_ml, VLC_ML_PLAYLIST_RENAME, i_playlist_id, name );
1210}
1211
1212static inline vlc_ml_media_t* vlc_ml_get_media( vlc_medialibrary_t* p_ml, int64_t i_media_id )
1214 return (vlc_ml_media_t*)vlc_ml_get( p_ml, VLC_ML_GET_MEDIA, i_media_id );
1215}
1216
1218 const char* psz_mrl )
1219{
1220 return (vlc_ml_media_t*)vlc_ml_get( p_ml, VLC_ML_GET_MEDIA_BY_MRL, psz_mrl );
1221}
1222
1223static inline input_item_t* vlc_ml_get_input_item( vlc_medialibrary_t* p_ml, int64_t i_media_id )
1225 return (input_item_t*)vlc_ml_get( p_ml, VLC_ML_GET_INPUT_ITEM, i_media_id );
1226}
1227
1229 const char* psz_mrl )
1230{
1231 return (input_item_t*)vlc_ml_get( p_ml, VLC_ML_GET_INPUT_ITEM_BY_MRL, psz_mrl );
1232}
1233
1234static inline vlc_ml_album_t* vlc_ml_get_album( vlc_medialibrary_t* p_ml, int64_t i_album_id )
1236 return (vlc_ml_album_t*)vlc_ml_get( p_ml, VLC_ML_GET_ALBUM, i_album_id );
1237}
1238
1239static inline vlc_ml_artist_t* vlc_ml_get_artist( vlc_medialibrary_t* p_ml, int64_t i_artist_id )
1241 return (vlc_ml_artist_t*)vlc_ml_get( p_ml, VLC_ML_GET_ARTIST, i_artist_id );
1242}
1243
1244static inline vlc_ml_genre_t* vlc_ml_get_genre( vlc_medialibrary_t* p_ml, int64_t i_genre_id )
1246 return (vlc_ml_genre_t*)vlc_ml_get( p_ml, VLC_ML_GET_GENRE, i_genre_id );
1247}
1248
1249static inline vlc_ml_show_t* vlc_ml_get_show( vlc_medialibrary_t* p_ml, int64_t i_show_id )
1251 return (vlc_ml_show_t*)vlc_ml_get( p_ml, VLC_ML_GET_SHOW, i_show_id );
1252}
1253
1254static inline vlc_ml_group_t* vlc_ml_get_group( vlc_medialibrary_t* p_ml, int64_t i_group_id )
1256 return (vlc_ml_group_t*)vlc_ml_get( p_ml, VLC_ML_GET_GROUP, i_group_id );
1257}
1258
1259static inline vlc_ml_folder_t* vlc_ml_get_folder( vlc_medialibrary_t* p_ml, int64_t i_folder_id )
1261 return (vlc_ml_folder_t*)vlc_ml_get( p_ml, VLC_ML_GET_FOLDER, i_folder_id);
1262}
1263
1264static inline vlc_ml_playlist_t* vlc_ml_get_playlist( vlc_medialibrary_t* p_ml, int64_t i_playlist_id )
1266 return (vlc_ml_playlist_t*)vlc_ml_get( p_ml, VLC_ML_GET_PLAYLIST, i_playlist_id );
1267}
1268
1269static 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 )
1271 vlc_assert( p_ml != NULL );
1273 if ( vlc_ml_list( p_ml, VLC_ML_LIST_MEDIA_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1274 return NULL;
1275 return res;
1276}
1277
1278static 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 )
1280 vlc_assert( p_ml != NULL );
1281 size_t res;
1282 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_MEDIA_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1283 return 0;
1284 return res;
1285}
1286
1289 int i_parent_type, int64_t i_parent_id )
1290{
1291 vlc_assert( p_ml != NULL );
1292
1294
1296 params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1297 return NULL;
1298
1299 return res;
1300}
1301
1302static inline size_t vlc_ml_count_video_of( vlc_medialibrary_t* p_ml,
1304 int i_parent_type, int64_t i_parent_id )
1305{
1306 vlc_assert( p_ml != NULL );
1307
1308 size_t res;
1309
1311 params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1312 return 0;
1313
1314 return res;
1315}
1316
1319 int i_parent_type, int64_t i_parent_id )
1320{
1321 vlc_assert( p_ml != NULL );
1322
1324
1326 params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1327 return NULL;
1328
1329 return res;
1330}
1331
1332static inline size_t vlc_ml_count_audio_of( vlc_medialibrary_t* p_ml,
1334 int i_parent_type, int64_t i_parent_id )
1335{
1336 vlc_assert( p_ml != NULL );
1337
1338 size_t res;
1339
1341 params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1342 return 0;
1343
1344 return res;
1345}
1346
1347static 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 )
1349 vlc_assert( p_ml != NULL );
1351 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ARTISTS_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1352 return NULL;
1353 return res;
1354}
1355
1356static 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 )
1358 vlc_assert( p_ml != NULL );
1359 size_t res;
1360 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ARTISTS_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1361 return 0;
1362 return res;
1363}
1364
1365static 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 )
1367 vlc_assert( p_ml != NULL );
1369 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ALBUMS_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1370 return NULL;
1371 return res;
1372}
1373
1374static 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 )
1376 vlc_assert( p_ml != NULL );
1377 size_t res;
1378 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ALBUMS_OF, params, i_parent_type, i_parent_id, &res ) != VLC_SUCCESS )
1379 return 0;
1380 return res;
1381}
1382
1383static 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 )
1385 vlc_assert( p_ml != NULL );
1387 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ALBUM_TRACKS, params, i_album_id, &res ) != VLC_SUCCESS )
1388 return NULL;
1389 return res;
1390}
1391
1392static 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 )
1394 vlc_assert( p_ml != NULL );
1395 size_t count;
1396 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ALBUM_TRACKS, params, i_album_id, &count ) != VLC_SUCCESS )
1397 return 0;
1398 return count;
1399}
1400
1401static 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 )
1403 vlc_assert( p_ml != NULL );
1405 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ALBUM_ARTISTS, params, i_album_id, &res ) != VLC_SUCCESS )
1406 return NULL;
1407 return res;
1408}
1409
1410static 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 )
1412 vlc_assert( p_ml != NULL );
1413 size_t count;
1414 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ALBUM_ARTISTS, params, i_album_id, &count ) != VLC_SUCCESS )
1415 return 0;
1416 return count;
1417}
1418
1419static 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 )
1421 vlc_assert( p_ml != NULL );
1423 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ARTIST_ALBUMS, params, i_artist_id, &res ) != VLC_SUCCESS )
1424 return NULL;
1425 return res;
1426}
1427
1428static 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 )
1430 vlc_assert( p_ml != NULL );
1431 size_t count;
1432 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ARTIST_ALBUMS, params, i_artist_id, &count ) != VLC_SUCCESS )
1433 return 0;
1434 return count;
1435}
1436
1437static 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 )
1439 vlc_assert( p_ml != NULL );
1441 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ARTIST_TRACKS, params, i_artist_id, &res ) != VLC_SUCCESS )
1442 return NULL;
1443 return res;
1444}
1445
1446static 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 )
1448 vlc_assert( p_ml != NULL );
1449 size_t count;
1450 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ARTIST_TRACKS, params, i_artist_id, &count ) != VLC_SUCCESS )
1451 return 0;
1452 return count;
1453}
1454
1457 vlc_assert( p_ml != NULL );
1459 if ( vlc_ml_list( p_ml, VLC_ML_LIST_VIDEOS, params, &res ) != VLC_SUCCESS )
1460 return NULL;
1461 return res;
1462}
1463
1464static inline size_t vlc_ml_count_video_media( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1466 vlc_assert( p_ml != NULL );
1467 size_t count;
1468 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_VIDEOS, params, &count ) != VLC_SUCCESS )
1469 return 0;
1470 return count;
1471}
1472
1475 vlc_assert( p_ml != NULL );
1477 if ( vlc_ml_list( p_ml, VLC_ML_LIST_AUDIOS, params, &res ) != VLC_SUCCESS )
1478 return NULL;
1479 return res;
1480}
1481
1482static inline size_t vlc_ml_count_audio_media( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1484 vlc_assert( p_ml != NULL );
1485 size_t count;
1486 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_AUDIOS, params, &count ) != VLC_SUCCESS )
1487 return 0;
1488 return count;
1489}
1490
1493 vlc_assert( p_ml != NULL );
1495 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ALBUMS, params, &res ) != VLC_SUCCESS )
1496 return NULL;
1497 return res;
1498}
1499
1500static inline size_t vlc_ml_count_albums( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1502 vlc_assert( p_ml != NULL );
1503 size_t count;
1504 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ALBUMS, params, &count ) != VLC_SUCCESS )
1505 return 0;
1506 return count;
1507}
1508
1511 vlc_assert( p_ml != NULL );
1513 if ( vlc_ml_list( p_ml, VLC_ML_LIST_GENRES, params, &res ) != VLC_SUCCESS )
1514 return NULL;
1515 return res;
1516}
1517
1518static inline size_t vlc_ml_count_genres( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1520 vlc_assert( p_ml != NULL );
1521 size_t count;
1522 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_GENRES, params, &count ) != VLC_SUCCESS )
1523 return 0;
1524 return count;
1525}
1526
1527/**
1528 * @brief vlc_ml_list_artists
1529 * @param params Query parameters, or NULL for the default
1530 * @param b_include_all True if you wish to fetch artists without at least one album.
1531 * @return
1532 */
1533static 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 )
1535 vlc_assert( p_ml != NULL );
1537 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ARTISTS, params, (int)b_include_all, &res ) != VLC_SUCCESS )
1538 return NULL;
1539 return res;
1540}
1541
1542static inline size_t vlc_ml_count_artists( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params, bool includeAll )
1544 vlc_assert( p_ml != NULL );
1545 size_t count;
1546 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ARTISTS, params, includeAll, &count ) != VLC_SUCCESS )
1547 return 0;
1548 return count;
1549}
1550
1553 vlc_assert( p_ml != NULL );
1554 vlc_ml_show_list_t* res;
1555 if ( vlc_ml_list( p_ml, VLC_ML_LIST_SHOWS, params, &res ) != VLC_SUCCESS )
1556 return NULL;
1557 return res;
1558}
1559
1560static inline size_t vlc_ml_count_shows( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1562 vlc_assert( p_ml != NULL );
1563 size_t count;
1564 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_SHOWS, params, &count ) != VLC_SUCCESS )
1565 return 0;
1566 return count;
1567}
1568
1569static 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 )
1571 vlc_assert( p_ml != NULL );
1573 if ( vlc_ml_list( p_ml, VLC_ML_LIST_GENRE_ARTISTS, params, i_genre_id, &res ) != VLC_SUCCESS )
1574 return NULL;
1575 return res;
1576}
1577
1578static 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 )
1580 vlc_assert( p_ml != NULL );
1581 size_t count;
1582 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_GENRE_ARTISTS, params, i_genre_id, &count ) != VLC_SUCCESS )
1583 return 0;
1584 return count;
1585}
1586
1587static 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 )
1589 vlc_assert( p_ml != NULL );
1591 if ( vlc_ml_list( p_ml, VLC_ML_LIST_GENRE_TRACKS, params, i_genre_id, &res ) != VLC_SUCCESS )
1592 return NULL;
1593 return res;
1594}
1595
1596static 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 )
1598 vlc_assert( p_ml != NULL );
1599 size_t count;
1600 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_GENRE_TRACKS, params, i_genre_id, &count ) != VLC_SUCCESS )
1601 return 0;
1602 return count;
1603}
1604
1605static 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 )
1607 vlc_assert( p_ml != NULL );
1609 if ( vlc_ml_list( p_ml, VLC_ML_LIST_GENRE_ALBUMS, params, i_genre_id, &res ) != VLC_SUCCESS )
1610 return NULL;
1611 return res;
1612}
1613
1614static 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 )
1616 vlc_assert( p_ml != NULL );
1617 size_t count;
1618 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_GENRE_ALBUMS, params, i_genre_id, &count ) != VLC_SUCCESS )
1619 return 0;
1620 return count;
1621}
1622
1623static 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 )
1625 vlc_assert( p_ml != NULL );
1627 if ( vlc_ml_list( p_ml, VLC_ML_LIST_SHOW_EPISODES, params, i_show_id, &res ) != VLC_SUCCESS )
1628 return NULL;
1629 return res;
1630}
1631
1632static 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 )
1634 vlc_assert( p_ml != NULL );
1635 size_t count;
1636 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_GENRE_ALBUMS, params, i_show_id, &count ) != VLC_SUCCESS )
1637 return 0;
1638 return count;
1639}
1640
1641static 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 )
1643 vlc_assert( p_ml != NULL );
1645 if ( vlc_ml_list( p_ml, VLC_ML_LIST_MEDIA_LABELS, params, i_media_id, &res ) != VLC_SUCCESS )
1646 return NULL;
1647 return res;
1648}
1649
1650static 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 )
1652 vlc_assert( p_ml != NULL );
1653 size_t count;
1654 if ( vlc_ml_list( p_ml, VLC_ML_LIST_MEDIA_LABELS, params, i_media_id, &count ) != VLC_SUCCESS )
1655 return 0;
1656 return count;
1657}
1658
1661 vlc_assert( p_ml != NULL );
1663 if ( vlc_ml_list( p_ml, VLC_ML_LIST_HISTORY, params, &res ) != VLC_SUCCESS )
1664 return NULL;
1665 return res;
1666}
1667
1668static inline size_t vlc_ml_count_history( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1670 vlc_assert( p_ml != NULL );
1671 size_t count;
1672 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_HISTORY, params, &count ) != VLC_SUCCESS )
1673 return 0;
1674 return count;
1675}
1676
1677
1680 vlc_assert( p_ml != NULL );
1682 if ( vlc_ml_list( p_ml, VLC_ML_LIST_HISTORY_BY_TYPE, params, (int)type, &res ) != VLC_SUCCESS )
1683 return NULL;
1684 return res;
1685}
1686
1687static 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 )
1689 vlc_assert( p_ml != NULL );
1690 size_t count;
1691 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_HISTORY_BY_TYPE, params, (int)type, &count ) != VLC_SUCCESS )
1692 return 0;
1693 return count;
1694}
1695
1696
1697
1700 vlc_assert( p_ml != NULL );
1702 if ( vlc_ml_list( p_ml, VLC_ML_LIST_STREAM_HISTORY, params, &res ) != VLC_SUCCESS )
1703 return NULL;
1704 return res;
1705}
1706
1707static inline size_t vlc_ml_count_stream_history( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1709 vlc_assert( p_ml != NULL );
1710 size_t count;
1711 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_STREAM_HISTORY, params, &count ) != VLC_SUCCESS )
1712 return 0;
1713 return count;
1714}
1715
1716//-------------------------------------------------------------------------------------------------
1717// Groups
1718
1721 vlc_assert( p_ml != NULL );
1723 if ( vlc_ml_list( p_ml, VLC_ML_LIST_GROUPS, params, &res ) != VLC_SUCCESS )
1724 return NULL;
1725 return res;
1726}
1727
1728static inline size_t vlc_ml_count_groups( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1730 vlc_assert( p_ml != NULL );
1731 size_t count;
1732 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_GROUPS, params, &count ) != VLC_SUCCESS )
1733 return 0;
1734 return count;
1735}
1736
1737static 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 )
1739 vlc_assert( p_ml != NULL );
1741 if ( vlc_ml_list( p_ml, VLC_ML_LIST_GROUP_MEDIA, params, i_group_id, &res ) != VLC_SUCCESS )
1742 return NULL;
1743 return res;
1744}
1745
1746static 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 )
1748 vlc_assert( p_ml != NULL );
1749 size_t count;
1750 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_GROUP_MEDIA, params, i_group_id, &count ) != VLC_SUCCESS )
1751 return 0;
1752 return count;
1753}
1754
1755//-------------------------------------------------------------------------------------------------
1756
1759 vlc_assert( p_ml != NULL );
1761 if ( vlc_ml_list( p_ml, VLC_ML_LIST_PLAYLISTS, params, (int) playlist_type, &res ) != VLC_SUCCESS )
1762 return NULL;
1763 return res;
1764}
1765
1766static inline size_t vlc_ml_count_playlists( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params, vlc_ml_playlist_type_t playlist_type)
1768 vlc_assert( p_ml != NULL );
1769 size_t count;
1770 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_PLAYLISTS, params, (int) playlist_type, &count ) != VLC_SUCCESS )
1771 return 0;
1772 return count;
1773}
1774
1775static 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 )
1777 vlc_assert( p_ml != NULL );
1779 if ( vlc_ml_list( p_ml, VLC_ML_LIST_PLAYLIST_MEDIA, params, i_playlist_id, &res ) != VLC_SUCCESS )
1780 return NULL;
1781 return res;
1782}
1783
1784static 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 )
1786 vlc_assert( p_ml != NULL );
1787 size_t count;
1788 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_PLAYLIST_MEDIA, params, i_playlist_id, &count ) != VLC_SUCCESS )
1789 return 0;
1790 return count;
1791}
1792
1795 vlc_assert( p_ml != NULL );
1797 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ENTRY_POINTS, params, (int)false, &res ) != VLC_SUCCESS )
1798 return NULL;
1799 return res;
1800}
1801
1802static inline size_t vlc_ml_count_entry_points( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
1804 vlc_assert( p_ml != NULL );
1805 size_t res;
1806 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ENTRY_POINTS, params, (int)false, &res ) != VLC_SUCCESS )
1807 return 0;
1808 return res;
1809}
1810
1811static inline vlc_ml_folder_list_t*
1814 vlc_assert( p_ml != NULL );
1816 if ( vlc_ml_list( p_ml, VLC_ML_LIST_ENTRY_POINTS, params, (int)true, &res ) != VLC_SUCCESS )
1817 return NULL;
1818 return res;
1819}
1820
1821static inline size_t vlc_ml_count_banned_entry_points( vlc_medialibrary_t* p_ml,
1823{
1824 vlc_assert( p_ml != NULL );
1825 size_t res;
1826 if ( vlc_ml_list( p_ml, VLC_ML_COUNT_ENTRY_POINTS, params, (int)true, &res ) != VLC_SUCCESS )
1827 return 0;
1828 return res;
1829}
1830
1831// Folders
1832
1835{
1836 vlc_assert(p_ml != NULL);
1837
1839
1840 if (vlc_ml_list(p_ml, VLC_ML_LIST_FOLDERS, params, &res) != VLC_SUCCESS)
1841 return NULL;
1842
1843 return res;
1844}
1845
1846static inline size_t vlc_ml_count_folders(vlc_medialibrary_t * p_ml,
1848{
1849 vlc_assert(p_ml != NULL);
1850
1851 size_t count;
1852
1853 if (vlc_ml_list(p_ml, VLC_ML_COUNT_FOLDERS, params, &count) != VLC_SUCCESS)
1854 return 0;
1855
1856 return count;
1857}
1858
1859static inline
1863{
1864 vlc_assert(p_ml != NULL);
1865
1867
1868 if (vlc_ml_list(p_ml, VLC_ML_LIST_FOLDERS_BY_TYPE, params, (int) type, &res) != VLC_SUCCESS)
1869 return NULL;
1870
1871 return res;
1872}
1873
1874static inline size_t vlc_ml_count_folders_by_type(vlc_medialibrary_t * p_ml,
1877{
1878 vlc_assert(p_ml != NULL);
1879
1880 size_t count;
1881
1882 if (vlc_ml_list(p_ml, VLC_ML_COUNT_FOLDERS_BY_TYPE, params, (int) type, &count) != VLC_SUCCESS)
1883 return 0;
1884
1885 return count;
1886}
1887
1888// Folder Media
1889
1892 int64_t i_folder_id)
1893{
1894 vlc_assert(p_ml != NULL);
1895
1896 vlc_ml_media_list_t * res;
1897
1898 if (vlc_ml_list(p_ml, VLC_ML_LIST_FOLDER_MEDIA, params, i_folder_id, &res) != VLC_SUCCESS)
1899 return NULL;
1900
1901 return res;
1902}
1903
1904static inline size_t vlc_ml_count_folder_media(vlc_medialibrary_t * p_ml,
1906 int64_t i_folder_id)
1907{
1908 vlc_assert(p_ml != NULL);
1909
1910 size_t count;
1911
1912 if (vlc_ml_list(p_ml, VLC_ML_COUNT_FOLDER_MEDIA, params, i_folder_id, &count) != VLC_SUCCESS)
1913 return 0;
1914
1915 return count;
1916}
1917
1918#ifdef __cplusplus
1919}
1920#endif /* C++ */
1921
1922#ifndef __cplusplus
1923# define vlc_ml_release( OBJ ) _Generic( ( OBJ ), \
1924 vlc_ml_show_t*: vlc_ml_show_release, \
1925 vlc_ml_artist_t*: vlc_ml_artist_release, \
1926 vlc_ml_album_t*: vlc_ml_album_release, \
1927 vlc_ml_genre_t*: vlc_ml_genre_release, \
1928 vlc_ml_media_t*: vlc_ml_media_release, \
1929 vlc_ml_group_t*: vlc_ml_group_release, \
1930 vlc_ml_folder_t*: vlc_ml_folder_release, \
1931 vlc_ml_playlist_t*: vlc_ml_playlist_release, \
1932 vlc_ml_label_list_t*: vlc_ml_label_list_release, \
1933 vlc_ml_file_list_t*: vlc_ml_file_list_release, \
1934 vlc_ml_artist_list_t*: vlc_ml_artist_list_release, \
1935 vlc_ml_media_list_t*: vlc_ml_media_list_release, \
1936 vlc_ml_album_list_t*: vlc_ml_album_list_release, \
1937 vlc_ml_show_list_t*: vlc_ml_show_list_release, \
1938 vlc_ml_genre_list_t*: vlc_ml_genre_list_release, \
1939 vlc_ml_group_list_t*: vlc_ml_group_list_release, \
1940 vlc_ml_playlist_list_t*: vlc_ml_playlist_list_release, \
1941 vlc_ml_folder_list_t*: vlc_ml_folder_list_release, \
1942 vlc_ml_playback_states_all*: vlc_ml_playback_states_all_release, \
1943 vlc_ml_bookmark_t*: vlc_ml_bookmark_release, \
1944 vlc_ml_bookmark_list_t*: vlc_ml_bookmark_list_release \
1945 )( OBJ )
1946#else
1947static inline void vlc_ml_release( vlc_ml_show_t* show ) { vlc_ml_show_release( show ); }
1948static inline void vlc_ml_release( vlc_ml_artist_t* artist ) { vlc_ml_artist_release( artist ); }
1949static inline void vlc_ml_release( vlc_ml_album_t* album ) { vlc_ml_album_release( album ); }
1950static inline void vlc_ml_release( vlc_ml_genre_t* genre ) { vlc_ml_genre_release( genre ); }
1951static inline void vlc_ml_release( vlc_ml_media_t* media ) { vlc_ml_media_release( media ); }
1952static inline void vlc_ml_release( vlc_ml_group_t* group ) { vlc_ml_group_release( group ); }
1953static inline void vlc_ml_release( vlc_ml_folder_t* folder ) { vlc_ml_folder_release( folder ); }
1954static inline void vlc_ml_release( vlc_ml_playlist_t* playlist ) { vlc_ml_playlist_release( playlist ); }
1965static inline void vlc_ml_release( vlc_ml_playback_states_all* prefs ) { vlc_ml_playback_states_all_release( prefs ); }
1966static inline void vlc_ml_release( vlc_ml_bookmark_t* bookmark ) { vlc_ml_bookmark_release( bookmark ); }
1968#endif
1969
1970#endif /* VLC_MEDIA_LIBRARY_H */
struct vlc_param ** list
Definition: core.c:402
size_t count
Definition: core.c:403
#define VLC_USED
Definition: fourcc_gen.c:32
#define VLC_API
Definition: fourcc_gen.c:31
#define vlc_assert(pred)
Run-time assertion.
Definition: vlc_common.h:301
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:503
const char name[16]
Definition: httpd.c:1281
int i_type
Definition: httpd.c:1282
Describes an input and is used to spawn input_thread_t objects.
Definition: vlc_input_item.h:89
Definition: vlc_objects.h:91
Internal module descriptor.
Definition: modules.h:76
Definition: vlc_media_library.h:857
void(* pf_send_event)(vlc_medialibrary_module_t *p_ml, const vlc_ml_event_t *p_event)
Definition: vlc_media_library.h:858
Definition: vlc_media_library.h:862
void * p_sys
Definition: vlc_media_library.h:867
struct vlc_object_t obj
Definition: vlc_media_library.h:863
int(* pf_control)(struct vlc_medialibrary_module_t *p_ml, int i_query, va_list args)
Definition: vlc_media_library.h:869
int(* pf_list)(struct vlc_medialibrary_module_t *p_ml, int i_query, const vlc_ml_query_params_t *p_params, va_list args)
List some entities from the medialibrary.
Definition: vlc_media_library.h:883
const vlc_medialibrary_callbacks_t * cbs
Definition: vlc_media_library.h:895
module_t * p_module
Definition: vlc_media_library.h:865
Definition: medialibrary.c:42
Definition: vlc_media_library.h:339
size_t i_nb_items
Definition: vlc_media_library.h:340
vlc_ml_album_t p_items[]
Definition: vlc_media_library.h:341
Definition: vlc_media_library.h:309
vlc_ml_thumbnail_t thumbnails[VLC_ML_THUMBNAIL_SIZE_COUNT]
Definition: vlc_media_library.h:313
int64_t i_duration
Definition: vlc_media_library.h:320
char * psz_summary
Definition: vlc_media_library.h:312
int64_t i_artist_id
Definition: vlc_media_library.h:315
unsigned int i_year
Definition: vlc_media_library.h:321
char * psz_title
Definition: vlc_media_library.h:311
uint32_t i_nb_tracks
Definition: vlc_media_library.h:317
uint32_t i_nb_present_tracks
Definition: vlc_media_library.h:318
char * psz_artist
Definition: vlc_media_library.h:314
uint32_t i_nb_discs
Definition: vlc_media_library.h:319
int64_t i_id
Definition: vlc_media_library.h:310
Definition: vlc_media_library.h:304
size_t i_nb_items
Definition: vlc_media_library.h:305
vlc_ml_artist_t p_items[]
Definition: vlc_media_library.h:306
Definition: vlc_media_library.h:291
char * psz_mb_id
Definition: vlc_media_library.h:296
char * psz_shortbio
Definition: vlc_media_library.h:294
int64_t i_id
Definition: vlc_media_library.h:292
unsigned int i_nb_album
Definition: vlc_media_library.h:298
char * psz_name
Definition: vlc_media_library.h:293
uint32_t i_nb_present_tracks
Definition: vlc_media_library.h:300
vlc_ml_thumbnail_t thumbnails[VLC_ML_THUMBNAIL_SIZE_COUNT]
Definition: vlc_media_library.h:295
unsigned int i_nb_tracks
Definition: vlc_media_library.h:299
Definition: vlc_media_library.h:387
int64_t i_time
The bookmark time.
Definition: vlc_media_library.h:389
char * psz_name
The bookmark name.
Definition: vlc_media_library.h:390
int64_t i_media_id
The associated media ID.
Definition: vlc_media_library.h:388
char * psz_description
The bookmark description.
Definition: vlc_media_library.h:391
Definition: vlc_media_library.h:395
size_t i_nb_items
Definition: vlc_media_library.h:396
vlc_ml_bookmark_t p_items[]
Definition: vlc_media_library.h:397
Definition: medialibrary.c:35
Definition: vlc_media_library.h:782
struct vlc_ml_event_t::@247::@251 entry_point_added
struct vlc_ml_event_t::@247::@252 entry_point_removed
struct vlc_ml_event_t::@247::@259 background_idle_changed
struct vlc_ml_event_t::@247::@260 media_thumbnail_generated
union vlc_ml_event_t::@247::@256 creation
uint8_t i_percent
Definition: vlc_media_library.h:816
int64_t i_entity_id
Definition: vlc_media_library.h:831
bool b_success
Definition: vlc_media_library.h:797
struct vlc_ml_event_t::@247::@250 discovery_failed
struct vlc_ml_event_t::@247::@254 entry_point_unbanned
struct vlc_ml_event_t::@247::@257 modification
struct vlc_ml_event_t::@247::@253 entry_point_banned
const vlc_ml_artist_t * p_artist
Definition: vlc_media_library.h:821
vlc_ml_history_type_t history_type
Definition: vlc_media_library.h:849
const char * psz_entry_point
Definition: vlc_media_library.h:788
struct vlc_ml_event_t::@247::@255 parsing_progress
int i_type
Definition: vlc_media_library.h:783
const vlc_ml_album_t * p_album
Definition: vlc_media_library.h:822
const vlc_ml_playlist_t * p_playlist
Definition: vlc_media_library.h:824
const vlc_ml_folder_t * p_folder
Definition: vlc_media_library.h:827
const vlc_ml_genre_t * p_genre
Definition: vlc_media_library.h:825
const vlc_ml_media_t * p_media
Definition: vlc_media_library.h:820
vlc_ml_thumbnail_size_t i_size
Definition: vlc_media_library.h:844
struct vlc_ml_event_t::@247::@258 deletion
bool b_idle
Definition: vlc_media_library.h:839
const vlc_ml_group_t * p_group
Definition: vlc_media_library.h:823
struct vlc_ml_event_t::@247::@261 history_changed
const vlc_ml_bookmark_t * p_bookmark
Definition: vlc_media_library.h:826
struct vlc_ml_event_t::@247::@249 discovery_progress
Definition: vlc_media_library.h:160
size_t i_nb_items
Definition: vlc_media_library.h:161
vlc_ml_file_t p_items[]
Definition: vlc_media_library.h:162
Definition: vlc_media_library.h:149
int64_t i_size
Definition: vlc_media_library.h:151
bool b_present
Definition: vlc_media_library.h:156
time_t i_last_modification_date
Definition: vlc_media_library.h:152
bool b_external
Definition: vlc_media_library.h:154
vlc_ml_file_type_t i_type
Definition: vlc_media_library.h:153
char * psz_mrl
Definition: vlc_media_library.h:150
bool b_removable
Definition: vlc_media_library.h:155
Definition: vlc_media_library.h:381
vlc_ml_folder_t p_items[]
Definition: vlc_media_library.h:383
size_t i_nb_items
Definition: vlc_media_library.h:382
Definition: vlc_media_library.h:369
char * psz_mrl
The folder's MRL.
Definition: vlc_media_library.h:372
bool b_present
The folder's presence state.
Definition: vlc_media_library.h:376
bool b_banned
Will be true if the user required this folder to be excluded.
Definition: vlc_media_library.h:377
char * psz_name
The folder's name.
Definition: vlc_media_library.h:371
unsigned int i_nb_audio
The number of audio for this volder.
Definition: vlc_media_library.h:375
int64_t i_id
The folder's MRL.
Definition: vlc_media_library.h:370
unsigned int i_nb_media
The media count.
Definition: vlc_media_library.h:373
unsigned int i_nb_video
The number of video for this folder.
Definition: vlc_media_library.h:374
Definition: vlc_media_library.h:351
vlc_ml_genre_t p_items[]
Definition: vlc_media_library.h:353
size_t i_nb_items
Definition: vlc_media_library.h:352
Definition: vlc_media_library.h:325
vlc_ml_thumbnail_t thumbnails[VLC_ML_THUMBNAIL_SIZE_COUNT]
Definition: vlc_media_library.h:329
size_t i_nb_tracks
Definition: vlc_media_library.h:328
char * psz_name
Definition: vlc_media_library.h:327
int64_t i_id
Definition: vlc_media_library.h:326
Definition: vlc_media_library.h:357
size_t i_nb_items
Definition: vlc_media_library.h:358
vlc_ml_group_t p_items[]
Definition: vlc_media_library.h:359
Definition: vlc_media_library.h:239
uint32_t i_nb_video
Definition: vlc_media_library.h:245
uint32_t i_nb_seen
Definition: vlc_media_library.h:253
time_t i_creation_date
Definition: vlc_media_library.h:258
int64_t i_id
Definition: vlc_media_library.h:240
uint32_t i_nb_present_video
Definition: vlc_media_library.h:249
uint32_t i_nb_present_audio
Definition: vlc_media_library.h:250
char * psz_name
Definition: vlc_media_library.h:242
uint32_t i_nb_unknown
Definition: vlc_media_library.h:247
int64_t i_duration
Definition: vlc_media_library.h:256
uint32_t i_nb_total_media
Definition: vlc_media_library.h:244
uint32_t i_nb_present_media
Definition: vlc_media_library.h:248
uint32_t i_nb_present_seen
Definition: vlc_media_library.h:254
time_t i_last_modification_date
Definition: vlc_media_library.h:259
uint32_t i_nb_present_unknown
Definition: vlc_media_library.h:251
uint32_t i_nb_audio
Definition: vlc_media_library.h:246
Definition: vlc_media_library.h:143
size_t i_nb_items
Definition: vlc_media_library.h:144
vlc_ml_label_t p_items[]
Definition: vlc_media_library.h:145
Definition: vlc_media_library.h:137
int64_t i_id
Definition: vlc_media_library.h:138
char * psz_name
Definition: vlc_media_library.h:139
Definition: vlc_media_library.h:333
size_t i_nb_items
Definition: vlc_media_library.h:334
vlc_ml_media_t p_items[]
Definition: vlc_media_library.h:335
Definition: vlc_media_library.h:200
int32_t i_year
Definition: vlc_media_library.h:209
vlc_ml_movie_t movie
Definition: vlc_media_library.h:225
int64_t i_duration
Definition: vlc_media_library.h:211
char * psz_title
Definition: vlc_media_library.h:215
int64_t i_album_id
Definition: vlc_media_library.h:229
vlc_ml_file_list_t * p_files
Definition: vlc_media_library.h:206
time_t i_last_played_date
Definition: vlc_media_library.h:214
int i_track_nb
Definition: vlc_media_library.h:232
vlc_ml_thumbnail_t thumbnails[VLC_ML_THUMBNAIL_SIZE_COUNT]
Definition: vlc_media_library.h:218
vlc_ml_media_subtype_t i_subtype
Definition: vlc_media_library.h:204
vlc_ml_show_episode_t show_episode
Definition: vlc_media_library.h:224
int64_t i_id
Definition: vlc_media_library.h:201
vlc_ml_media_type_t i_type
Definition: vlc_media_library.h:203
struct vlc_ml_media_t::@244::@246 album_track
int i_disc_nb
Definition: vlc_media_library.h:233
int64_t i_artist_id
Definition: vlc_media_library.h:228
uint32_t i_playcount
Definition: vlc_media_library.h:212
bool b_is_favorite
Definition: vlc_media_library.h:220
char * psz_filename
Definition: vlc_media_library.h:216
vlc_ml_media_track_list_t * p_tracks
Definition: vlc_media_library.h:207
double f_progress
Definition: vlc_media_library.h:213
int64_t i_genre_id
Definition: vlc_media_library.h:230
Definition: vlc_media_library.h:194
size_t i_nb_items
Definition: vlc_media_library.h:195
vlc_ml_media_track_t p_items[]
Definition: vlc_media_library.h:196
Definition: vlc_media_library.h:166
char * psz_language
Definition: vlc_media_library.h:168
uint32_t i_nbChannels
Definition: vlc_media_library.h:177
uint32_t i_height
Definition: vlc_media_library.h:183
struct vlc_ml_media_track_t::@240::@243 v
uint32_t i_sampleRate
Definition: vlc_media_library.h:178
uint32_t i_sarNum
Definition: vlc_media_library.h:185
uint32_t i_fpsDen
Definition: vlc_media_library.h:188
char * psz_codec
Definition: vlc_media_library.h:167
vlc_ml_track_type_t i_type
Definition: vlc_media_library.h:170
uint32_t i_fpsNum
Definition: vlc_media_library.h:187
uint32_t i_sarDen
Definition: vlc_media_library.h:186
uint32_t i_bitrate
Definition: vlc_media_library.h:171
uint32_t i_width
Definition: vlc_media_library.h:184
char * psz_description
Definition: vlc_media_library.h:169
struct vlc_ml_media_track_t::@240::@242 a
Definition: vlc_media_library.h:111
char * psz_imdb_id
Definition: vlc_media_library.h:113
char * psz_summary
Definition: vlc_media_library.h:112
Definition: vlc_media_library.h:640
char * deinterlace
Definition: vlc_media_library.h:649
char * current_audio_track
Definition: vlc_media_library.h:645
char * current_video_track
Definition: vlc_media_library.h:644
float zoom
Definition: vlc_media_library.h:642
int current_title
Definition: vlc_media_library.h:643
char * aspect_ratio
Definition: vlc_media_library.h:647
char * crop
Definition: vlc_media_library.h:648
float rate
Definition: vlc_media_library.h:641
char * current_subtitle_track
Definition: vlc_media_library.h:646
char * video_filter
Definition: vlc_media_library.h:650
Definition: vlc_media_library.h:363
size_t i_nb_items
Definition: vlc_media_library.h:364
vlc_ml_playlist_t p_items[]
Definition: vlc_media_library.h:365
Definition: vlc_media_library.h:263
unsigned int i_nb_media
Definition: vlc_media_library.h:272
int64_t i_duration
Definition: vlc_media_library.h:284
char * psz_artwork_mrl
Definition: vlc_media_library.h:270
char * psz_mrl
Definition: vlc_media_library.h:268
uint32_t i_nb_unknown
Definition: vlc_media_library.h:275
uint32_t i_nb_present_audio
Definition: vlc_media_library.h:279
unsigned int i_nb_present_media
Definition: vlc_media_library.h:277
char * psz_name
Definition: vlc_media_library.h:266
uint32_t i_nb_present_video
Definition: vlc_media_library.h:278
uint32_t i_nb_duration_unknown
Definition: vlc_media_library.h:285
bool b_is_read_only
Definition: vlc_media_library.h:287
uint32_t i_nb_audio
Definition: vlc_media_library.h:274
uint32_t i_nb_present_unknown
Definition: vlc_media_library.h:280
int64_t i_id
Definition: vlc_media_library.h:264
uint32_t i_creation_date
Definition: vlc_media_library.h:282
uint32_t i_nb_video
Definition: vlc_media_library.h:273
Definition: vlc_media_library.h:430
const char * psz_pattern
Definition: vlc_media_library.h:431
bool b_desc
Definition: vlc_media_library.h:435
vlc_ml_sorting_criteria_t i_sort
Definition: vlc_media_library.h:434
uint32_t i_offset
Definition: vlc_media_library.h:433
uint32_t i_nbResults
Definition: vlc_media_library.h:432
Definition: vlc_media_library.h:117
char * psz_summary
Definition: vlc_media_library.h:118
uint32_t i_season_number
Definition: vlc_media_library.h:121
uint32_t i_episode_nb
Definition: vlc_media_library.h:120
char * psz_tvdb_id
Definition: vlc_media_library.h:119
Definition: vlc_media_library.h:345
vlc_ml_show_t p_items[]
Definition: vlc_media_library.h:347
size_t i_nb_items
Definition: vlc_media_library.h:346
Definition: vlc_media_library.h:125
unsigned int i_release_year
Definition: vlc_media_library.h:131
char * psz_tvdb_id
Definition: vlc_media_library.h:130
uint32_t i_nb_episodes
Definition: vlc_media_library.h:132
char * psz_artwork_mrl
Definition: vlc_media_library.h:129
uint32_t i_nb_seasons
Definition: vlc_media_library.h:133
char * psz_name
Definition: vlc_media_library.h:127
int64_t i_id
Definition: vlc_media_library.h:126
char * psz_summary
Definition: vlc_media_library.h:128
Definition: vlc_media_library.h:101
char * psz_mrl
Definition: vlc_media_library.h:102
vlc_ml_thumbnail_status_t i_status
True if a thumbnail is available, or if thumbnail generation was attempted but failed.
Definition: vlc_media_library.h:107
VLC object common members.
Definition: vlc_objects.h:45
const char * psz_name
Definition: text_style.c:33
This file is a collection of common definitions and types.
static int vlc_ml_media_set_type(vlc_medialibrary_t *p_ml, int64_t i_media_id, vlc_ml_media_type_t i_type)
Definition: vlc_media_library.h:1089
struct vlc_ml_folder_list_t vlc_ml_folder_list_t
vlc_medialibrary_t * libvlc_MlCreate(libvlc_int_t *p_libvlc)
Definition: medialibrary.c:102
void vlc_ml_media_list_release(vlc_ml_media_list_t *p_list)
Definition: medialibrary.c:322
void vlc_ml_show_list_release(vlc_ml_show_list_t *p_list)
Definition: medialibrary.c:340
static 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)
Definition: vlc_media_library.h:1624
static 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)
Definition: vlc_media_library.h:1348
static int vlc_ml_playlist_rename(vlc_medialibrary_t *p_ml, int64_t i_playlist_id, const char *name)
Definition: vlc_media_library.h:1206
static size_t vlc_ml_count_stream_history(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1708
void * vlc_ml_get(vlc_medialibrary_t *p_ml, int i_query,...)
Definition: medialibrary.c:419
static int vlc_ml_playlist_move(vlc_medialibrary_t *p_ml, int64_t i_playlist_id, uint32_t i_from, uint32_t i_to)
Definition: vlc_media_library.h:1189
static int vlc_ml_media_set_all_playback_states(vlc_medialibrary_t *p_ml, int64_t i_media_id, const vlc_ml_playback_states_all *prefs)
Definition: vlc_media_library.h:1053
static size_t vlc_ml_count_banned_entry_points(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1822
static size_t vlc_ml_count_playlist_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_playlist_id)
Definition: vlc_media_library.h:1785
static vlc_ml_media_t * vlc_ml_get_media(vlc_medialibrary_t *p_ml, int64_t i_media_id)
Definition: vlc_media_library.h:1213
static vlc_ml_media_t * vlc_ml_new_external_media(vlc_medialibrary_t *p_ml, const char *psz_mrl)
Definition: vlc_media_library.h:1014
vlc_ml_thumbnail_size_t
Definition: vlc_media_library.h:71
@ VLC_ML_THUMBNAIL_SIZE_COUNT
Definition: vlc_media_library.h:75
@ VLC_ML_THUMBNAIL_BANNER
Definition: vlc_media_library.h:73
@ VLC_ML_THUMBNAIL_SMALL
Definition: vlc_media_library.h:72
struct vlc_ml_folder_t vlc_ml_folder_t
static 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)
Definition: vlc_media_library.h:1438
void vlc_ml_album_list_release(vlc_ml_album_list_t *p_list)
Definition: medialibrary.c:331
void vlc_ml_playlist_release(vlc_ml_playlist_t *p_playlist)
Definition: medialibrary.c:261
static size_t vlc_ml_count_shows(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1561
vlc_ml_get_queries
Definition: vlc_media_library.h:439
@ VLC_ML_GET_SHOW
arg1: Show ID; ret: vlc_ml_show_t*
Definition: vlc_media_library.h:447
@ VLC_ML_GET_MEDIA_BY_MRL
arg1: Media MRL; ret: vlc_ml_media_t*
Definition: vlc_media_library.h:441
@ VLC_ML_GET_GENRE
arg1: Genre ID; ret: vlc_ml_genre_t*
Definition: vlc_media_library.h:446
@ VLC_ML_GET_INPUT_ITEM_BY_MRL
arg1: Media MRL; ret: input_item_t*
Definition: vlc_media_library.h:443
@ VLC_ML_GET_GROUP
arg1: Group ID; ret: vlc_ml_group_t*
Definition: vlc_media_library.h:449
@ VLC_ML_GET_PLAYLIST
arg1: Playlist ID; ret: vlc_ml_playlist_t*
Definition: vlc_media_library.h:448
@ VLC_ML_GET_FOLDER
arg1: folder ID; ret: vlc_ml_folder_t*
Definition: vlc_media_library.h:450
@ VLC_ML_GET_MEDIA
arg1: Media ID; ret: vlc_ml_media_t*
Definition: vlc_media_library.h:440
@ VLC_ML_GET_ALBUM
arg1: Album ID; ret: vlc_ml_album_t*
Definition: vlc_media_library.h:444
@ VLC_ML_GET_INPUT_ITEM
arg1: Media ID; ret: input_item_t*
Definition: vlc_media_library.h:442
@ VLC_ML_GET_ARTIST
arg1: Artist ID; ret: vlc_ml_artist_t*
Definition: vlc_media_library.h:445
static size_t vlc_ml_count_genre_tracks(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_genre_id)
Definition: vlc_media_library.h:1597
struct vlc_ml_bookmark_t vlc_ml_bookmark_t
static vlc_ml_playlist_t * vlc_ml_playlist_create(vlc_medialibrary_t *p_ml, const char *name)
Definition: vlc_media_library.h:1151
struct vlc_ml_show_list_t vlc_ml_show_list_t
static size_t vlc_ml_count_folder_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_folder_id)
Definition: vlc_media_library.h:1905
static size_t vlc_ml_count_history(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1669
static size_t vlc_ml_count_show_episodes(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_show_id)
Definition: vlc_media_library.h:1633
vlc_ml_control
Definition: vlc_media_library.h:555
@ VLC_ML_MEDIA_SET_ALL_MEDIA_PLAYBACK_STATES
arg1: media id; arg2: const vlc_ml_playback_states_all*
Definition: vlc_media_library.h:585
@ VLC_ML_RESUME_BACKGROUND
no args; can't fail
Definition: vlc_media_library.h:571
@ VLC_ML_MEDIA_UPDATE_BOOKMARK
arg1: media id; arg2: int64_t; arg3: const char*; arg4: const char*
Definition: vlc_media_library.h:596
@ VLC_ML_MEDIA_REMOVE_BOOKMARK
arg1: media id; arg2: int64_t
Definition: vlc_media_library.h:594
@ VLC_ML_PLAYLIST_INSERT
arg1: playlist id; arg2: media id; arg3: position; can fail
Definition: vlc_media_library.h:602
@ VLC_ML_MEDIA_ADD_BOOKMARK
arg1: media id; arg2: int64_t
Definition: vlc_media_library.h:593
@ VLC_ML_NEW_EXTERNAL_MEDIA
arg1: const char*; arg2(out): vlc_ml_media_t**
Definition: vlc_media_library.h:577
@ VLC_ML_RELOAD_FOLDER
Reload a specific folder, or all.
Definition: vlc_media_library.h:567
@ VLC_ML_MEDIA_SET_MEDIA_PLAYBACK_STATE
arg1: media id; arg2: vlc_ml_playback_state; arg3: const char*;
Definition: vlc_media_library.h:583
@ VLC_ML_ADD_FOLDER
arg1: mrl (const char*) res: can't fail
Definition: vlc_media_library.h:557
@ VLC_ML_MEDIA_SET_TYPE
arg1: media id; arg2: vlc_ml_media_type_t
Definition: vlc_media_library.h:590
@ VLC_ML_PLAYLIST_APPEND
arg1: playlist id; arg2: media id; can fail
Definition: vlc_media_library.h:601
@ VLC_ML_MEDIA_GENERATE_THUMBNAIL
arg1: media id; arg2: vlc_ml_thumbnail_size_t; arg3: width; arg4: height; arg5: position
Definition: vlc_media_library.h:588
@ VLC_ML_REMOVE_FOLDER
arg1: mrl (const char*) res: can't fail
Definition: vlc_media_library.h:558
@ VLC_ML_MEDIA_GET_ALL_MEDIA_PLAYBACK_STATES
arg1: media id; arg2(out): vlc_ml_playback_states_all*
Definition: vlc_media_library.h:584
@ VLC_ML_BAN_FOLDER
arg1: mrl (const char*) res: can't fail
Definition: vlc_media_library.h:559
@ VLC_ML_NEW_STREAM
arg1: const char*; arg2(out): vlc_ml_media_t**
Definition: vlc_media_library.h:578
@ VLC_ML_MEDIA_GET_MEDIA_PLAYBACK_STATE
arg1: media id; arg2: vlc_ml_playback_state; arg3: char**;
Definition: vlc_media_library.h:582
@ VLC_ML_MEDIA_SET_FAVORITE
arg1: media id; arg2: bool
Definition: vlc_media_library.h:592
@ VLC_ML_PLAYLIST_MOVE
arg1: playlist id; arg2: from; arg3: to; can fail
Definition: vlc_media_library.h:603
@ VLC_ML_PLAYLIST_CREATE
arg1: const char*; arg2(out): vlc_ml_playlist_t**; can fail
Definition: vlc_media_library.h:599
@ VLC_ML_UNBAN_FOLDER
arg1: mrl (const char*) res: can't fail
Definition: vlc_media_library.h:560
@ VLC_ML_PAUSE_BACKGROUND
no args; can't fail
Definition: vlc_media_library.h:570
@ VLC_ML_PLAYLIST_DELETE
arg1: playlist id; can fail
Definition: vlc_media_library.h:600
@ VLC_ML_MEDIA_SET_GENRE_THUMBNAIL
arg1: media id; arg2: const char*; arg3: vlc_ml_thumbnail_size_t
Definition: vlc_media_library.h:587
@ VLC_ML_CLEAR_HISTORY
no args; can't fail
Definition: vlc_media_library.h:574
@ VLC_ML_MEDIA_SET_PLAYED
arg1: media id; arg2: bool
Definition: vlc_media_library.h:591
@ VLC_ML_MEDIA_SET_THUMBNAIL
arg1: media id; arg2: const char*; arg3: vlc_ml_thumbnail_size_t
Definition: vlc_media_library.h:586
@ VLC_ML_MEDIA_REMOVE_ALL_BOOKMARKS
arg1: media id
Definition: vlc_media_library.h:595
@ VLC_ML_MEDIA_ADD_EXTERNAL_MRL
arg1: media id; arg2: const char*; arg3: type(vlc_ml_file_type_t)
Definition: vlc_media_library.h:589
@ VLC_ML_PLAYLIST_REMOVE
arg1: playlist id; arg2: position; can fail
Definition: vlc_media_library.h:604
@ VLC_ML_MEDIA_UPDATE_PROGRESS
arg1: media id; arg2: playback position; can fail
Definition: vlc_media_library.h:581
@ VLC_ML_IS_INDEXED
arg1: mrl (const char*) arg2 (out): bool*; res: can fail
Definition: vlc_media_library.h:561
@ VLC_ML_PLAYLIST_RENAME
arg1: playlist id; arg2: const char*; can fail
Definition: vlc_media_library.h:605
vlc_ml_event_callback_t * vlc_ml_event_register_callback(vlc_medialibrary_t *p_ml, vlc_ml_callback_t cb, void *p_data)
Registers a medialibrary callback.
Definition: medialibrary.c:67
void vlc_ml_artist_list_release(vlc_ml_artist_list_t *p_list)
Definition: medialibrary.c:312
static int vlc_ml_playlist_remove(vlc_medialibrary_t *p_ml, int64_t i_playlist_id, uint32_t i_position)
Definition: vlc_media_library.h:1198
void vlc_ml_label_list_release(vlc_ml_label_list_t *p_list)
Definition: medialibrary.c:294
static int vlc_ml_clear_history(vlc_medialibrary_t *p_ml)
Definition: vlc_media_library.h:1009
vlc_ml_track_type_t
Definition: vlc_media_library.h:64
@ VLC_ML_TRACK_TYPE_VIDEO
Definition: vlc_media_library.h:66
@ VLC_ML_TRACK_TYPE_AUDIO
Definition: vlc_media_library.h:67
@ VLC_ML_TRACK_TYPE_UNKNOWN
Definition: vlc_media_library.h:65
vlc_ml_media_type_t
Definition: vlc_media_library.h:39
@ VLC_ML_MEDIA_TYPE_VIDEO
Definition: vlc_media_library.h:41
@ VLC_ML_MEDIA_TYPE_AUDIO
Definition: vlc_media_library.h:42
@ VLC_ML_MEDIA_TYPE_UNKNOWN
Definition: vlc_media_library.h:40
static input_item_t * vlc_ml_get_input_item(vlc_medialibrary_t *p_ml, int64_t i_media_id)
Definition: vlc_media_library.h:1224
struct vlc_ml_show_episode_t vlc_ml_show_episode_t
static size_t vlc_ml_count_playlists(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, vlc_ml_playlist_type_t playlist_type)
Definition: vlc_media_library.h:1767
struct vlc_ml_thumbnail_t vlc_ml_thumbnail_t
static int vlc_ml_reload_folder(vlc_medialibrary_t *p_ml, const char *psz_mrl)
Definition: vlc_media_library.h:994
void vlc_ml_folder_release(vlc_ml_folder_t *p_folder)
Definition: medialibrary.c:284
static int vlc_ml_media_get_all_playback_pref(vlc_medialibrary_t *p_ml, int64_t i_media_id, vlc_ml_playback_states_all *prefs)
Definition: vlc_media_library.h:1046
vlc_ml_thumbnail_status_t
Definition: vlc_media_library.h:79
@ VLC_ML_THUMBNAIL_STATUS_CRASH
Definition: vlc_media_library.h:84
@ VLC_ML_THUMBNAIL_STATUS_MISSING
Definition: vlc_media_library.h:80
@ VLC_ML_THUMBNAIL_STATUS_FAILURE
Definition: vlc_media_library.h:82
@ VLC_ML_THUMBNAIL_STATUS_PERSISTENT_FAILURE
Definition: vlc_media_library.h:83
@ VLC_ML_THUMBNAIL_STATUS_AVAILABLE
Definition: vlc_media_library.h:81
static vlc_ml_album_t * vlc_ml_get_album(vlc_medialibrary_t *p_ml, int64_t i_album_id)
Definition: vlc_media_library.h:1235
static int vlc_ml_playlist_insert(vlc_medialibrary_t *p_ml, int64_t i_playlist_id, int64_t i_media_id, uint32_t i_position)
Definition: vlc_media_library.h:1180
static 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)
Definition: vlc_media_library.h:1270
static 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)
Definition: vlc_media_library.h:1366
static size_t vlc_ml_count_media_labels(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_media_id)
Definition: vlc_media_library.h:1651
static size_t vlc_ml_count_genres(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1519
vlc_ml_media_subtype_t
Definition: vlc_media_library.h:46
@ VLC_ML_MEDIA_SUBTYPE_UNKNOWN
Definition: vlc_media_library.h:47
@ VLC_ML_MEDIA_SUBTYPE_ALBUMTRACK
Definition: vlc_media_library.h:50
@ VLC_ML_MEDIA_SUBTYPE_SHOW_EPISODE
Definition: vlc_media_library.h:48
@ VLC_ML_MEDIA_SUBTYPE_MOVIE
Definition: vlc_media_library.h:49
static 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)
vlc_ml_list_artists
Definition: vlc_media_library.h:1534
void(* vlc_ml_callback_t)(void *p_data, const vlc_ml_event_t *p_event)
Definition: vlc_media_library.h:854
struct vlc_ml_event_t vlc_ml_event_t
static size_t vlc_ml_count_artist_tracks(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_artist_id)
Definition: vlc_media_library.h:1447
static size_t vlc_ml_count_genre_albums(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_genre_id)
Definition: vlc_media_library.h:1615
struct vlc_ml_label_list_t vlc_ml_label_list_t
static int vlc_ml_remove_folder(vlc_medialibrary_t *p_ml, const char *psz_folder)
Definition: vlc_media_library.h:973
static vlc_ml_media_list_t * vlc_ml_list_folder_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_folder_id)
Definition: vlc_media_library.h:1891
static vlc_ml_playlist_list_t * vlc_ml_list_playlists(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, vlc_ml_playlist_type_t playlist_type)
Definition: vlc_media_library.h:1758
#define vlc_ml_instance_get(x)
Definition: vlc_media_library.h:902
vlc_ml_event_type
Definition: vlc_media_library.h:654
@ VLC_ML_EVENT_ARTIST_UPDATED
Definition: vlc_media_library.h:668
@ VLC_ML_EVENT_BOOKMARKS_ADDED
Definition: vlc_media_library.h:682
@ VLC_ML_EVENT_RESCAN_STARTED
Sent when an application requested rescan starts being processed.
Definition: vlc_media_library.h:778
@ VLC_ML_EVENT_ALBUM_ADDED
Definition: vlc_media_library.h:670
@ VLC_ML_EVENT_DISCOVERY_PROGRESS
Sent when a discovery or reload operation starts analyzing a new folder.
Definition: vlc_media_library.h:704
@ VLC_ML_EVENT_BACKGROUND_IDLE_CHANGED
Sent when a discoverer or parser threads changes its idle state.
Definition: vlc_media_library.h:752
@ VLC_ML_EVENT_BOOKMARKS_DELETED
Definition: vlc_media_library.h:684
@ VLC_ML_EVENT_FOLDER_DELETED
Definition: vlc_media_library.h:687
@ VLC_ML_EVENT_MEDIA_UPDATED
Definition: vlc_media_library.h:665
@ VLC_ML_EVENT_ENTRY_POINT_ADDED
Sent when a new entry point gets added to the database.
Definition: vlc_media_library.h:724
@ VLC_ML_EVENT_PLAYLIST_ADDED
Definition: vlc_media_library.h:676
@ VLC_ML_EVENT_DISCOVERY_STARTED
A discovery started.
Definition: vlc_media_library.h:698
@ VLC_ML_EVENT_MEDIA_THUMBNAIL_GENERATED
Sent after a media thumbnail was generated, or if it's generation failed.
Definition: vlc_media_library.h:767
@ VLC_ML_EVENT_GENRE_UPDATED
Definition: vlc_media_library.h:680
@ VLC_ML_EVENT_ENTRY_POINT_REMOVED
Sent when an entry point removal request has been processed.
Definition: vlc_media_library.h:731
@ VLC_ML_EVENT_HISTORY_CHANGED
Sent after the history gets changed.
Definition: vlc_media_library.h:774
@ VLC_ML_EVENT_ENTRY_POINT_BANNED
Sent when an entry point ban request has been processed.
Definition: vlc_media_library.h:738
@ VLC_ML_EVENT_GROUP_DELETED
Definition: vlc_media_library.h:675
@ VLC_ML_EVENT_GROUP_ADDED
Definition: vlc_media_library.h:673
@ VLC_ML_EVENT_GENRE_DELETED
Definition: vlc_media_library.h:681
@ VLC_ML_EVENT_GENRE_ADDED
Definition: vlc_media_library.h:679
@ VLC_ML_EVENT_ENTRY_POINT_UNBANNED
Sent when an entry point unban request has been processed.
Definition: vlc_media_library.h:745
@ VLC_ML_EVENT_ALBUM_DELETED
Definition: vlc_media_library.h:672
@ VLC_ML_EVENT_MEDIA_ADDED
Entity modification callbacks.
Definition: vlc_media_library.h:664
@ VLC_ML_EVENT_DISCOVERY_FAILED
This event is sent when a discovery failed.
Definition: vlc_media_library.h:714
@ VLC_ML_EVENT_ARTIST_DELETED
Definition: vlc_media_library.h:669
@ VLC_ML_EVENT_BOOKMARKS_UPDATED
Definition: vlc_media_library.h:683
@ VLC_ML_EVENT_PLAYLIST_DELETED
Definition: vlc_media_library.h:678
@ VLC_ML_EVENT_FOLDER_ADDED
Definition: vlc_media_library.h:685
@ VLC_ML_EVENT_PARSING_PROGRESS_UPDATED
Sent when the parsing progress percentage gets updated.
Definition: vlc_media_library.h:760
@ VLC_ML_EVENT_ALBUM_UPDATED
Definition: vlc_media_library.h:671
@ VLC_ML_EVENT_ARTIST_ADDED
Definition: vlc_media_library.h:667
@ VLC_ML_EVENT_FOLDER_UPDATED
Definition: vlc_media_library.h:686
@ VLC_ML_EVENT_PLAYLIST_UPDATED
Definition: vlc_media_library.h:677
@ VLC_ML_EVENT_DISCOVERY_COMPLETED
Sent when all queued discovery operations are done being processed.
Definition: vlc_media_library.h:708
@ VLC_ML_EVENT_GROUP_UPDATED
Definition: vlc_media_library.h:674
@ VLC_ML_EVENT_MEDIA_DELETED
Definition: vlc_media_library.h:666
void libvlc_MlRelease(vlc_medialibrary_t *p_ml)
Definition: medialibrary.c:120
static vlc_ml_media_list_t * vlc_ml_list_audio_of(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int i_parent_type, int64_t i_parent_id)
Definition: vlc_media_library.h:1318
static 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)
Definition: vlc_media_library.h:1588
static 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)
Definition: vlc_media_library.h:1776
struct vlc_ml_playlist_t vlc_ml_playlist_t
static vlc_ml_query_params_t vlc_ml_query_params_create(void)
Definition: vlc_media_library.h:957
static int vlc_ml_media_update_progress(vlc_medialibrary_t *p_ml, int64_t i_media_id, double progress)
Definition: vlc_media_library.h:1030
static vlc_ml_artist_t * vlc_ml_get_artist(vlc_medialibrary_t *p_ml, int64_t i_artist_id)
Definition: vlc_media_library.h:1240
static vlc_ml_folder_list_t * vlc_ml_list_folders(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1834
struct vlc_ml_genre_list_t vlc_ml_genre_list_t
static size_t vlc_ml_count_album_tracks(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_album_id)
Definition: vlc_media_library.h:1393
vlc_ml_history_type_t
Definition: vlc_media_library.h:88
@ VLC_ML_HISTORY_TYPE_MEDIA
Definition: vlc_media_library.h:89
@ VLC_ML_HISTORY_TYPE_NETWORK
Definition: vlc_media_library.h:90
static int vlc_ml_media_set_played(vlc_medialibrary_t *p_ml, int64_t i_media_id, bool b_played)
Definition: vlc_media_library.h:1095
static 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)
Definition: vlc_media_library.h:1738
struct vlc_ml_artist_list_t vlc_ml_artist_list_t
static size_t vlc_ml_count_video_of(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int i_parent_type, int64_t i_parent_id)
Definition: vlc_media_library.h:1303
static int vlc_ml_media_add_external_mrl(vlc_medialibrary_t *p_ml, int64_t i_media_id, const char *psz_mrl, int i_type)
Definition: vlc_media_library.h:1083
static 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)
Definition: vlc_media_library.h:1642
static size_t vlc_ml_count_artists(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, bool includeAll)
Definition: vlc_media_library.h:1543
struct vlc_ml_boomkmark_list_t vlc_ml_bookmark_list_t
static int vlc_ml_media_set_playback_state(vlc_medialibrary_t *p_ml, int64_t i_media_id, int i_state, const char *psz_value)
Definition: vlc_media_library.h:1041
static int vlc_ml_ban_folder(vlc_medialibrary_t *p_ml, const char *psz_folder)
Definition: vlc_media_library.h:978
int vlc_ml_list(vlc_medialibrary_t *p_ml, int i_query, const vlc_ml_query_params_t *p_params,...)
Definition: medialibrary.c:438
static 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)
Definition: vlc_media_library.h:1688
struct vlc_ml_media_list_t vlc_ml_media_list_t
void vlc_ml_playlist_list_release(vlc_ml_playlist_list_t *p_list)
Definition: medialibrary.c:367
static 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)
Definition: vlc_media_library.h:1679
vlc_ml_list_queries
Definition: vlc_media_library.h:454
@ VLC_ML_LIST_VIDEOS
arg1 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:457
@ VLC_ML_COUNT_FOLDERS_BY_TYPE
arg1 vlc_ml_media_type_t: the media type.
Definition: vlc_media_library.h:484
@ VLC_ML_LIST_ARTIST_ALBUMS
arg1: The artist id.
Definition: vlc_media_library.h:493
@ VLC_ML_LIST_SHOW_EPISODES
arg1: show id; arg2(out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:507
@ VLC_ML_LIST_ALBUMS
arg1 (out): vlc_ml_album_list_t**
Definition: vlc_media_library.h:461
@ VLC_ML_LIST_ENTRY_POINTS
arg1 bool: list_banned; arg2 (out): vlc_ml_folder_list_t**
Definition: vlc_media_library.h:479
@ VLC_ML_LIST_GROUPS
arg1 (out): vlc_ml_group_list_t**
Definition: vlc_media_library.h:469
@ VLC_ML_LIST_FOLDER_MEDIA
arg1: folder id; arg2 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:526
@ VLC_ML_COUNT_HISTORY_BY_TYPE
arg1 vlc_ml_media_type_t: the media type.
Definition: vlc_media_library.h:476
@ VLC_ML_COUNT_PLAYLIST_MEDIA
arg1: playlist id; arg2 (out): size_t*
Definition: vlc_media_library.h:521
@ VLC_ML_LIST_GENRE_ARTISTS
arg1: genre id; arg2 (out): vlc_ml_artist_list_t**
Definition: vlc_media_library.h:499
@ VLC_ML_LIST_STREAM_HISTORY
arg1 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:477
@ VLC_ML_COUNT_GENRES
arg1 (out): size_t*
Definition: vlc_media_library.h:464
@ VLC_ML_COUNT_SHOWS
arg1 (out): size_t*
Definition: vlc_media_library.h:468
@ VLC_ML_LIST_ALBUMS_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): ml_album_list_t**
Definition: vlc_media_library.h:538
@ VLC_ML_LIST_MEDIA_BOOKMARKS
arg1: media id; arg2 (out): vlc_ml_bookmark_list_t**
Definition: vlc_media_library.h:513
@ VLC_ML_LIST_PLAYLISTS
arg1 (out): vlc_ml_playlist_list_t**
Definition: vlc_media_library.h:471
@ VLC_ML_LIST_ARTISTS_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): ml_artist_list_t**
Definition: vlc_media_library.h:536
@ VLC_ML_LIST_AUDIOS
arg1 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:459
@ VLC_ML_COUNT_SHOW_EPISODES
arg1: show id; arg2(out): size_t*
Definition: vlc_media_library.h:508
@ VLC_ML_LIST_SUBFOLDERS
arg1: parent id; arg2 (out): vlc_ml_folder_list_t**
Definition: vlc_media_library.h:524
@ VLC_ML_LIST_ARTISTS
arg1 bool: includeAll; arg2 (out): vlc_ml_genre_list_t**
Definition: vlc_media_library.h:465
@ VLC_ML_COUNT_ARTISTS_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): size_t*
Definition: vlc_media_library.h:537
@ VLC_ML_COUNT_ARTIST_ALBUMS
arg1: The artist id.
Definition: vlc_media_library.h:494
@ VLC_ML_COUNT_MEDIA_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): size_t*
Definition: vlc_media_library.h:531
@ VLC_ML_LIST_HISTORY_BY_TYPE
arg1 vlc_ml_media_type_t: the media type.
Definition: vlc_media_library.h:475
@ VLC_ML_COUNT_GENRE_TRACKS
arg1: genre id; arg2 (out): size_t*
Definition: vlc_media_library.h:502
@ VLC_ML_COUNT_ARTIST_TRACKS
arg1: The artist id.
Definition: vlc_media_library.h:496
@ VLC_ML_COUNT_STREAM_HISTORY
arg1 (out): size_t*
Definition: vlc_media_library.h:478
@ VLC_ML_LIST_GENRE_TRACKS
arg1: genre id; arg2 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:501
@ VLC_ML_COUNT_ALBUM_ARTISTS
arg1: The album id.
Definition: vlc_media_library.h:490
@ VLC_ML_LIST_MEDIA_LABELS
arg1: media id; arg2 (out): vlc_ml_label_list_t**
Definition: vlc_media_library.h:511
@ VLC_ML_COUNT_AUDIOS
arg1 (out): size_t*
Definition: vlc_media_library.h:460
@ VLC_ML_COUNT_SUBFOLDERS
arg1: parent id; arg2 (out): size_t*
Definition: vlc_media_library.h:525
@ VLC_ML_LIST_HISTORY
arg1 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:473
@ VLC_ML_COUNT_ARTISTS
arg1 bool: includeAll; arg2 (out): size_t*
Definition: vlc_media_library.h:466
@ VLC_ML_LIST_GENRE_ALBUMS
arg1: genre id; arg2 (out): vlc_ml_album_list_t**
Definition: vlc_media_library.h:503
@ VLC_ML_COUNT_ALBUMS_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): size_t*
Definition: vlc_media_library.h:539
@ VLC_ML_COUNT_GENRE_ALBUMS
arg1: genre id; arg2 (out): size_t*
Definition: vlc_media_library.h:504
@ VLC_ML_COUNT_MEDIA_LABELS
arg1: media id; arg2 (out): size_t*
Definition: vlc_media_library.h:512
@ VLC_ML_LIST_GROUP_MEDIA
arg1: playlist id; arg2 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:516
@ VLC_ML_COUNT_VIDEO_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): size_t*
Definition: vlc_media_library.h:533
@ VLC_ML_LIST_VIDEO_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): size_t*
Definition: vlc_media_library.h:532
@ VLC_ML_LIST_PLAYLIST_MEDIA
arg1: playlist id; arg2 (out): vlc_ml_media_list_t**
Definition: vlc_media_library.h:520
@ VLC_ML_LIST_FOLDERS
arg1 (out): vlc_ml_folder_list_t**
Definition: vlc_media_library.h:481
@ VLC_ML_COUNT_GROUP_MEDIA
arg1: playlist id; arg2 (out): size_t*
Definition: vlc_media_library.h:517
@ VLC_ML_COUNT_VIDEOS
arg1 (out): size_t*
Definition: vlc_media_library.h:458
@ VLC_ML_LIST_SHOWS
arg1 (out): vlc_ml_show_list_t**
Definition: vlc_media_library.h:467
@ VLC_ML_COUNT_FOLDER_MEDIA
arg1: folder id; arg2 (out): size_t*
Definition: vlc_media_library.h:527
@ VLC_ML_COUNT_FOLDERS
arg1 (out): size_t*
Definition: vlc_media_library.h:482
@ VLC_ML_LIST_AUDIO_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): size_t*
Definition: vlc_media_library.h:534
@ VLC_ML_COUNT_ENTRY_POINTS
arg1 bool: list_banned; arg2 (out): size_t*
Definition: vlc_media_library.h:480
@ VLC_ML_LIST_GENRES
arg1 (out): vlc_ml_genre_list_t**
Definition: vlc_media_library.h:463
@ VLC_ML_LIST_ALBUM_TRACKS
arg1: The album id.
Definition: vlc_media_library.h:487
@ VLC_ML_COUNT_ALBUMS
arg1 (out): size_t*
Definition: vlc_media_library.h:462
@ VLC_ML_LIST_FOLDERS_BY_TYPE
arg1 vlc_ml_media_type_t: the media type.
Definition: vlc_media_library.h:483
@ VLC_ML_COUNT_AUDIO_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): size_t*
Definition: vlc_media_library.h:535
@ VLC_ML_LIST_ARTIST_TRACKS
arg1: The artist id.
Definition: vlc_media_library.h:495
@ VLC_ML_COUNT_ALBUM_TRACKS
arg1: The album id.
Definition: vlc_media_library.h:488
@ VLC_ML_COUNT_HISTORY
arg1 (out): size_t*
Definition: vlc_media_library.h:474
@ VLC_ML_COUNT_PLAYLISTS
arg1 (out): size_t*
Definition: vlc_media_library.h:472
@ VLC_ML_COUNT_GROUPS
arg1 (out): size_t*
Definition: vlc_media_library.h:470
@ VLC_ML_LIST_ALBUM_ARTISTS
arg1: The album id.
Definition: vlc_media_library.h:489
@ VLC_ML_COUNT_GENRE_ARTISTS
arg1: genre id; arg2 (out): size_t*
Definition: vlc_media_library.h:500
@ VLC_ML_LIST_MEDIA_OF
arg1: parent entity type; arg2: parent entity id; arg3(out): ml_media_list_t**
Definition: vlc_media_library.h:530
static size_t vlc_ml_count_entry_points(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1803
static int vlc_ml_media_update_bookmark(vlc_medialibrary_t *p_ml, int64_t i_media_id, int64_t i_time, const char *psz_name, const char *psz_desc)
Definition: vlc_media_library.h:1134
#define vlc_ml_release(OBJ)
Definition: vlc_media_library.h:1924
static size_t vlc_ml_count_audio_of(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int i_parent_type, int64_t i_parent_id)
Definition: vlc_media_library.h:1333
static vlc_ml_genre_t * vlc_ml_get_genre(vlc_medialibrary_t *p_ml, int64_t i_genre_id)
Definition: vlc_media_library.h:1245
struct vlc_ml_file_t vlc_ml_file_t
struct vlc_ml_media_track_t vlc_ml_media_track_t
vlc_ml_playback_state
User playback settings.
Definition: vlc_media_library.h:619
@ VLC_ML_PLAYBACK_STATE_PROGRAM
Definition: vlc_media_library.h:624
@ VLC_ML_PLAYBACK_STATE_TITLE
Definition: vlc_media_library.h:622
@ VLC_ML_PLAYBACK_STATE_DEINTERLACE
Definition: vlc_media_library.h:629
@ VLC_ML_PLAYBACK_STATE_SPEED
Definition: vlc_media_library.h:621
@ VLC_ML_PLAYBACK_STATE_VIDEO_FILTER
Definition: vlc_media_library.h:630
@ VLC_ML_PLAYBACK_STATE_AUDIO_DELAY
Definition: vlc_media_library.h:633
@ VLC_ML_PLAYBACK_STATE_SUBTITLE_DELAY
Definition: vlc_media_library.h:635
@ VLC_ML_PLAYBACK_STATE_RATING
Definition: vlc_media_library.h:620
@ VLC_ML_PLAYBACK_STATE_APP_SPECIFIC
Definition: vlc_media_library.h:636
@ VLC_ML_PLAYBACK_STATE_ASPECT_RATIO
Definition: vlc_media_library.h:626
@ VLC_ML_PLAYBACK_STATE_SUBTITLE_TRACK
Definition: vlc_media_library.h:634
@ VLC_ML_PLAYBACK_STATE_GAIN
Definition: vlc_media_library.h:632
@ VLC_ML_PLAYBACK_STATE_AUDIO_TRACK
Definition: vlc_media_library.h:631
@ VLC_ML_PLAYBACK_STATE_CROP
Definition: vlc_media_library.h:628
@ VLC_ML_PLAYBACK_STATE_CHAPTER
Definition: vlc_media_library.h:623
@ VLC_ML_PLAYBACK_STATE_VIDEO_TRACK
Definition: vlc_media_library.h:625
@ VLC_ML_PLAYBACK_STATE_ZOOM
Definition: vlc_media_library.h:627
static vlc_ml_folder_list_t * vlc_ml_list_banned_entry_points(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1813
struct vlc_ml_album_t vlc_ml_album_t
static int vlc_ml_resume_background(vlc_medialibrary_t *p_ml)
Definition: vlc_media_library.h:1004
static vlc_ml_folder_list_t * vlc_ml_list_entry_points(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1794
void vlc_ml_album_release(vlc_ml_album_t *p_album)
Definition: medialibrary.c:219
struct vlc_ml_album_list_t vlc_ml_album_list_t
struct vlc_ml_group_list_t vlc_ml_group_list_t
static vlc_ml_show_t * vlc_ml_get_show(vlc_medialibrary_t *p_ml, int64_t i_show_id)
Definition: vlc_media_library.h:1250
void vlc_ml_folder_list_release(vlc_ml_folder_list_t *p_list)
Definition: medialibrary.c:376
static vlc_ml_media_list_t * vlc_ml_list_stream_history(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1699
static vlc_ml_bookmark_list_t * vlc_ml_list_media_bookmarks(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_media_id)
Definition: vlc_media_library.h:1108
struct vlc_ml_movie_t vlc_ml_movie_t
void vlc_ml_artist_release(vlc_ml_artist_t *p_artist)
Definition: medialibrary.c:203
static vlc_ml_folder_t * vlc_ml_get_folder(vlc_medialibrary_t *p_ml, int64_t i_folder_id)
Definition: vlc_media_library.h:1260
static int vlc_ml_media_set_favorite(vlc_medialibrary_t *p_ml, int64_t i_media_id, bool b_favorite)
Definition: vlc_media_library.h:1101
struct vlc_ml_artist_t vlc_ml_artist_t
static 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)
Definition: vlc_media_library.h:1384
static vlc_ml_genre_list_t * vlc_ml_list_genres(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1510
static vlc_ml_folder_list_t * vlc_ml_list_folders_by_type(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, vlc_ml_media_type_t type)
Definition: vlc_media_library.h:1861
void vlc_ml_bookmark_list_release(vlc_ml_bookmark_list_t *p_list)
Definition: medialibrary.c:410
static vlc_ml_group_t * vlc_ml_get_group(vlc_medialibrary_t *p_ml, int64_t i_group_id)
Definition: vlc_media_library.h:1255
static int vlc_ml_media_remove_bookmark(vlc_medialibrary_t *p_ml, int64_t i_media_id, int64_t i_time)
Definition: vlc_media_library.h:1127
struct vlc_ml_show_t vlc_ml_show_t
void vlc_ml_genre_release(vlc_ml_genre_t *p_genre)
Definition: medialibrary.c:227
static 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)
Definition: vlc_media_library.h:1570
void vlc_ml_genre_list_release(vlc_ml_genre_list_t *p_list)
Definition: medialibrary.c:349
static size_t vlc_ml_count_group_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_group_id)
Definition: vlc_media_library.h:1747
static int vlc_ml_media_set_thumbnail(vlc_medialibrary_t *p_ml, int64_t i_media_id, const char *psz_mrl, vlc_ml_thumbnail_size_t sizeType)
Definition: vlc_media_library.h:1060
struct vlc_medialibrary_callbacks_t vlc_medialibrary_callbacks_t
static vlc_ml_media_t * vlc_ml_new_stream(vlc_medialibrary_t *p_ml, const char *psz_mrl)
Definition: vlc_media_library.h:1022
void vlc_ml_event_unregister_callback(vlc_medialibrary_t *p_ml, vlc_ml_event_callback_t *p_callback)
Unregisters a medialibrary callback.
Definition: medialibrary.c:81
struct vlc_ml_media_t vlc_ml_media_t
static vlc_ml_media_list_t * vlc_ml_list_video_of(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int i_parent_type, int64_t i_parent_id)
Definition: vlc_media_library.h:1288
struct vlc_ml_group_t vlc_ml_group_t
static int vlc_ml_media_remove_all_bookmarks(vlc_medialibrary_t *p_ml, int64_t i_media_id)
Definition: vlc_media_library.h:1144
static size_t vlc_ml_count_folders_by_type(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, vlc_ml_media_type_t type)
Definition: vlc_media_library.h:1875
static int vlc_ml_is_indexed(vlc_medialibrary_t *p_ml, const char *psz_mrl, bool *p_res)
Definition: vlc_media_library.h:988
static vlc_ml_album_list_t * vlc_ml_list_albums(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1492
static int vlc_ml_playlist_append(vlc_medialibrary_t *p_ml, int64_t i_playlist_id, int64_t i_media_id)
Definition: vlc_media_library.h:1172
static size_t vlc_ml_count_album_artists(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_album_id)
Definition: vlc_media_library.h:1411
static vlc_ml_media_list_t * vlc_ml_list_video_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1456
vlc_ml_playlist_type_t
Definition: vlc_media_library.h:94
@ VLC_ML_PLAYLIST_TYPE_ALL
Definition: vlc_media_library.h:95
@ VLC_ML_PLAYLIST_TYPE_AUDIO
Definition: vlc_media_library.h:96
@ VLC_ML_PLAYLIST_TYPE_VIDEO
Definition: vlc_media_library.h:97
static vlc_ml_media_list_t * vlc_ml_list_history(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1660
static vlc_ml_playlist_t * vlc_ml_get_playlist(vlc_medialibrary_t *p_ml, int64_t i_playlist_id)
Definition: vlc_media_library.h:1265
static size_t vlc_ml_count_genre_artists(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_genre_id)
Definition: vlc_media_library.h:1579
static 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)
Definition: vlc_media_library.h:1402
void vlc_ml_file_list_release(vlc_ml_file_list_t *p_list)
Definition: medialibrary.c:303
static vlc_ml_group_list_t * vlc_ml_list_groups(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1720
void vlc_ml_bookmark_release(vlc_ml_bookmark_t *p_bookmark)
Definition: medialibrary.c:402
void vlc_ml_playback_states_all_release(vlc_ml_playback_states_all *prefs)
Definition: medialibrary.c:385
static input_item_t * vlc_ml_get_input_item_by_mrl(vlc_medialibrary_t *p_ml, const char *psz_mrl)
Definition: vlc_media_library.h:1229
struct vlc_ml_playback_states_all vlc_ml_playback_states_all
static int vlc_ml_media_get_playback_state(vlc_medialibrary_t *p_ml, int64_t i_media_id, int i_state, char **ppsz_result)
Definition: vlc_media_library.h:1036
static int vlc_ml_pause_background(vlc_medialibrary_t *p_ml)
Definition: vlc_media_library.h:999
static int vlc_ml_media_generate_thumbnail(vlc_medialibrary_t *p_ml, int64_t i_media_id, vlc_ml_thumbnail_size_t size_type, uint32_t i_desired_width, uint32_t i_desired_height, double position)
Definition: vlc_media_library.h:1073
static vlc_ml_show_list_t * vlc_ml_list_shows(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1552
static int vlc_ml_playlist_delete(vlc_medialibrary_t *p_ml, int64_t i_playlist_id)
Definition: vlc_media_library.h:1164
struct vlc_ml_label_t vlc_ml_label_t
static int vlc_ml_unban_folder(vlc_medialibrary_t *p_ml, const char *psz_folder)
Definition: vlc_media_library.h:983
vlc_ml_file_type_t
Definition: vlc_media_library.h:54
@ VLC_ML_FILE_TYPE_MAIN
Definition: vlc_media_library.h:56
@ VLC_ML_FILE_TYPE_SUBTITLE
Definition: vlc_media_library.h:59
@ VLC_ML_FILE_TYPE_UNKNOWN
Definition: vlc_media_library.h:55
@ VLC_ML_FILE_TYPE_SOUNDTRACK
Definition: vlc_media_library.h:58
@ VLC_ML_FILE_TYPE_PART
Definition: vlc_media_library.h:57
@ VLC_ML_FILE_TYPE_PLAYLIST
Definition: vlc_media_library.h:60
static int vlc_ml_media_add_bookmark(vlc_medialibrary_t *p_ml, int64_t i_media_id, int64_t i_time)
Definition: vlc_media_library.h:1120
static 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)
Definition: vlc_media_library.h:1375
void vlc_ml_show_release(vlc_ml_show_t *p_show)
Definition: medialibrary.c:149
struct vlc_ml_media_track_list_t vlc_ml_media_track_list_t
struct vlc_ml_file_list_t vlc_ml_file_list_t
static size_t vlc_ml_count_artist_albums(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params, int64_t i_artist_id)
Definition: vlc_media_library.h:1429
static size_t vlc_ml_count_albums(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1501
vlc_ml_sorting_criteria_t
Definition: vlc_media_library.h:408
@ VLC_ML_SORTING_LASTMODIFICATIONDATE
Definition: vlc_media_library.h:418
@ VLC_ML_SORTING_INSERTIONDATE
Definition: vlc_media_library.h:417
@ VLC_ML_SORTING_PLAYCOUNT
Definition: vlc_media_library.h:422
@ VLC_ML_SORTING_ARTIST
Definition: vlc_media_library.h:421
@ VLC_ML_SORTING_ALPHA
Definition: vlc_media_library.h:415
@ VLC_ML_SORTING_TRACKNUMBER
Definition: vlc_media_library.h:425
@ VLC_ML_SORTING_FILENAME
Definition: vlc_media_library.h:424
@ VLC_ML_SORTING_ALBUM
Definition: vlc_media_library.h:423
@ VLC_ML_SORTING_DEFAULT
Definition: vlc_media_library.h:414
@ VLC_ML_SORTING_DURATION
Definition: vlc_media_library.h:416
@ VLC_ML_SORTING_RELEASEDATE
Definition: vlc_media_library.h:419
@ VLC_ML_SORTING_FILESIZE
Definition: vlc_media_library.h:420
void vlc_ml_media_release(vlc_ml_media_t *p_media)
Definition: medialibrary.c:270
static size_t vlc_ml_count_audio_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1483
static int vlc_ml_add_folder(vlc_medialibrary_t *p_ml, const char *psz_folder)
Definition: vlc_media_library.h:968
static size_t vlc_ml_count_groups(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1729
static 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)
Definition: vlc_media_library.h:1357
void vlc_ml_group_release(vlc_ml_group_t *p_group)
Definition: medialibrary.c:244
static 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)
Definition: vlc_media_library.h:1606
static int vlc_ml_media_set_genre_thumbnail(vlc_medialibrary_t *p_ml, int64_t i_media_id, const char *psz_mrl, vlc_ml_thumbnail_size_t sizeType)
Definition: vlc_media_library.h:1066
static 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)
Definition: vlc_media_library.h:1279
static vlc_ml_media_list_t * vlc_ml_list_audio_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1474
struct vlc_ml_playlist_list_t vlc_ml_playlist_list_t
struct vlc_ml_genre_t vlc_ml_genre_t
void vlc_ml_event_unregister_from_callback(vlc_medialibrary_t *p_ml, vlc_ml_event_callback_t *p_callback)
Unregisters a medialibrary callback from the said callback.
Definition: medialibrary.c:90
static 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)
Definition: vlc_media_library.h:1420
static size_t vlc_ml_count_video_media(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1465
vlc_ml_parent_type
Definition: vlc_media_library.h:543
@ VLC_ML_PARENT_ARTIST
Definition: vlc_media_library.h:546
@ VLC_ML_PARENT_ALBUM
Definition: vlc_media_library.h:545
@ VLC_ML_PARENT_GROUP
Definition: vlc_media_library.h:549
@ VLC_ML_PARENT_FOLDER
Definition: vlc_media_library.h:550
@ VLC_ML_PARENT_UNKNOWN
Definition: vlc_media_library.h:544
@ VLC_ML_PARENT_PLAYLIST
Definition: vlc_media_library.h:551
@ VLC_ML_PARENT_SHOW
Definition: vlc_media_library.h:547
@ VLC_ML_PARENT_GENRE
Definition: vlc_media_library.h:548
void vlc_ml_group_list_release(vlc_ml_group_list_t *p_list)
Definition: medialibrary.c:358
static size_t vlc_ml_count_folders(vlc_medialibrary_t *p_ml, const vlc_ml_query_params_t *params)
Definition: vlc_media_library.h:1847
static vlc_ml_media_t * vlc_ml_get_media_by_mrl(vlc_medialibrary_t *p_ml, const char *psz_mrl)
Definition: vlc_media_library.h:1218
char psz_value[8]
Definition: vout_intf.c:99