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

Michael Niedermayer michaelni
Sun Feb 6 17:28:57 CET 2011


On Sun, Feb 06, 2011 at 04:22:14PM +0100, Stefano Sabatini wrote:
> 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.

Thats what ive meant with that it doesntz belong in libavformat

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110206/9b48207c/attachment.pgp>



More information about the ffmpeg-devel mailing list