[FFmpeg-devel] [PATCH 2/5] lavf: add av_ prefix to parse_date

Stefano Sabatini stefano.sabatini-lala
Sun Feb 6 16:22:14 CET 2011


On date Sunday 2011-02-06 10:08:55 -0500, Ronald S. Bultje encoded:
> Hi,
> 
> On Sun, Feb 6, 2011 at 9:50 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sun, Feb 06, 2011 at 03:46:47PM +0100, Anton Khirnov wrote:
> > [...]
> >> index f354539..4027990 100644
> >> --- a/libavformat/avformat.h
> >> +++ b/libavformat/avformat.h
> >> @@ -1474,6 +1474,10 @@ attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base,
> >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?const char *arg);
> >> ?#endif
> >>
> >> +#if FF_API_PARSE_DATE
> >> +attribute_deprecated int64_t parse_date(const char *datestr, int duration);
> >> +#endif
> >> +
> >> ?/**
> >> ? * Parse datestr and return a corresponding number of microseconds.
> >> ? * @param datestr String representing a date or a duration.
> >> @@ -1501,7 +1505,7 @@ attribute_deprecated int parse_frame_rate(int *frame_rate, int *frame_rate_base,
> >> ? * not zero datestr is interpreted as a duration, otherwise as a
> >> ? * date.
> >> ? */
> >> -int64_t parse_date(const char *datestr, int duration);
> >> +int64_t av_parse_date(const char *datestr, int duration);
> >
> > This also doesnt belong in libavformat, which is why it doesnt have a av
> > prefix id guess
> 
> In addition to htat, the API is schizophrenic. Why not one function
> for parsing a duration and one for parsing a date?

Also check:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/111811

I suppose it is safe to keep the current semantics if the objective is
removing non av-prefixed functions, *then* implement av_parse_time (or
av_parse_date/duration as separate functions).  Also it would make
sense to have this such functions somewhere in libavutil/libavcore.
-- 
FFmpeg = Free Forgiving Multimedia Pure Elastic God



More information about the ffmpeg-devel mailing list