[FFmpeg-devel] Implement missing av*_version() functions

Stefano Sabatini stefano.sabatini-lala
Tue Aug 5 21:14:54 CEST 2008


On date Tuesday 2008-08-05 03:28:24 +0200, Michael Niedermayer encoded:
> On Sun, Aug 03, 2008 at 07:53:36PM +0200, Stefano Sabatini wrote:
> > Index: libavcodec/avcodec.h
> > ===================================================================
> > --- libavcodec/avcodec.h	(revision 14521)
> > +++ libavcodec/avcodec.h	(working copy)
> > @@ -2527,8 +2527,13 @@
> >  #endif
> >  AVCodec *av_codec_next(AVCodec *c);
> >  
> > -/* returns LIBAVCODEC_VERSION_INT constant */
> > +/**
> > + * Get the libavcodec version as determined at link-time, or at runtime
> > + * for dynamic linking.
> > + * @return the LIBAVCODEC_VERSION_INT constant
> > + */
> 
> rejected

All doxys changed to:
Returns LIBAV*_VERSION_INT constant.

[...] 
> > Index: libavfilter/utils.c
> > ===================================================================
> > --- libavfilter/utils.c	(revision 0)
> > +++ libavfilter/utils.c	(revision 0)
> > @@ -0,0 +1,28 @@
> > +/*
> > + * This file is part of FFmpeg.
> > + *
> > + * FFmpeg is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU Lesser General Public
> > + * License as published by the Free Software Foundation; either
> > + * version 2.1 of the License, or (at your option) any later version.
> > + *
> > + * FFmpeg is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > + * Lesser General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU Lesser General Public
> > + * License along with FFmpeg; if not, write to the Free Software
> > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > + */
> > +#include "avfilter.h"
> > +
> > +/**
> > + * @file libavfilter/utils.c
> > + * various utility functions
> > + */
> > +
> > +unsigned avfilter_version(void)
> > +{
> > +  return LIBAVFILTER_VERSION_INT;
> > +}
> > Index: libavfilter/Makefile
> > ===================================================================
> > --- libavfilter/Makefile	(revision 14521)
> > +++ libavfilter/Makefile	(working copy)
> > @@ -9,6 +9,7 @@
> >         avfilter.o \
> >         defaults.o \
> >         formats.o \
> > +       utils.o \
> >  
> >  #OBJS-$(CONFIG_XXX_FILTER)    += vf_xxx.o
> >  
> 
> no, there surely is another file that can be used, we dont need a new one
> just for this 1 line function

I put this in libavfilter/avfilter.c.

[...]

> > Index: libavutil/utils.c
> > ===================================================================
> > --- libavutil/utils.c	(revision 0)
> > +++ libavutil/utils.c	(revision 0)
> > @@ -0,0 +1,28 @@
> > +/*
> > + * This file is part of FFmpeg.
> > + *
> > + * FFmpeg is free software; you can redistribute it and/or
> > + * modify it under the terms of the GNU Lesser General Public
> > + * License as published by the Free Software Foundation; either
> > + * version 2.1 of the License, or (at your option) any later version.
> > + *
> > + * FFmpeg is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> > + * Lesser General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU Lesser General Public
> > + * License along with FFmpeg; if not, write to the Free Software
> > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> > + */
> > +#include "avutil.h"
> > +
> > +/**
> > + * @file libavutil/utils.c
> > + * various utility functions
> > + */
> > +
> > +unsigned avutil_version(void)
> > +{
> > +  return LIBAVUTIL_VERSION_INT;
> > +}
> > Index: libavutil/Makefile
> > ===================================================================
> > --- libavutil/Makefile	(revision 14521)
> > +++ libavutil/Makefile	(working copy)
> > @@ -21,6 +21,7 @@
> >         sha1.o \
> >         string.o \
> >         tree.o \
> > +       utils.o \
> >  
> >  HEADERS = adler32.h \
> >            avstring.h \
> 
> no

This is more complicated to place, frankly I wouldn't use any of these
files:

stefano at geppetto ~/s/ffmpeg> ls -1 libavutil/*.c
libavutil/adler32.c
libavutil/aes.c
libavutil/base64.c
libavutil/crc.c
libavutil/des.c
libavutil/fifo.c
libavutil/integer.c
libavutil/intfloat_readwrite.c
libavutil/lfg.c
libavutil/lls.c
libavutil/log.c
libavutil/lzo.c
libavutil/mathematics.c
libavutil/md5.c
libavutil/mem.c
libavutil/random.c
libavutil/rational.c
libavutil/rc4.c
libavutil/sha1.c
libavutil/softfloat.c
libavutil/string.c
libavutil/tree.c

What do you suggest to use?

[...] 
> > Index: libavdevice/utils.c
> > ===================================================================
> > --- libavdevice/utils.c	(revision 0)
> > +++ libavdevice/utils.c	(revision 0)
[...]
> > +unsigned avdevice_version(void)
> > +{
> > +  return LIBAVDEVICE_VERSION_INT;
> > +}
> > Index: libavdevice/Makefile
> > ===================================================================
> > --- libavdevice/Makefile	(revision 14521)
> > +++ libavdevice/Makefile	(working copy)
> > @@ -5,7 +5,8 @@
> >  
> >  HEADERS = avdevice.h
> >  
> > -OBJS    = alldevices.o
> > +OBJS    = alldevices.o \
> > +          utils.o \

I put this in libavdevice/alldevices.c.

New patches attached.

Regards.
-- 
FFmpeg = Frightening & Fiendish Maxi Pitiful Erroneous Guru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doxy-lavc-version-01.patch
Type: text/x-diff
Size: 532 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080805/0da038d4/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implement-lavdev-version-02.patch
Type: text/x-diff
Size: 1293 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080805/0da038d4/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implement-lavfi-version-01.patch
Type: text/x-diff
Size: 1171 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080805/0da038d4/attachment-0002.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implement-lavf-version-01.patch
Type: text/x-diff
Size: 1200 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080805/0da038d4/attachment-0003.patch>



More information about the ffmpeg-devel mailing list