VLC 4.0.0-dev
|
Data Structures | |
struct | input_preparser_t |
struct | task |
Functions | |
static void | RunnableRun (void *) |
static struct task * | TaskNew (input_preparser_t *preparser, input_item_t *item, input_item_meta_request_option_t options, const input_preparser_callbacks_t *cbs, void *userdata, void *id, vlc_tick_t timeout) |
static void | TaskDelete (struct task *task) |
static void | PreparserAddTask (input_preparser_t *preparser, struct task *task) |
static void | PreparserRemoveTask (input_preparser_t *preparser, struct task *task) |
static void | NotifyPreparseEnded (struct task *task) |
static void | OnParserEnded (input_item_t *item, int status, void *task_) |
static void | OnParserSubtreeAdded (input_item_t *item, input_item_node_t *subtree, void *task_) |
static void | OnArtFetchEnded (input_item_t *item, bool fetched, void *userdata) |
static void | Parse (struct task *task, vlc_tick_t deadline) |
static void | Fetch (struct task *task) |
static void | Interrupt (struct task *task) |
input_preparser_t * | input_preparser_New (vlc_object_t *parent) |
This function creates the preparser object and thread. More... | |
int | input_preparser_Push (input_preparser_t *preparser, input_item_t *item, input_item_meta_request_option_t i_options, const input_preparser_callbacks_t *cbs, void *cbs_userdata, int timeout_ms, void *id) |
This function enqueues the provided item to be preparsed. More... | |
void | input_preparser_fetcher_Push (input_preparser_t *preparser, input_item_t *item, input_item_meta_request_option_t options, const input_fetcher_callbacks_t *cbs, void *cbs_userdata) |
void | input_preparser_Cancel (input_preparser_t *preparser, void *id) |
This function cancel all preparsing requests for a given id. More... | |
void | input_preparser_Deactivate (input_preparser_t *preparser) |
This function deactivates the preparser. More... | |
void | input_preparser_Delete (input_preparser_t *preparser) |
This function destroys the preparser object and thread. More... | |
Variables | |
static const input_fetcher_callbacks_t | input_fetcher_callbacks |
|
static |
References task::fetch_ended, task::fetcher, input_preparser_t::fetcher, input_fetcher_callbacks, input_fetcher_Push(), task::item, META_REQUEST_OPTION_FETCH_ANY, task::options, task::preparser, vlc_sem_wait(), and VLC_SUCCESS.
Referenced by RunnableRun().
void input_preparser_Cancel | ( | input_preparser_t * | preparser, |
void * | id | ||
) |
This function cancel all preparsing requests for a given id.
id | unique id given to input_preparser_Push() |
References input_preparser_t::executor, task::id, Interrupt(), input_preparser_t::lock, task::node, NotifyPreparseEnded(), task::preparser, task::runnable, input_preparser_t::submitted_tasks, TaskDelete(), vlc_executor_Cancel(), vlc_list_foreach, vlc_list_remove(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_preparser_Deactivate(), input_preparser_Delete(), and libvlc_MetadataCancel().
void input_preparser_Deactivate | ( | input_preparser_t * | preparser | ) |
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 input_preparser_t::deactivated, input_preparser_Cancel(), and task::preparser.
Referenced by libvlc_InternalCleanup().
void input_preparser_Delete | ( | input_preparser_t * | preparser | ) |
This function destroys the preparser object and thread.
All pending input items will be released.
References input_preparser_t::executor, input_preparser_t::fetcher, input_fetcher_Delete(), input_preparser_Cancel(), task::preparser, and vlc_executor_Delete().
Referenced by libvlc_InternalCleanup().
void input_preparser_fetcher_Push | ( | input_preparser_t * | preparser, |
input_item_t * | item, | ||
input_item_meta_request_option_t | options, | ||
const input_fetcher_callbacks_t * | cbs, | ||
void * | cbs_userdata | ||
) |
References task::cbs, input_preparser_t::fetcher, input_fetcher_Push(), task::item, task::options, and task::preparser.
Referenced by libvlc_ArtRequest().
input_preparser_t * input_preparser_New | ( | vlc_object_t * | parent | ) |
This function creates the preparser object and thread.
References input_preparser_t::deactivated, input_preparser_t::default_timeout, input_preparser_t::executor, input_preparser_t::fetcher, input_fetcher_New(), input_preparser_t::lock, msg_Warn, input_preparser_t::owner, task::preparser, input_preparser_t::submitted_tasks, unlikely, var_InheritInteger(), vlc_executor_New(), vlc_list_init(), vlc_mutex_init(), and VLC_TICK_FROM_MS.
Referenced by libvlc_InternalInit().
int input_preparser_Push | ( | input_preparser_t * | preparser, |
input_item_t * | item, | ||
input_item_meta_request_option_t | i_options, | ||
const input_preparser_callbacks_t * | cbs, | ||
void * | cbs_userdata, | ||
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.
timeout | maximum 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). |
id | unique id provided by the caller. This is can be used to cancel the request with input_preparser_Cancel() |
References input_item_t::b_net, input_item_t::b_preparse_interact, task::cbs, input_preparser_t::deactivated, input_preparser_t::default_timeout, input_preparser_t::executor, input_item_t::i_type, i_type, task::item, ITEM_PREPARSE_SKIPPED, ITEM_TYPE_DIRECTORY, ITEM_TYPE_FILE, ITEM_TYPE_NODE, ITEM_TYPE_PLAYLIST, input_item_t::lock, META_REQUEST_OPTION_DO_INTERACT, META_REQUEST_OPTION_NO_SKIP, META_REQUEST_OPTION_SCOPE_NETWORK, task::preparser, PreparserAddTask(), task::runnable, TaskNew(), task::timeout, VLC_EGENERIC, VLC_ENOMEM, vlc_executor_Submit(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, and VLC_TICK_FROM_MS.
Referenced by vlc_MetadataRequest().
|
static |
References task::interrupted, ITEM_PREPARSE_TIMEOUT, task::preparse_ended, task::preparse_status, and vlc_sem_post().
Referenced by input_preparser_Cancel().
|
static |
References task::cbs, task::item, task::preparse_status, and task::userdata.
Referenced by input_preparser_Cancel(), and RunnableRun().
|
static |
References task::fetch_ended, task::item, task::userdata, vlc_sem_post(), and VLC_UNUSED.
|
static |
References task::interrupted, task::item, ITEM_PREPARSE_DONE, ITEM_PREPARSE_FAILED, task::preparse_ended, task::preparse_status, vlc_sem_post(), VLC_SUCCESS, and VLC_UNUSED.
Referenced by Parse().
|
static |
References task::cbs, task::item, task::userdata, and VLC_UNUSED.
Referenced by Parse().
|
static |
References task::cbs, input_item_Parse(), input_item_parser_id_Release(), task::interrupted, task::item, ITEM_PREPARSE_FAILED, ITEM_PREPARSE_TIMEOUT, OnParserEnded(), OnParserSubtreeAdded(), input_preparser_t::owner, task::parser, task::preparse_ended, task::preparse_status, task::preparser, vlc_sem_timedwait(), vlc_sem_wait(), and VLC_TICK_INVALID.
Referenced by RunnableRun().
|
static |
References input_preparser_t::lock, task::node, task::preparser, input_preparser_t::submitted_tasks, vlc_list_append(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by input_preparser_Push().
|
static |
References input_preparser_t::lock, task::node, task::preparser, vlc_list_remove(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by RunnableRun().
|
static |
References Fetch(), input_item_SetPreparsed(), task::interrupted, task::item, NotifyPreparseEnded(), Parse(), task::preparser, PreparserRemoveTask(), TaskDelete(), task::timeout, task::userdata, vlc_thread_set_name(), VLC_TICK_INVALID, and vlc_tick_now().
Referenced by TaskNew().
|
static |
References input_item_Release(), and task::item.
Referenced by input_preparser_Cancel(), and RunnableRun().
|
static |
References task::cbs, task::fetch_ended, task::id, input_item_Hold(), task::interrupted, task::item, ITEM_PREPARSE_SKIPPED, task::options, task::parser, task::preparse_ended, task::preparse_status, task::preparser, vlc_runnable::run, task::runnable, RunnableRun(), task::timeout, vlc_runnable::userdata, task::userdata, and vlc_sem_init().
Referenced by input_preparser_Push().
|
static |
Referenced by Fetch().