[FFmpeg-devel] [PATCH] New library for shared non-generic libav* utils

Stefano Sabatini stefano.sabatini-lala
Wed Jul 21 20:29:46 CEST 2010


On date Monday 2010-07-19 18:14:42 +0100, M?ns Rullg?rd encoded:
> Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> 
> > Here it is a patch, it's not yet clear how many people are going to
> > accept this.
> >
> > As for me I already explained that, while I dislike the added
> > complexity, I also appreciate the idea of a minimal generic libavutil
> > which could be used in other non multimedia related projects.
> >
> > Since Michael dislikes the idea of pushing multimedia-related shared
> > stuff to lavu, I find the addition of a new library an accptable
> > compromise.
> >
> > As for the name, Michael proposed libavcommon, I don't like much this
> > name so I'm proposing libavcore (like -> multimedia core
> > utilities). Other ideas: libavmediacore or libavmediautils.
> >
> > I plan to move here the imgconvert stuff and some parsing utils from
> > lavc, and pixfmt/pixdesc + media macros from lavu at the next lavu
> > major bump.
> >
> > Regards.
> >
> >
> > From 04cdf8ce20d4aaaa030873518210f91289cc4264 Mon Sep 17 00:00:00 2001
> > From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> > Date: Sat, 17 Jul 2010 17:38:28 +0200
> > Subject: [create-lavcore PATCH] Add libavcore.
> >
> > The new library is meant to contain the core multimedia utilities for
> > FFmpeg, to make them shareable between more libav* libraries.
> > ---
> >  Makefile              |    1 +
> >  cmdutils.c            |    3 ++
> >  common.mak            |    2 +-
> >  configure             |    9 ++++++-
> >  libavcore/Makefile    |    9 +++++++
> >  libavcore/avcore.h    |   58 +++++++++++++++++++++++++++++++++++++++++++++++++
> >  libavcore/libavcore.v |    4 +++
> >  libavcore/utils.c     |   40 +++++++++++++++++++++++++++++++++
> >  8 files changed, 124 insertions(+), 2 deletions(-)
> >  create mode 100644 libavcore/Makefile
> >  create mode 100644 libavcore/avcore.h
> >  create mode 100644 libavcore/libavcore.v
> >  create mode 100644 libavcore/utils.c
> >
> > diff --git a/Makefile b/Makefile
> > index fa521ef..2ae055a 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -29,6 +29,7 @@ FFLIBS-$(CONFIG_AVFORMAT) += avformat
> >  FFLIBS-$(CONFIG_AVCODEC)  += avcodec
> >  FFLIBS-$(CONFIG_POSTPROC) += postproc
> >  FFLIBS-$(CONFIG_SWSCALE)  += swscale
> > +FFLIBS-$(CONFIG_AVCORE)   += avcore
> 
> Alphabetical order.
> 
> > diff --git a/configure b/configure
> > index 0513751..df44bff 100755
> > --- a/configure
> > +++ b/configure
> 
> [...]
> 
> > @@ -2770,7 +2773,7 @@ enabled extra_warnings && check_cflags -Winline
> >  # add some linker flags
> >  check_ldflags -Wl,--warn-common
> >  check_ldflags -Wl,--as-needed
> > -check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
> > +check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -rpath-link,\$(BUILD_ROOT)/libavcore -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
> 
> Missing -Wl, on -rpath-link flag.
> 
> [...]
> 
> > diff --git a/libavcore/Makefile b/libavcore/Makefile
> > new file mode 100644
> > index 0000000..c5140c4
> > --- /dev/null
> > +++ b/libavcore/Makefile
> > @@ -0,0 +1,9 @@
> > +include $(SUBDIR)../config.mak
> > +
> > +NAME = avcore
> > +
> > +HEADERS = avcore.h                                                      \
> > +
> > +OBJS = utils.o                                                          \
> > +
> > +include $(SUBDIR)../subdir.mak
> 
> Nice and small :-)
> 
> > diff --git a/libavcore/utils.c b/libavcore/utils.c
> > new file mode 100644
> > index 0000000..bbf51d2
> > --- /dev/null
> > +++ b/libavcore/utils.c
> > @@ -0,0 +1,40 @@
> > +/*
> > + * 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 "avcore.h"
> 
> Missing #include "config.h"
> 
> OK otherwise.

Applied, welcome to the new lib!
-- 
FFmpeg = Fantastic and Faithful Martial Practical Ermetic Guide



More information about the ffmpeg-devel mailing list