VLC 4.0.0-dev
Loading...
Searching...
No Matches
parse.c File Reference
Include dependency graph for parse.c:

Data Structures

struct  input_item_parser_id_t
 

Functions

static void input_item_parser_InputEvent (input_thread_t *input, const struct vlc_input_event *event, void *parser_)
 
input_item_parser_id_tinput_item_Parse (vlc_object_t *obj, input_item_t *item, const struct input_item_parser_cfg *cfg)
 Parse an item asynchronously.
 
void input_item_parser_id_Interrupt (input_item_parser_id_t *parser)
 Interrupts & cancels the parsing.
 
void input_item_parser_id_Release (input_item_parser_id_t *parser)
 Release (and interrupt if needed) a parser.
 

Function Documentation

◆ input_item_Parse()

input_item_parser_id_t * input_item_Parse ( vlc_object_t parent,
input_item_t item,
const struct input_item_parser_cfg cfg 
)

Parse an item asynchronously.

Note
The parsing is done asynchronously. The user can call input_item_parser_id_Interrupt() before receiving the on_ended() event in order to interrupt it.
Parameters
parentthe parent obj
itemthe item to parse
cfgpointer to a configuration struct, can't be NULL
Returns
a parser instance or NULL in case of error, the parser needs to be released with input_item_parser_id_Release()

References input_item_parser_cfg::cbs, input_item_parser_id_t::cbs, input_item_parser_cfg::cbs_data, INIT_S, input_item_parser_id_t::input, vlc_input_thread_cfg::INPUT_CFG_HW_DEC_DISABLED, input_Close(), input_Create, input_item_parser_InputEvent(), input_Start(), INPUT_TYPE_PREPARSING, input_item_parser_cfg::interact, input_item_parser_cbs_t::on_ended, vlc_input_thread_callbacks::on_event, input_item_parser_id_t::state, input_item_parser_cfg::subitems, vlc_input_thread_cfg::type, and input_item_parser_id_t::userdata.

Referenced by Parse().

◆ input_item_parser_id_Interrupt()

void input_item_parser_id_Interrupt ( input_item_parser_id_t parser)

Interrupts & cancels the parsing.

Note
The parser still needs to be released with input_item_parser_id_Release afterward.
Calling this function will cause the on_ended callback to be invoked.
Parameters
parserthe parser to interrupt

References input_item_parser_id_t::input, and input_Stop().

Referenced by input_item_parser_id_Release().

◆ input_item_parser_id_Release()

void input_item_parser_id_Release ( input_item_parser_id_t parser)

Release (and interrupt if needed) a parser.

Parameters
parserthe parser returned by input_item_Parse

References input_item_parser_id_t::input, input_Close(), and input_item_parser_id_Interrupt().

Referenced by Parse().

◆ input_item_parser_InputEvent()