VLC 4.0.0-dev
|
Data Structures | |
struct | input_fetcher_t |
struct | task |
Functions | |
static void | RunDownloader (void *) |
static void | RunSearchLocal (void *) |
static void | RunSearchNetwork (void *) |
static struct task * | TaskNew (input_fetcher_t *fetcher, vlc_executor_t *executor, input_item_t *item, input_item_meta_request_option_t options, const input_fetcher_callbacks_t *cbs, void *userdata) |
static void | TaskDelete (struct task *task) |
static void | FetcherAddTask (input_fetcher_t *fetcher, struct task *task) |
static void | FetcherRemoveTask (input_fetcher_t *fetcher, struct task *task) |
static int | Submit (input_fetcher_t *fetcher, vlc_executor_t *executor, input_item_t *item, input_item_meta_request_option_t options, const input_fetcher_callbacks_t *cbs, void *userdata) |
static char * | CreateCacheKey (input_item_t *item) |
static void | FreeCacheEntry (void *data, void *obj) |
static int | ReadAlbumCache (input_fetcher_t *fetcher, input_item_t *item) |
static void | AddAlbumCache (input_fetcher_t *fetcher, input_item_t *item, bool overwrite) |
static int | InvokeModule (input_fetcher_t *fetcher, input_item_t *item, int scope, char const *type) |
static int | CheckMeta (input_item_t *item) |
static int | CheckArt (input_item_t *item) |
static int | SearchArt (input_fetcher_t *fetcher, input_item_t *item, int scope) |
static int | SearchByScope (struct task *task, int scope) |
static void | NotifyArtFetchEnded (struct task *task, bool fetched) |
input_fetcher_t * | input_fetcher_New (vlc_object_t *owner) |
This function creates the fetcher object and thread. More... | |
int | input_fetcher_Push (input_fetcher_t *fetcher, input_item_t *item, input_item_meta_request_option_t options, const input_fetcher_callbacks_t *cbs, void *cbs_userdata) |
This function enqueues the provided item to be art fetched. More... | |
static void | CancelAllTasks (input_fetcher_t *fetcher) |
void | input_fetcher_Delete (input_fetcher_t *fetcher) |
This function destroys the fetcher object and thread. More... | |
|
static |
References input_fetcher_t::album_cache, CreateCacheKey(), task::fetcher, input_item_GetArtURL, task::item, input_fetcher_t::lock, vlc_dictionary_has_key(), vlc_dictionary_insert(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by RunDownloader(), and SearchByScope().
|
static |
References task::executor, task::fetcher, input_fetcher_t::lock, task::node, NotifyArtFetchEnded(), task::runnable, input_fetcher_t::submitted_tasks, TaskDelete(), vlc_executor_Cancel(), vlc_list_foreach, vlc_list_remove(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_fetcher_Delete().
|
static |
References task::item, input_item_t::lock, input_item_t::p_meta, vlc_meta_ArtworkURL, vlc_meta_Get(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by SearchArt(), and SearchByScope().
|
static |
References task::item, input_item_t::lock, input_item_t::p_meta, vlc_meta_Album, vlc_meta_Artist, vlc_meta_Get(), vlc_meta_Title, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by SearchByScope().
|
static |
Simple concatenation of artist and album can lead to the same key for entities that should not have such. Imagine { dogs, tick } and { dog, stick }
References asprintf(), task::item, input_item_t::lock, input_item_t::p_meta, vlc_meta_Album, vlc_meta_Artist, vlc_meta_Date, vlc_meta_Get(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by AddAlbumCache(), and ReadAlbumCache().
|
static |
References task::fetcher, input_fetcher_t::lock, task::node, input_fetcher_t::submitted_tasks, vlc_list_append(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by Submit().
|
static |
References task::fetcher, input_fetcher_t::lock, task::node, vlc_list_remove(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by RunDownloader(), RunSearchLocal(), and RunSearchNetwork().
|
static |
References VLC_UNUSED.
Referenced by input_fetcher_Delete().
void input_fetcher_Delete | ( | input_fetcher_t * | fetcher | ) |
This function destroys the fetcher object and thread.
All pending input items will be released.
References input_fetcher_t::album_cache, CancelAllTasks(), input_fetcher_t::executor_downloader, input_fetcher_t::executor_local, input_fetcher_t::executor_network, task::fetcher, FreeCacheEntry(), vlc_dictionary_clear(), and vlc_executor_Delete().
Referenced by vlc_preparser_Delete().
input_fetcher_t * input_fetcher_New | ( | vlc_object_t * | owner | ) |
This function creates the fetcher object and thread.
References input_fetcher_t::album_cache, input_fetcher_t::executor_downloader, input_fetcher_t::executor_local, input_fetcher_t::executor_network, task::fetcher, input_fetcher_t::lock, input_fetcher_t::owner, input_fetcher_t::submitted_tasks, unlikely, var_InheritInteger(), vlc_dictionary_init(), vlc_executor_Delete(), vlc_executor_New(), vlc_list_init(), and vlc_mutex_init().
Referenced by vlc_preparser_New().
int input_fetcher_Push | ( | input_fetcher_t * | fetcher, |
input_item_t * | item, | ||
input_item_meta_request_option_t | options, | ||
const input_fetcher_callbacks_t * | cbs, | ||
void * | cbs_userdata | ||
) |
This function enqueues the provided item to be art fetched.
The input item is retained until the art fetching is done or until the fetcher object is destroyed.
References task::cbs, task::executor, input_fetcher_t::executor_local, input_fetcher_t::executor_network, task::fetcher, task::item, META_REQUEST_OPTION_FETCH_ANY, META_REQUEST_OPTION_FETCH_LOCAL, task::options, and Submit().
Referenced by Fetch().
|
static |
References meta_fetcher_t::e_scope, task::fetcher, task::item, module_need, module_unneed, input_fetcher_t::owner, meta_fetcher_t::p_item, unlikely, vlc_custom_create, VLC_ENOMEM, vlc_object_delete, and VLC_SUCCESS.
Referenced by SearchArt(), and SearchByScope().
|
static |
References task::cbs, task::item, input_fetcher_callbacks_t::on_art_fetch_ended, and task::userdata.
Referenced by CancelAllTasks(), RunDownloader(), RunSearchLocal(), and RunSearchNetwork().
|
static |
References input_fetcher_t::album_cache, CreateCacheKey(), task::fetcher, input_item_SetArtURL, task::item, input_fetcher_t::lock, vlc_dictionary_value_for_key(), VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by RunDownloader(), and SearchByScope().
|
static |
References AddAlbumCache(), vlc_memstream::error, task::fetcher, FetcherRemoveTask(), FREENULL, input_item_GetArtURL, input_item_SetArtFetched(), input_SaveArt(), task::interrupt, task::item, vlc_memstream::length, NotifyArtFetchEnded(), input_fetcher_t::owner, vlc_memstream::ptr, ReadAlbumCache(), TaskDelete(), task::userdata, var_SetAddress(), vlc_interrupt_set(), vlc_killed(), vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_write(), vlc_stream_Delete(), vlc_stream_NewURL, vlc_stream_Read(), and vlc_thread_set_name().
Referenced by TaskNew().
|
static |
References task::cbs, input_fetcher_t::executor_network, task::fetcher, FETCHER_SCOPE_LOCAL, FetcherRemoveTask(), input_item_SetArtNotFound(), task::interrupt, task::item, META_REQUEST_OPTION_FETCH_NETWORK, NotifyArtFetchEnded(), task::options, input_fetcher_t::owner, SearchByScope(), Submit(), TaskDelete(), task::userdata, var_InheritBool(), vlc_interrupt_set(), VLC_SUCCESS, and vlc_thread_set_name().
Referenced by TaskNew().
|
static |
|
static |
References CheckArt(), task::fetcher, InvokeModule(), and task::item.
Referenced by SearchByScope().
|
static |
References AddAlbumCache(), task::cbs, CheckArt(), CheckMeta(), input_fetcher_t::executor_downloader, task::fetcher, input_FindArtInCache(), input_FindArtInCacheUsingItemUID(), InvokeModule(), task::item, task::options, ReadAlbumCache(), SearchArt(), Submit(), task::userdata, VLC_EGENERIC, and VLC_SUCCESS.
Referenced by RunSearchLocal(), and RunSearchNetwork().
|
static |
References task::cbs, task::executor, task::fetcher, FetcherAddTask(), task::item, task::options, task::runnable, TaskNew(), task::userdata, VLC_ENOMEM, vlc_executor_Submit(), and VLC_SUCCESS.
Referenced by input_fetcher_Push(), RunSearchLocal(), and SearchByScope().
|
static |
References input_item_Release(), task::interrupt, task::item, and vlc_interrupt_deinit().
Referenced by CancelAllTasks(), RunDownloader(), RunSearchLocal(), and RunSearchNetwork().
|
static |
References task::cbs, task::executor, input_fetcher_t::executor_downloader, input_fetcher_t::executor_local, input_fetcher_t::executor_network, task::fetcher, input_item_Hold(), task::interrupt, task::item, task::options, vlc_runnable::run, RunDownloader(), task::runnable, RunSearchLocal(), RunSearchNetwork(), vlc_runnable::userdata, task::userdata, and vlc_interrupt_init().
Referenced by Submit().