Revision 40c3fe2c libavutil/parseutils.h

View differences:

libavutil/parseutils.h
72 72
int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen,
73 73
                   void *log_ctx);
74 74

  
75
/**
76
 * Parses timestr and returns in *time a corresponding number of
77
 * microseconds.
78
 *
79
 * @param timeval puts here the number of microseconds corresponding
80
 * to the string in timestr. If the string represents a duration, it
81
 * is the number of microseconds contained in the time interval.  If
82
 * the string is a date, is the number of microseconds since 1st of
83
 * January, 1970 up to the time of the parsed date.  If timestr cannot
84
 * be successfully parsed, set *time to INT64_MIN.
85

  
86
 * @param datestr a string representing a date or a duration.
87
 * - If a date the syntax is:
88
 * @code
89
 * [{YYYY-MM-DD|YYYYMMDD}[T|t| ]]{{HH[:MM[:SS[.m...]]]}|{HH[MM[SS[.m...]]]}}[Z]
90
 * now
91
 * @endcode
92
 * If the value is "now" it takes the current time.
93
 * Time is local time unless Z is appended, in which case it is
94
 * interpreted as UTC.
95
 * If the year-month-day part is not specified it takes the current
96
 * year-month-day.
97
 * - If a duration the syntax is:
98
 * @code
99
 * [-]HH[:MM[:SS[.m...]]]
100
 * [-]S+[.m...]
101
 * @endcode
102
 * @param duration flag which tells how to interpret timestr, if not
103
 * zero timestr is interpreted as a duration, otherwise as a date
104
 * @return 0 in case of success, a negative value corresponding to an
105
 * AVERROR code otherwise
106
 */
107
int av_parse_time(int64_t *timeval, const char *timestr, int duration);
108

  
75 109
#endif /* AVUTIL_PARSEUTILS_H */

Also available in: Unified diff