VLC  4.0.0-dev
Data Structures | Functions | Variables
medialibrary.c File Reference
Include dependency graph for medialibrary.c:

Data Structures

struct  vlc_ml_event_callback_t
 
struct  vlc_medialibrary_t
 

Functions

static vlc_medialibrary_tml_priv (vlc_medialibrary_module_t *p_ml)
 
static void vlc_ml_event_send (vlc_medialibrary_module_t *p_ml, const vlc_ml_event_t *p_event)
 
vlc_ml_event_callback_tvlc_ml_event_register_callback (vlc_medialibrary_t *p_ml, vlc_ml_callback_t cb, void *p_data)
 Registers a medialibrary callback. More...
 
void vlc_ml_event_unregister_callback (vlc_medialibrary_t *p_ml, vlc_ml_event_callback_t *p_cb)
 Unregisters a medialibrary callback. More...
 
void vlc_ml_event_unregister_from_callback (vlc_medialibrary_t *p_ml, vlc_ml_event_callback_t *p_cb)
 Unregisters a medialibrary callback from the said callback. More...
 
vlc_medialibrary_tlibvlc_MlCreate (libvlc_int_t *p_libvlc)
 
void libvlc_MlRelease (vlc_medialibrary_t *p_ml)
 
vlc_medialibrary_tvlc_ml_instance_get (vlc_object_t *p_obj)
 
static void vlc_ml_thumbnails_release (vlc_ml_thumbnail_t *p_thumbnails)
 
static void vlc_ml_show_release_inner (vlc_ml_show_t *p_show)
 
void vlc_ml_show_release (vlc_ml_show_t *p_show)
 
static void vlc_ml_media_release_tracks_inner (vlc_ml_media_track_list_t *p_tracks)
 
static void vlc_ml_media_release_inner (vlc_ml_media_t *p_media)
 
static void vlc_ml_artist_release_inner (vlc_ml_artist_t *p_artist)
 
void vlc_ml_artist_release (vlc_ml_artist_t *p_artist)
 
static void vlc_ml_album_release_inner (vlc_ml_album_t *p_album)
 
void vlc_ml_album_release (vlc_ml_album_t *p_album)
 
void vlc_ml_genre_release (vlc_ml_genre_t *p_genre)
 
static void vlc_ml_group_release_inner (vlc_ml_group_t *p_group)
 
void vlc_ml_group_release (vlc_ml_group_t *p_group)
 
static void vlc_ml_playlist_release_inner (vlc_ml_playlist_t *p_playlist)
 
void vlc_ml_playlist_release (vlc_ml_playlist_t *p_playlist)
 
void vlc_ml_media_release (vlc_ml_media_t *p_media)
 
void vlc_ml_folder_release (vlc_ml_folder_t *p_folder)
 
void vlc_ml_label_list_release (vlc_ml_label_list_t *p_list)
 
void vlc_ml_file_list_release (vlc_ml_file_list_t *p_list)
 
void vlc_ml_artist_list_release (vlc_ml_artist_list_t *p_list)
 
void vlc_ml_media_list_release (vlc_ml_media_list_t *p_list)
 
void vlc_ml_album_list_release (vlc_ml_album_list_t *p_list)
 
void vlc_ml_show_list_release (vlc_ml_show_list_t *p_list)
 
void vlc_ml_genre_list_release (vlc_ml_genre_list_t *p_list)
 
void vlc_ml_group_list_release (vlc_ml_group_list_t *p_list)
 
void vlc_ml_playlist_list_release (vlc_ml_playlist_list_t *p_list)
 
void vlc_ml_folder_list_release (vlc_ml_folder_list_t *p_list)
 
void vlc_ml_playback_states_all_release (vlc_ml_playback_states_all *prefs)
 
static void vlc_ml_bookmark_release_inner (vlc_ml_bookmark_t *bookmark)
 
void vlc_ml_bookmark_release (vlc_ml_bookmark_t *bookmark)
 
void vlc_ml_bookmark_list_release (vlc_ml_bookmark_list_t *list)
 
void * vlc_ml_get (vlc_medialibrary_t *p_ml, int i_query,...)
 
int vlc_ml_control (vlc_medialibrary_t *p_ml, int i_query,...)
 
int vlc_ml_list (vlc_medialibrary_t *p_ml, int i_query, const vlc_ml_query_params_t *p_params,...)
 

Variables

static const vlc_medialibrary_callbacks_t callbacks
 

Function Documentation

◆ libvlc_MlCreate()

vlc_medialibrary_t* libvlc_MlCreate ( libvlc_int_t p_libvlc)

◆ libvlc_MlRelease()

void libvlc_MlRelease ( vlc_medialibrary_t p_ml)

◆ ml_priv()

static vlc_medialibrary_t* ml_priv ( vlc_medialibrary_module_t p_ml)
static

References container_of.

Referenced by vlc_ml_event_send().

◆ vlc_ml_album_list_release()

void vlc_ml_album_list_release ( vlc_ml_album_list_t p_list)

◆ vlc_ml_album_release()

void vlc_ml_album_release ( vlc_ml_album_t p_album)

◆ vlc_ml_album_release_inner()

static void vlc_ml_album_release_inner ( vlc_ml_album_t p_album)
static

◆ vlc_ml_artist_list_release()

void vlc_ml_artist_list_release ( vlc_ml_artist_list_t p_list)

◆ vlc_ml_artist_release()

void vlc_ml_artist_release ( vlc_ml_artist_t p_artist)

◆ vlc_ml_artist_release_inner()

static void vlc_ml_artist_release_inner ( vlc_ml_artist_t p_artist)
static

◆ vlc_ml_bookmark_list_release()

void vlc_ml_bookmark_list_release ( vlc_ml_bookmark_list_t list)

◆ vlc_ml_bookmark_release()

void vlc_ml_bookmark_release ( vlc_ml_bookmark_t bookmark)

◆ vlc_ml_bookmark_release_inner()

static void vlc_ml_bookmark_release_inner ( vlc_ml_bookmark_t bookmark)
static

◆ vlc_ml_control()

int vlc_ml_control ( vlc_medialibrary_t p_ml,
int  i_query,
  ... 
)

◆ vlc_ml_event_register_callback()

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.

Returns
A handle to the callback, to be passed to vlc_ml_event_unregister_callback

References vlc_medialibrary_t::cbs, vlc_medialibrary_t::lock, vlc_ml_event_callback_t::node, vlc_ml_event_callback_t::p_data, vlc_ml_event_callback_t::pf_cb, unlikely, vlc_list_append(), vlc_mutex_lock(), and vlc_mutex_unlock().

◆ vlc_ml_event_send()

static void vlc_ml_event_send ( vlc_medialibrary_module_t p_ml,
const vlc_ml_event_t p_event 
)
static

◆ vlc_ml_event_unregister_callback()

void vlc_ml_event_unregister_callback ( vlc_medialibrary_t p_ml,
vlc_ml_event_callback_t p_callback 
)

Unregisters a medialibrary callback.

Parameters
p_handleThe handled returned by vlc_ml_register_callback

References vlc_medialibrary_t::lock, vlc_ml_event_callback_t::node, vlc_list_remove(), vlc_mutex_lock(), and vlc_mutex_unlock().

◆ vlc_ml_event_unregister_from_callback()

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.

Parameters
p_callbackThe handle returned by vlc_ml_register_callback

This must only be called synchronously from the callback function provided to vlc_ml_event_register_callback The p_callback handle must be considered invalid when this function returns

References vlc_medialibrary_t::lock, vlc_ml_event_callback_t::node, vlc_list_remove(), and vlc_mutex_assert.

◆ vlc_ml_file_list_release()

void vlc_ml_file_list_release ( vlc_ml_file_list_t p_list)

◆ vlc_ml_folder_list_release()

void vlc_ml_folder_list_release ( vlc_ml_folder_list_t p_list)

◆ vlc_ml_folder_release()

void vlc_ml_folder_release ( vlc_ml_folder_t p_folder)

◆ vlc_ml_genre_list_release()

void vlc_ml_genre_list_release ( vlc_ml_genre_list_t p_list)

◆ vlc_ml_genre_release()

void vlc_ml_genre_release ( vlc_ml_genre_t p_genre)

◆ vlc_ml_get()

void* vlc_ml_get ( vlc_medialibrary_t p_ml,
int  i_query,
  ... 
)

◆ vlc_ml_group_list_release()

void vlc_ml_group_list_release ( vlc_ml_group_list_t p_list)

◆ vlc_ml_group_release()

void vlc_ml_group_release ( vlc_ml_group_t p_group)

◆ vlc_ml_group_release_inner()

static void vlc_ml_group_release_inner ( vlc_ml_group_t p_group)
static

◆ vlc_ml_instance_get()

vlc_medialibrary_t* vlc_ml_instance_get ( vlc_object_t p_obj)

◆ vlc_ml_label_list_release()

void vlc_ml_label_list_release ( vlc_ml_label_list_t p_list)

◆ vlc_ml_list()

int vlc_ml_list ( vlc_medialibrary_t p_ml,
int  i_query,
const vlc_ml_query_params_t p_params,
  ... 
)

References vlc_medialibrary_t::m, and vlc_medialibrary_module_t::pf_list.

Referenced by vlc_ml_count_album_artists(), vlc_ml_count_album_tracks(), vlc_ml_count_albums(), vlc_ml_count_albums_of(), vlc_ml_count_artist_albums(), vlc_ml_count_artist_tracks(), vlc_ml_count_artists(), vlc_ml_count_artists_of(), vlc_ml_count_audio_media(), vlc_ml_count_banned_entry_points(), vlc_ml_count_entry_points(), vlc_ml_count_genre_albums(), vlc_ml_count_genre_artists(), vlc_ml_count_genre_tracks(), vlc_ml_count_genres(), vlc_ml_count_group_media(), vlc_ml_count_groups(), vlc_ml_count_history(), vlc_ml_count_history_by_type(), vlc_ml_count_media_labels(), vlc_ml_count_media_of(), vlc_ml_count_playlist_media(), vlc_ml_count_playlists(), vlc_ml_count_show_episodes(), vlc_ml_count_shows(), vlc_ml_count_stream_history(), vlc_ml_count_video_media(), vlc_ml_list_album_artists(), vlc_ml_list_album_tracks(), vlc_ml_list_albums(), vlc_ml_list_albums_of(), vlc_ml_list_artist_albums(), vlc_ml_list_artist_of(), vlc_ml_list_artist_tracks(), vlc_ml_list_artists(), vlc_ml_list_audio_media(), vlc_ml_list_banned_entry_points(), vlc_ml_list_entry_points(), vlc_ml_list_genre_albums(), vlc_ml_list_genre_artists(), vlc_ml_list_genre_tracks(), vlc_ml_list_genres(), vlc_ml_list_group_media(), vlc_ml_list_groups(), vlc_ml_list_history(), vlc_ml_list_history_by_type(), vlc_ml_list_media_bookmarks(), vlc_ml_list_media_labels(), vlc_ml_list_media_of(), vlc_ml_list_playlist_media(), vlc_ml_list_playlists(), vlc_ml_list_show_episodes(), vlc_ml_list_shows(), vlc_ml_list_stream_history(), and vlc_ml_list_video_media().

◆ vlc_ml_media_list_release()

void vlc_ml_media_list_release ( vlc_ml_media_list_t p_list)

◆ vlc_ml_media_release()

void vlc_ml_media_release ( vlc_ml_media_t p_media)

◆ vlc_ml_media_release_inner()

static void vlc_ml_media_release_inner ( vlc_ml_media_t p_media)
static

◆ vlc_ml_media_release_tracks_inner()

static void vlc_ml_media_release_tracks_inner ( vlc_ml_media_track_list_t p_tracks)
static

◆ vlc_ml_playback_states_all_release()

void vlc_ml_playback_states_all_release ( vlc_ml_playback_states_all prefs)

◆ vlc_ml_playlist_list_release()

void vlc_ml_playlist_list_release ( vlc_ml_playlist_list_t p_list)

◆ vlc_ml_playlist_release()

void vlc_ml_playlist_release ( vlc_ml_playlist_t p_playlist)

◆ vlc_ml_playlist_release_inner()

static void vlc_ml_playlist_release_inner ( vlc_ml_playlist_t p_playlist)
static

◆ vlc_ml_show_list_release()

void vlc_ml_show_list_release ( vlc_ml_show_list_t p_list)

◆ vlc_ml_show_release()

void vlc_ml_show_release ( vlc_ml_show_t p_show)

◆ vlc_ml_show_release_inner()

static void vlc_ml_show_release_inner ( vlc_ml_show_t p_show)
static

◆ vlc_ml_thumbnails_release()

static void vlc_ml_thumbnails_release ( vlc_ml_thumbnail_t p_thumbnails)
static

Variable Documentation

◆ callbacks

const vlc_medialibrary_callbacks_t callbacks
static
Initial value:
= {
.pf_send_event = &vlc_ml_event_send
}
static void vlc_ml_event_send(vlc_medialibrary_module_t *p_ml, const vlc_ml_event_t *p_event)
Definition: medialibrary.c:54

Referenced by libvlc_MlCreate().