
Data Structures | |
| struct | playlist_fetcher_t |
Functions | |
| static void * | Thread (void *) |
| playlist_fetcher_t * | playlist_fetcher_New (playlist_t *p_playlist) |
| This function creates the fetcher object and thread. | |
| void | playlist_fetcher_Push (playlist_fetcher_t *p_fetcher, input_item_t *p_item) |
| This function enqueues the provided item to be art fetched. | |
| void | playlist_fetcher_Delete (playlist_fetcher_t *p_fetcher) |
| This function destroys the fetcher object and thread. | |
| static int | FindArt (playlist_fetcher_t *p_fetcher, input_item_t *p_item) |
| This function locates the art associated to an input item. | |
| static int | DownloadArt (playlist_fetcher_t *p_fetcher, input_item_t *p_item) |
| Download the art using the URL or an art downloaded This function should be called only if data is not already in cache. | |
| static void | FetchMeta (playlist_fetcher_t *p_fetcher, input_item_t *p_item) |
| FetchMeta, run the "meta fetcher". | |
| static int | InputEvent (vlc_object_t *p_this, char const *psz_cmd, vlc_value_t oldval, vlc_value_t newval, void *p_data) |
| static void | WaitPreparsed (playlist_fetcher_t *p_fetcher, input_item_t *p_item) |
| static int DownloadArt | ( | playlist_fetcher_t * | p_fetcher, | |
| input_item_t * | p_item | |||
| ) | [static] |
Download the art using the URL or an art downloaded This function should be called only if data is not already in cache.
References input_item_GetArtURL, msg_Dbg, msg_Warn, playlist_fetcher_t::p_playlist, playlist_SaveArt(), realloc_or_free(), stream_Delete(), stream_Read(), and stream_UrlNew.
Referenced by Thread().
| static void FetchMeta | ( | playlist_fetcher_t * | p_fetcher, | |
| input_item_t * | p_item | |||
| ) | [static] |
FetchMeta, run the "meta fetcher".
They are going to do network connections, and gather information upon the playing media. (even artwork).
References module_need, module_unneed, demux_meta_t::p_demux, demux_meta_t::p_item, playlist_fetcher_t::p_playlist, vlc_custom_create, and vlc_object_release.
Referenced by Thread().
| static int FindArt | ( | playlist_fetcher_t * | p_fetcher, | |
| input_item_t * | p_item | |||
| ) | [static] |
This function locates the art associated to an input item.
Return codes: 0 : Art is in cache or is a local file 1 : Art found, need to download -X : Error/not found
References playlist_fetcher_t::albums, ARRAY_APPEND, playlist_album_t::b_found, FOREACH_ARRAY, FOREACH_END, input_item_GetAlbum(), input_item_GetArtist(), input_item_GetArtURL, input_item_GetName(), input_item_GetTitle(), input_item_SetArtURL, module_need, module_unneed, msg_Dbg, art_finder_t::p_item, playlist_fetcher_t::p_playlist, playlist_FindArtInCache(), playlist_album_t::psz_album, playlist_album_t::psz_artist, playlist_album_t::psz_arturl, vlc_custom_create, VLC_EGENERIC, VLC_OBJECT, and vlc_object_release.
Referenced by Thread().
| static int InputEvent | ( | vlc_object_t * | p_this, | |
| char const * | psz_cmd, | |||
| vlc_value_t | oldval, | |||
| vlc_value_t | newval, | |||
| void * | p_data | |||
| ) | [static] |
References vlc_value_t::i_int, INPUT_EVENT_DEAD, INPUT_EVENT_ITEM_META, vlc_cond_signal(), and VLC_UNUSED.
Referenced by WaitPreparsed().
| 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::b_live, playlist_fetcher_t::i_waiting, playlist_fetcher_t::lock, playlist_fetcher_t::pp_waiting, REMOVE_ELEM, vlc_cond_destroy(), vlc_cond_wait(), vlc_gc_decref, vlc_mutex_destroy(), vlc_mutex_lock(), vlc_mutex_unlock(), and playlist_fetcher_t::wait.
Referenced by playlist_Destroy().
| playlist_fetcher_t* playlist_fetcher_New | ( | playlist_t * | p_playlist | ) |
This function creates the fetcher object and thread.
References playlist_fetcher_t::albums, ARRAY_INIT, playlist_fetcher_t::b_live, playlist_fetcher_t::i_art_policy, playlist_fetcher_t::i_waiting, playlist_fetcher_t::lock, playlist_fetcher_t::p_playlist, playlist_fetcher_t::pp_waiting, var_GetInteger, vlc_cond_init(), vlc_mutex_init(), and playlist_fetcher_t::wait.
Referenced by playlist_Create().
| void playlist_fetcher_Push | ( | playlist_fetcher_t * | , | |
| input_item_t * | ||||
| ) |
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 playlist_fetcher_t::b_live, playlist_fetcher_t::i_waiting, INSERT_ELEM, playlist_fetcher_t::lock, msg_Err, playlist_fetcher_t::p_playlist, playlist_fetcher_t::pp_waiting, Thread(), vlc_clone_detach(), vlc_gc_incref, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_THREAD_PRIORITY_LOW.
Referenced by Art(), and playlist_AskForArtEnqueue().
| static void * Thread | ( | void * | p_data | ) | [static] |
References playlist_fetcher_t::b_live, DownloadArt(), FetchMeta(), FindArt(), playlist_fetcher_t::i_waiting, input_item_GetName(), input_item_SetArtFetched(), input_item_SetArtNotFound(), playlist_fetcher_t::lock, playlist_fetcher_t::p_playlist, PL_DEBUG, playlist_fetcher_t::pp_waiting, psz_name, REMOVE_ELEM, var_SetAddress, vlc_cond_signal(), vlc_gc_decref, vlc_mutex_lock(), vlc_mutex_unlock(), playlist_fetcher_t::wait, and WaitPreparsed().
Referenced by playlist_fetcher_Push().
| static void WaitPreparsed | ( | playlist_fetcher_t * | p_fetcher, | |
| input_item_t * | p_item | |||
| ) | [static] |
References input_thread_t::b_eof, input_thread_t::b_error, input_GetItem(), input_item_IsPreparsed(), InputEvent(), playlist_fetcher_t::lock, mdate(), playlist_fetcher_t::p_playlist, playlist_CurrentInput(), var_AddCallback, var_DelCallback, vlc_cond_destroy(), vlc_cond_init(), vlc_cond_timedwait(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_object_release.
Referenced by Thread().
1.7.1