summaryrefslogtreecommitdiff
path: root/libavutil/parseutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil/parseutils.h')
-rw-r--r--libavutil/parseutils.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/libavutil/parseutils.h b/libavutil/parseutils.h
index 7c7a91f5dd..da7d345b54 100644
--- a/libavutil/parseutils.h
+++ b/libavutil/parseutils.h
@@ -133,6 +133,31 @@ int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
int av_parse_time(int64_t *timeval, const char *timestr, int duration);
/**
+ * Parse the input string p according to the format string fmt and
+ * store its results in the structure dt.
+ * This implementation supports only a subset of the formats supported
+ * by the standard strptime().
+ *
+ * In particular it actually supports the parameters:
+ * - %H: the hour as a decimal number, using a 24-hour clock, in the
+ * range '00' through '23'
+ * - %M: the minute as a decimal number, using a 24-hour clock, in the
+ * range '00' through '59'
+ * - %S: the second as a decimal number, using a 24-hour clock, in the
+ * range '00' through '59'
+ * - %Y: the year as a decimal number, using the Gregorian calendar
+ * - %m: the month as a decimal number, in the range '1' through '12'
+ * - %d: the day of the month as a decimal number, in the range '1'
+ * through '31'
+ * - %%: a literal '%'
+ *
+ * @return a pointer to the first character not processed in this
+ * function call, or NULL in case the function fails to match all of
+ * the fmt string and therefore an error occurred
+ */
+char *av_small_strptime(const char *p, const char *fmt, struct tm *dt);
+
+/**
* Attempt to find a specific tag in a URL.
*
* syntax: '?tag1=val1&tag2=val2...'. Little URL decoding is done.