VLC
4.0.0-dev
|
Data Structures | |
struct | input_fetcher_t |
struct | fetcher_request |
struct | fetcher_thread |
Macros | |
#define | DEF_STARTER(name, worker) |
Functions | |
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 (input_fetcher_t *fetcher, struct fetcher_request *req, int scope) |
static void | NotifyArtFetchEnded (struct fetcher_request *req, bool fetched) |
static void | Downloader (input_fetcher_t *fetcher, struct fetcher_request *req) |
static void | SearchLocal (input_fetcher_t *fetcher, struct fetcher_request *req) |
static void | SearchNetwork (input_fetcher_t *fetcher, struct fetcher_request *req) |
static void | RequestRelease (void *req_) |
static void | RequestHold (void *req_) |
static void * | FetcherThread (void *handle) |
static int | StartWorker (input_fetcher_t *fetcher, void(*pf_worker)(input_fetcher_t *, struct fetcher_request *), struct background_worker *bg, struct fetcher_request *req, void **handle) |
static int | ProbeWorker (void *fetcher_, void *th_) |
static void | CloseWorker (void *fetcher_, void *th_) |
static int | StartSearchLocal (void *fetcher_, void *req_, void **out) |
static int | StartSearchNetwork (void *fetcher_, void *req_, void **out) |
static int | StartDownloader (void *fetcher_, void *req_, void **out) |
static void | WorkerInit (input_fetcher_t *fetcher, struct background_worker **worker, int(*starter)(void *, void *, void **)) |
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... | |
void | input_fetcher_Delete (input_fetcher_t *fetcher) |
This function destroys the fetcher object and thread. More... | |
#define DEF_STARTER | ( | name, | |
worker | |||
) |
|
static |
References input_fetcher_t::album_cache, CreateCacheKey(), input_item_GetArtURL, input_fetcher_t::lock, vlc_dictionary_has_key(), vlc_dictionary_insert(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by Downloader(), and SearchByScope().
|
static |
References 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 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 |
References fetcher_thread::interrupt, fetcher_thread::thread, vlc_interrupt_deinit(), vlc_interrupt_kill(), vlc_join(), and VLC_UNUSED.
Referenced by WorkerInit().
|
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(), 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 AddAlbumCache(), vlc_memstream::error, FREENULL, input_item_GetArtURL, input_item_SetArtFetched(), input_SaveArt(), fetcher_request::item, vlc_memstream::length, NotifyArtFetchEnded(), input_fetcher_t::owner, vlc_memstream::ptr, ReadAlbumCache(), var_SetAddress(), vlc_killed(), vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_write(), vlc_stream_Delete(), vlc_stream_NewURL, and vlc_stream_Read().
|
static |
|
static |
References VLC_UNUSED.
Referenced by input_fetcher_Delete().
void input_fetcher_Delete | ( | input_fetcher_t * | ) |
This function destroys the fetcher object and thread.
All pending input items will be released.
References input_fetcher_t::album_cache, background_worker_Delete(), input_fetcher_t::downloader, FreeCacheEntry(), input_fetcher_t::local, input_fetcher_t::network, and vlc_dictionary_clear().
Referenced by input_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, background_worker_Delete(), input_fetcher_t::downloader, input_fetcher_t::local, input_fetcher_t::lock, input_fetcher_t::network, input_fetcher_t::owner, StartDownloader(), StartSearchLocal(), StartSearchNetwork(), unlikely, vlc_dictionary_init(), vlc_mutex_init(), and WorkerInit().
Referenced by input_preparser_New().
int input_fetcher_Push | ( | input_fetcher_t * | , |
input_item_t * | , | ||
input_item_meta_request_option_t | , | ||
const input_fetcher_callbacks_t * | , | ||
void * | |||
) |
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 background_worker_Push(), fetcher_request::cbs, input_item_Hold(), fetcher_request::item, input_fetcher_t::local, META_REQUEST_OPTION_FETCH_ANY, META_REQUEST_OPTION_FETCH_LOCAL, input_fetcher_t::network, NotifyArtFetchEnded(), fetcher_request::options, fetcher_request::rc, RequestRelease(), unlikely, fetcher_request::userdata, vlc_atomic_rc_init(), VLC_ENOMEM, and VLC_SUCCESS.
Referenced by input_preparser_fetcher_Push(), and PreparserCloseInput().
|
static |
References meta_fetcher_t::e_scope, fetcher_request::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 fetcher_request::cbs, fetcher_request::item, input_fetcher_callbacks_t::on_art_fetch_ended, and fetcher_request::userdata.
Referenced by Downloader(), input_fetcher_Push(), SearchLocal(), and SearchNetwork().
|
static |
References fetcher_thread::active, and VLC_UNUSED.
Referenced by WorkerInit().
|
static |
References input_fetcher_t::album_cache, CreateCacheKey(), input_item_SetArtURL, input_fetcher_t::lock, vlc_dictionary_value_for_key(), VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by Downloader(), and SearchByScope().
|
static |
References fetcher_request::rc, and vlc_atomic_rc_inc().
Referenced by WorkerInit().
|
static |
References input_item_Release(), fetcher_request::item, fetcher_request::rc, and vlc_atomic_rc_dec().
Referenced by input_fetcher_Push(), and WorkerInit().
|
static |
References CheckArt(), and InvokeModule().
Referenced by SearchByScope().
|
static |
References AddAlbumCache(), background_worker_Push(), CheckArt(), CheckMeta(), input_fetcher_t::downloader, input_FindArtInCache(), input_FindArtInCacheUsingItemUID(), InvokeModule(), fetcher_request::item, ReadAlbumCache(), SearchArt(), VLC_EGENERIC, and VLC_SUCCESS.
Referenced by SearchLocal(), and SearchNetwork().
|
static |
|
static |
|
static |
Referenced by input_fetcher_New().
|
static |
Referenced by input_fetcher_New().
|
static |
Referenced by input_fetcher_New().
|
static |
References fetcher_thread::active, fetcher_thread::fetcher, FetcherThread(), fetcher_thread::interrupt, fetcher_thread::pf_worker, fetcher_thread::req, fetcher_thread::thread, unlikely, vlc_clone(), VLC_EGENERIC, VLC_ENOMEM, vlc_interrupt_deinit(), vlc_interrupt_init(), VLC_SUCCESS, VLC_THREAD_PRIORITY_LOW, and fetcher_thread::worker.
|
static |
References background_worker_New(), CloseWorker(), background_worker_config::default_timeout, ProbeWorker(), RequestHold(), RequestRelease(), and var_InheritInteger().
Referenced by input_fetcher_New().