diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-02-16 08:52:36 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-18 19:52:30 +0100 |
commit | 40c3fe2c0873feed2a345032205560c4a816271f (patch) | |
tree | c4054eef6adff2f29cfb232fa2358c8be480ce27 /libavformat/avformat.h | |
parent | 0ebf475494837edd07fa6f58c540364795f9551c (diff) | |
download | ffmpeg-40c3fe2c0873feed2a345032205560c4a816271f.tar.gz |
Deprecate parse_date() in favor of av_parse_time().
The new av_parse_time() is created in libavutil/parseutils.h, all the
internal functions used by parse_date are moved to
libavutil/parseutils.c and made static.
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit f6c7375a175ac649558aefab14f3895b2cb469aa)
Diffstat (limited to 'libavformat/avformat.h')
-rw-r--r-- | libavformat/avformat.h | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8752f07e07..7d69f510b0 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1478,34 +1478,17 @@ attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base, const char *arg); #endif +#if FF_API_PARSE_DATE /** * Parse datestr and return a corresponding number of microseconds. + * * @param datestr String representing a date or a duration. - * - If a date the syntax is: - * @code - * now|{[{YYYY-MM-DD|YYYYMMDD}[T|t| ]]{{HH[:MM[:SS[.m...]]]}|{HH[MM[SS[.m...]]]}}[Z|z]} - * @endcode - * If the value is "now" it takes the current time. - * Time is local time unless Z is appended, in which case it is - * interpreted as UTC. - * If the year-month-day part is not specified it takes the current - * year-month-day. - * @return the number of microseconds since 1st of January, 1970 up to - * the time of the parsed date or INT64_MIN if datestr cannot be - * successfully parsed. - * - If a duration the syntax is: - * @code - * [-]HH[:MM[:SS[.m...]]] - * [-]S+[.m...] - * @endcode - * @return the number of microseconds contained in a time interval - * with the specified duration or INT64_MIN if datestr cannot be - * successfully parsed. - * @param duration Flag which tells how to interpret datestr, if - * not zero datestr is interpreted as a duration, otherwise as a - * date. + * See av_parse_time() for the syntax of the provided string. + * @deprecated in favor of av_parse_time() */ +attribute_deprecated int64_t parse_date(const char *datestr, int duration); +#endif /** * Get the current time in microseconds. |