VLC  3.0.15
Typedefs | Functions
preparser.h File Reference
Include dependency graph for preparser.h:

Go to the source code of this file.

Typedefs

typedef struct playlist_preparser_t playlist_preparser_t
 Preparser opaque structure. More...
 

Functions

playlist_preparser_tplaylist_preparser_New (vlc_object_t *)
 This function creates the preparser object and thread. More...
 
void playlist_preparser_Push (playlist_preparser_t *, input_item_t *, input_item_meta_request_option_t, int timeout, void *id)
 This function enqueues the provided item to be preparsed. More...
 
void playlist_preparser_fetcher_Push (playlist_preparser_t *, input_item_t *, input_item_meta_request_option_t)
 
void playlist_preparser_Cancel (playlist_preparser_t *, void *id)
 This function cancel all preparsing requests for a given id. More...
 
void playlist_preparser_Delete (playlist_preparser_t *)
 This function destroys the preparser object and thread. More...
 
void playlist_preparser_Deactivate (playlist_preparser_t *)
 This function deactivates the preparser. More...
 

Typedef Documentation

◆ playlist_preparser_t

Preparser opaque structure.

The preparser object will retrieve the meta data of any given input item in an asynchronous way. It will also issue art fetching requests.

Function Documentation

◆ playlist_preparser_Cancel()

void playlist_preparser_Cancel ( playlist_preparser_t ,
void *  id 
)

This function cancel all preparsing requests for a given id.

Parameters
idunique id given to playlist_preparser_Push()

References background_worker_Cancel(), and playlist_preparser_t::worker.

Referenced by libvlc_MetadataCancel().

◆ playlist_preparser_Deactivate()

void playlist_preparser_Deactivate ( playlist_preparser_t )

This function deactivates the preparser.

All pending requests will be removed, and it will block until the currently running entity has finished (if any).

References background_worker_Cancel(), playlist_preparser_t::deactivated, and playlist_preparser_t::worker.

Referenced by libvlc_InternalCleanup().

◆ playlist_preparser_Delete()

void playlist_preparser_Delete ( playlist_preparser_t )

This function destroys the preparser object and thread.

All pending input items will be released.

References background_worker_Delete(), playlist_preparser_t::fetcher, playlist_fetcher_Delete(), and playlist_preparser_t::worker.

Referenced by libvlc_InternalCleanup().

◆ playlist_preparser_fetcher_Push()

void playlist_preparser_fetcher_Push ( playlist_preparser_t ,
input_item_t ,
input_item_meta_request_option_t   
)

◆ playlist_preparser_New()

playlist_preparser_t* playlist_preparser_New ( vlc_object_t )

◆ playlist_preparser_Push()

void playlist_preparser_Push ( playlist_preparser_t ,
input_item_t ,
input_item_meta_request_option_t  ,
int  timeout,
void *  id 
)

This function enqueues the provided item to be preparsed.

The input item is retained until the preparsing is done or until the preparser object is deleted. Listen to vlc_InputItemPreparseEnded event to get notified when item is preparsed.

Parameters
timeoutmaximum time allowed to preparse the item. If -1, the default "preparse-timeout" option will be used as a timeout. If 0, it will wait indefinitely. If > 0, the timeout will be used (in milliseconds).
idunique id provided by the caller. This is can be used to cancel the request with playlist_preparser_Cancel()

References input_item_t::b_net, background_worker_Push(), playlist_preparser_t::deactivated, input_item_t::i_type, i_type, input_item_SignalPreparseEnded(), ITEM_PREPARSE_FAILED, ITEM_PREPARSE_SKIPPED, ITEM_TYPE_DIRECTORY, ITEM_TYPE_FILE, ITEM_TYPE_NODE, ITEM_TYPE_PLAYLIST, input_item_t::lock, META_REQUEST_OPTION_SCOPE_NETWORK, vlc_mutex_lock(), vlc_mutex_unlock(), and playlist_preparser_t::worker.

Referenced by libvlc_MetadataRequest().