VLC 4.0.0-dev
|
Helper functions related to parsing, as well as generating, data related to the MRL-specification. More...
Files | |
file | mrl_helpers.h |
Functions | |
static int | mrl_EscapeFragmentIdentifier (char **out, char const *payload) |
Escape a fragment identifier for use within an MRL. More... | |
static int | mrl_FragmentSplit (vlc_array_t *out_items, char const **out_extra, char const *payload) |
Split an MRL-fragment into identifiers. More... | |
Helper functions related to parsing, as well as generating, data related to the MRL-specification.
|
inlinestatic |
Escape a fragment identifier for use within an MRL.
The function will generate a string that follows the MRL-specification regarding fragment-identifiers.
See the MRL-specification for a detailed explanation of how payload
will be escaped.
[out] | out | *out will refer to the created string on success, and an unspecified value on error. |
[in] | payload | the data to escape. |
References p, vlc_memstream::ptr, RFC3986_FRAGMENT, VLC_EGENERIC, vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_printf(), and VLC_SUCCESS.
Referenced by StreamExtractorCreateMRL().
|
inlinestatic |
Split an MRL-fragment into identifiers.
Function used to split the fragment-data (also referred to as anchor-data) into an array containing each of the files specified.
See the MRL-specification for detailed information regarding how payload
will be interpreted.
[out] | out_items | storage for a vlc_array_t that will contain the parsed identifiers on success. |
[out] | out_extra | *out_extra will point to any remaining data (if any) |
[in] | payload | the data to parse |
References vlc_memstream::error, strndup(), unlikely, vlc_array_append(), vlc_array_clear(), vlc_array_count(), vlc_array_init(), vlc_array_item_at_index, VLC_EGENERIC, VLC_SUCCESS, and vlc_uri_decode().
Referenced by stream_extractor_AttachParsed().