VLC
4.0.0-dev
|
![]() |
Files | |
file | vlc_charset.h |
Characters sets handling. | |
file | vlc_strings.h |
Helper functions for nul-terminated strings. | |
file | vlc_url.h |
This file defines functions for manipulating URL in vlc. | |
Typedefs | |
typedef struct vlc_player_t | vlc_player_t |
Functions | |
static int | vlc_ascii_toupper (int c) |
static int | vlc_ascii_tolower (int c) |
static int | vlc_ascii_strcasecmp (const char *psz1, const char *psz2) |
Compare two ASCII strings ignoring case. More... | |
static int | vlc_ascii_strncasecmp (const char *psz1, const char *psz2, size_t n) |
void | vlc_xml_decode (char *st) |
Decodes XML entities. More... | |
char * | vlc_xml_encode (const char *str) |
Encodes XML entites. More... | |
char * | vlc_b64_encode_binary (const void *base, size_t length) |
Base64 encoding. More... | |
char * | vlc_b64_encode (const char *str) |
Base64 encoding (string). More... | |
size_t | vlc_b64_decode_binary_to_buffer (void *p_dst, size_t i_dst_max, const char *psz_src) |
size_t | vlc_b64_decode_binary (uint8_t **pp_dst, const char *psz_src) |
char * | vlc_b64_decode (const char *psz_src) |
char * | vlc_strftime (const char *) |
Convenience wrapper for strftime(). More... | |
char * | vlc_strfplayer (vlc_player_t *player, input_item_t *item, const char *fmt) |
Formats input meta-data. More... | |
static char * | str_format (vlc_player_t *player, input_item_t *item, const char *fmt) |
int | vlc_filenamecmp (const char *, const char *) |
void | filename_sanitize (char *) |
Sanitize a file name. More... | |
typedef struct vlc_player_t vlc_player_t |
void filename_sanitize | ( | char * | str | ) |
Sanitize a file name.
Remove forbidden, potentially forbidden and otherwise evil characters from file names. That includes slashes, and popular characters like colon (on Unix anyway).
References EnsureUTF8().
Referenced by ArtCacheGetDirPath(), ArtCacheName(), input_item_CreateFilename(), str_format(), and vout_snapshot_SaveImage().
|
inlinestatic |
References filename_sanitize(), VLC_API, vlc_filenamecmp(), vlc_strfplayer(), and vlc_strftime().
Referenced by input_item_CreateFilename(), and vout_snapshot_SaveImage().
|
inlinestatic |
Compare two ASCII strings ignoring case.
The result is independent of the locale. If there are non-ASCII characters in the strings, their cases are NOT ignored in the comparison.
References vlc_ascii_tolower().
Referenced by cookie_domain_matches(), demux_mapping_cmp(), vlc_http_cookies_store(), vlc_http_res_get_redirect(), and vlc_http_res_init().
|
inlinestatic |
References VLC_API, vlc_ascii_tolower(), vlc_b64_decode(), vlc_b64_decode_binary(), vlc_b64_decode_binary_to_buffer(), vlc_b64_encode(), vlc_b64_encode_binary(), VLC_MALLOC, vlc_strfplayer(), vlc_strftime(), VLC_USED, vlc_xml_decode(), and vlc_xml_encode().
Referenced by cookie_get_attribute_value(), and cookie_has_attribute().
|
inlinestatic |
Referenced by vlc_ascii_strcasecmp(), and vlc_ascii_strncasecmp().
|
inlinestatic |
char* vlc_b64_decode | ( | const char * | psz_src | ) |
References vlc_b64_decode_binary_to_buffer().
Referenced by httpdAuthOk(), and vlc_ascii_strncasecmp().
size_t vlc_b64_decode_binary | ( | uint8_t ** | pp_dst, |
const char * | psz_src | ||
) |
References vlc_b64_decode_binary_to_buffer().
Referenced by vlc_ascii_strncasecmp().
size_t vlc_b64_decode_binary_to_buffer | ( | void * | p_dst, |
size_t | i_dst_max, | ||
const char * | psz_src | ||
) |
Referenced by vlc_ascii_strncasecmp().
char* vlc_b64_encode | ( | const char * | str | ) |
Base64 encoding (string).
Encodes a nul-terminated string into Base64.
str | nul-terminated string to encode |
References vlc_b64_encode_binary().
Referenced by vlc_ascii_strncasecmp(), and vlc_http_auth_FormatAuthorizationHeader().
char* vlc_b64_encode_binary | ( | const void * | base, |
size_t | length | ||
) |
Base64 encoding.
Encodes a buffer into base64 as a (nul-terminated) string.
base | start address of buffer to encode |
length | length in bytes of buffer to encode |
References unlikely.
Referenced by vlc_ascii_strncasecmp(), vlc_b64_encode(), and vlc_http_msg_add_creds_basic().
int vlc_filenamecmp | ( | const char * | , |
const char * | |||
) |
References strcoll.
Referenced by rdh_compar_filename(), and str_format().
char* vlc_strfplayer | ( | vlc_player_t * | player, |
input_item_t * | item, | ||
const char * | fmt | ||
) |
Formats input meta-data.
Formats input and input item meta-informations into a heap-allocated string.
player | a locked player instance or NULL (player and item can't be both NULL) |
item | a valid item or NULL (player and item can't be both NULL) |
fmt | format string |
References aout_Release(), aout_VolumeGet(), es_format_t::audio, AUDIO_ES, vlc_player_track::fmt, es_format_t::i_bitrate, input_stats_t::i_displayed_pictures, audio_format_t::i_rate, input_item_GetDuration(), input_item_GetName(), input_item_GetNowPlayingFb(), input_item_GetTitleFbName(), input_item_GetURI(), input_item_t::lock, name, input_item_t::p_stats, vlc_memstream::ptr, SPU_ES, vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_printf(), vlc_memstream_putc(), vlc_memstream_puts(), vlc_meta_Album, vlc_meta_Artist, vlc_meta_Copyright, vlc_meta_Date, vlc_meta_Description, vlc_meta_EncodedBy, vlc_meta_Genre, vlc_meta_Language, vlc_meta_Publisher, vlc_meta_Rating, vlc_meta_Title, vlc_meta_TrackNumber, vlc_meta_TrackTotal, vlc_meta_URL, vlc_mutex_lock(), vlc_mutex_unlock(), vlc_player_aout_Hold(), vlc_player_GetCategoryLanguage(), vlc_player_GetCurrentMedia(), vlc_player_GetLength(), vlc_player_GetPosition(), vlc_player_GetRate(), vlc_player_GetSelectedChapterIdx(), vlc_player_GetSelectedTitleIdx(), vlc_player_GetSelectedTrack(), vlc_player_GetTime(), VLC_TICK_INVALID, write_duration(), and write_meta().
Referenced by str_format(), and vlc_ascii_strncasecmp().
char* vlc_strftime | ( | const char * | ) |
Convenience wrapper for strftime().
Formats the current time into a heap-allocated string.
tformat | time format (as with C strftime()) |
References localtime_r(), strdup(), and vlc_assert_unreachable.
Referenced by str_format(), and vlc_ascii_strncasecmp().
void vlc_xml_decode | ( | char * | st | ) |
Decodes XML entities.
Decodes a null-terminated UTF-8 string of XML character data into a regular nul-terminated UTF-8 string. In other words, replaces XML entities and numerical character references with the corresponding characters.
This function operates in place (the output is always of smaller or equal length than the input) and always succeeds.
str | null-terminated string [IN/OUT] |
References ARRAY_SIZE, cmp_entity(), xml_entity_s::psz_char, xml_entity_s::psz_entity, psz_value, and xml_entities.
Referenced by vlc_ascii_strncasecmp().
char* vlc_xml_encode | ( | const char * | str | ) |
Encodes XML entites.
Substitutes unsafe characters in a null-terminated UTF-8 strings with an XML entity or numerical character reference.
str | null terminated UTF-8 string |
References vlc_memstream::ptr, unlikely, vlc_memstream_close(), vlc_memstream_open(), vlc_memstream_printf(), vlc_memstream_puts(), vlc_memstream_write(), and vlc_towc().
Referenced by httpd_HtmlError(), and vlc_ascii_strncasecmp().