diff options
Diffstat (limited to 'media/ffvpx/libavutil/avstring.h')
-rw-r--r-- | media/ffvpx/libavutil/avstring.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/media/ffvpx/libavutil/avstring.h b/media/ffvpx/libavutil/avstring.h index 37dd4e2da0..e260263763 100644 --- a/media/ffvpx/libavutil/avstring.h +++ b/media/ffvpx/libavutil/avstring.h @@ -24,6 +24,7 @@ #include <stddef.h> #include <stdint.h> #include "attributes.h" +#include "version.h" /** * @addtogroup lavu_string @@ -134,6 +135,7 @@ size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...) av_printf_forma /** * Get the count of continuous non zero chars starting from the beginning. * + * @param s the string whose length to count * @param len maximum number of characters to check in the string, that * is the maximum value which is returned by the function */ @@ -156,11 +158,6 @@ static inline size_t av_strnlen(const char *s, size_t len) char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2); /** - * Convert a number to an av_malloced string. - */ -char *av_d2str(double d); - -/** * Unescape the given string until a non escaped terminating char, * and return the token corresponding to the unescaped string. * @@ -274,16 +271,21 @@ char *av_strireplace(const char *str, const char *from, const char *to); /** * Thread safe basename. - * @param path the path, on DOS both \ and / are considered separators. + * @param path the string to parse, on DOS both \ and / are considered separators. * @return pointer to the basename substring. + * If path does not contain a slash, the function returns a copy of path. + * If path is a NULL pointer or points to an empty string, a pointer + * to a string "." is returned. */ const char *av_basename(const char *path); /** * Thread safe dirname. - * @param path the path, on DOS both \ and / are considered separators. - * @return the path with the separator replaced by the string terminator or ".". - * @note the function may change the input string. + * @param path the string to parse, on DOS both \ and / are considered separators. + * @return A pointer to a string that's the parent directory of path. + * If path is a NULL pointer or points to an empty string, a pointer + * to a string "." is returned. + * @note the function may modify the contents of the path, so copies should be passed. */ const char *av_dirname(char *path); @@ -314,6 +316,7 @@ enum AVEscapeMode { AV_ESCAPE_MODE_AUTO, ///< Use auto-selected escaping mode. AV_ESCAPE_MODE_BACKSLASH, ///< Use backslash escaping. AV_ESCAPE_MODE_QUOTE, ///< Use single-quote escaping. + AV_ESCAPE_MODE_XML, ///< Use XML non-markup character data escaping. }; /** @@ -334,6 +337,19 @@ enum AVEscapeMode { #define AV_ESCAPE_FLAG_STRICT (1 << 1) /** + * Within AV_ESCAPE_MODE_XML, additionally escape single quotes for single + * quoted attributes. + */ +#define AV_ESCAPE_FLAG_XML_SINGLE_QUOTES (1 << 2) + +/** + * Within AV_ESCAPE_MODE_XML, additionally escape double quotes for double + * quoted attributes. + */ +#define AV_ESCAPE_FLAG_XML_DOUBLE_QUOTES (1 << 3) + + +/** * Escape string in src, and put the escaped string in an allocated * string in *dst, which must be freed with av_free(). * |