Data Structures | Functions

fetcher.c File Reference

Include dependency graph for fetcher.c:

Data Structures

struct  playlist_fetcher_t

Functions

static void * Thread (void *)
playlist_fetcher_tplaylist_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)

Function Documentation

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]
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 playlist_fetcher_Delete ( playlist_fetcher_t  ) 
playlist_fetcher_t* playlist_fetcher_New ( playlist_t p_playlist  ) 
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]
static void WaitPreparsed ( playlist_fetcher_t p_fetcher,
input_item_t p_item 
) [static]
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines