VLC
3.0.21
|
Data Structures | |
struct | playlist_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 (playlist_fetcher_t *fetcher, input_item_t *item) |
static void | AddAlbumCache (playlist_fetcher_t *fetcher, input_item_t *item, bool overwrite) |
static int | InvokeModule (playlist_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 (playlist_fetcher_t *fetcher, input_item_t *item, int scope) |
static int | SearchByScope (playlist_fetcher_t *fetcher, struct fetcher_request *req, int scope) |
static void | SetPreparsed (struct fetcher_request *req) |
static void | Downloader (playlist_fetcher_t *fetcher, struct fetcher_request *req) |
static void | SearchLocal (playlist_fetcher_t *fetcher, struct fetcher_request *req) |
static void | SearchNetwork (playlist_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 (playlist_fetcher_t *fetcher, void(*pf_worker)(playlist_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 (playlist_fetcher_t *fetcher, struct background_worker **worker, int(*starter)(void *, void *, void **)) |
playlist_fetcher_t * | playlist_fetcher_New (vlc_object_t *owner) |
This function creates the fetcher object and thread. More... | |
int | playlist_fetcher_Push (playlist_fetcher_t *fetcher, input_item_t *item, input_item_meta_request_option_t options, int preparse_status) |
This function enqueues the provided item to be art fetched. More... | |
void | playlist_fetcher_Delete (playlist_fetcher_t *fetcher) |
This function destroys the fetcher object and thread. More... | |
#define DEF_STARTER | ( | name, | |
worker | |||
) |
|
static |
|
static |
References fetcher_request::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 fetcher_request::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 |
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(), fetcher_request::item, input_item_t::lock, input_item_t::p_meta, vlc_meta_Album, vlc_meta_Artist, 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(), fetcher_request::item, vlc_memstream::length, playlist_fetcher_t::owner, playlist_SaveArt(), vlc_memstream::ptr, ReadAlbumCache(), SetPreparsed(), 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 playlist_fetcher_Delete().
|
static |
< Not enough memory
< No error
References meta_fetcher_t::e_scope, fetcher_request::item, module_need, module_unneed, playlist_fetcher_t::owner, meta_fetcher_t::p_item, unlikely, vlc_custom_create, VLC_ENOMEM, vlc_object_release, and VLC_SUCCESS.
Referenced by SearchArt(), and SearchByScope().
void playlist_fetcher_Delete | ( | playlist_fetcher_t * | ) |
This function destroys the fetcher object and thread.
All pending input items will be released.
References playlist_fetcher_t::album_cache, background_worker_Delete(), playlist_fetcher_t::downloader, FreeCacheEntry(), playlist_fetcher_t::local, playlist_fetcher_t::lock, playlist_fetcher_t::network, vlc_dictionary_clear(), and vlc_mutex_destroy().
Referenced by playlist_preparser_Delete().
playlist_fetcher_t* playlist_fetcher_New | ( | vlc_object_t * | owner | ) |
This function creates the fetcher object and thread.
References playlist_fetcher_t::album_cache, background_worker_Delete(), playlist_fetcher_t::downloader, playlist_fetcher_t::local, playlist_fetcher_t::lock, playlist_fetcher_t::network, playlist_fetcher_t::owner, StartDownloader(), StartSearchLocal(), StartSearchNetwork(), unlikely, vlc_dictionary_init(), vlc_mutex_init(), and WorkerInit().
Referenced by playlist_preparser_New().
int playlist_fetcher_Push | ( | playlist_fetcher_t * | , |
input_item_t * | , | ||
input_item_meta_request_option_t | , | ||
int | |||
) |
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.
< Not enough memory
< No error
References background_worker_Push(), input_item_Hold(), fetcher_request::item, playlist_fetcher_t::local, fetcher_request::options, fetcher_request::preparse_status, fetcher_request::refs, RequestRelease(), SetPreparsed(), unlikely, VLC_ENOMEM, and VLC_SUCCESS.
Referenced by playlist_preparser_fetcher_Push(), and PreparserCloseInput().
|
static |
References fetcher_thread::active, and VLC_UNUSED.
Referenced by WorkerInit().
|
static |
< Unspecified error
< No error
< Unspecified error
References playlist_fetcher_t::album_cache, CreateCacheKey(), input_item_SetArtURL, fetcher_request::item, playlist_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::refs.
Referenced by WorkerInit().
|
static |
References input_item_Release(), fetcher_request::item, and fetcher_request::refs.
Referenced by playlist_fetcher_Push(), and WorkerInit().
|
static |
References CheckArt(), InvokeModule(), and fetcher_request::item.
Referenced by SearchByScope().
|
static |
< Unspecified error
< No error
< Unspecified error
References AddAlbumCache(), background_worker_Push(), CheckArt(), CheckMeta(), playlist_fetcher_t::downloader, InvokeModule(), fetcher_request::item, playlist_FindArtInCache(), playlist_FindArtInCacheUsingItemUID(), ReadAlbumCache(), SearchArt(), VLC_EGENERIC, and VLC_SUCCESS.
Referenced by SearchLocal(), and SearchNetwork().
|
static |
< No error
References background_worker_Push(), FETCHER_SCOPE_LOCAL, input_item_SetArtNotFound(), fetcher_request::item, META_REQUEST_OPTION_SCOPE_NETWORK, playlist_fetcher_t::network, fetcher_request::options, playlist_fetcher_t::owner, SearchByScope(), SetPreparsed(), var_InheritBool, and VLC_SUCCESS.
|
static |
|
static |
References input_item_SetPreparsed(), input_item_SignalPreparseEnded(), fetcher_request::item, and fetcher_request::preparse_status.
Referenced by Downloader(), playlist_fetcher_Push(), SearchLocal(), and SearchNetwork().
|
static |
Referenced by playlist_fetcher_New().
|
static |
Referenced by playlist_fetcher_New().
|
static |
Referenced by playlist_fetcher_New().
|
static |
< Not enough memory
< No error
< Unspecified error
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(), and RequestRelease().
Referenced by playlist_fetcher_New().