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 (input_item_t *item, vlc_object_t *obj, const input_item_parser_cbs_t *cbs, void *userdata)
 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 ( input_item_t item,
vlc_object_t parent,
const input_item_parser_cbs_t cbs,
void *  userdata 
)

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
itemthe item to parse
parentthe parent obj
cbscallbacks to be notified of the end of the parsing
userdataopaque data used by parser callbacks
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_id_t::cbs, INIT_S, input_item_parser_id_t::input, input_Close(), input_Create, input_item_parser_InputEvent(), input_Start(), INPUT_TYPE_PREPARSING, input_item_parser_cbs_t::on_ended, input_item_parser_id_t::state, 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()