[FFmpeg-devel] [PATCH]Add Dirac support to ffmpeg via libdirac_* and Schroedinger libraries]
Anuradha Suraparaju
anuradha
Wed Apr 23 13:19:02 CEST 2008
On Wed, 2008-04-23 at 10:30 +0200, Diego Biurrun wrote:
> On Wed, Apr 23, 2008 at 02:09:53PM +1000, Anuradha Suraparaju wrote:
> >
> > On Tue, 2008-04-22 at 19:49 +0200, Diego Biurrun wrote:
> > > On Tue, Apr 22, 2008 at 07:12:05PM +0200, Diego Biurrun wrote:
> > > > On Thu, Apr 17, 2008 at 09:15:51PM +1000, Anuradha Suraparaju wrote:
> > > > >
> > > > > I've attached the dirac patch to this email. I've created the patch
> > > > > using the latest svn version 12879.
> > > > > --- ffmpegsvn_trunk/configure 2008-04-17 11:14:38.000000000 +1000
> > > > > +++ ffmpegsvn_trunk_dirac/configure 2008-04-17 20:43:10.000000000 +1000
> > > > > @@ -2014,6 +2021,7 @@
> > > > > fi
> > > > > echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
> > > > > echo "EXTRALIBS=$extralibs" >> config.mak
> > > > > +echo "EXTRAINCS=$extraincs" >> config.mak
> > > >
> > > > I maintain that this is unnecessary. Just..
> > > >
> > > > > --- ffmpegsvn_trunk/libavcodec/libdiracdec.c 1970-01-01 10:00:00.000000000 +1000
> > > > > +++ ffmpegsvn_trunk_dirac/libavcodec/libdiracdec.c 2008-04-17 16:26:59.000000000 +1000
> > > > > @@ -0,0 +1,211 @@
> > > > > +
> > > > > +#include <libdirac_decoder/dirac_parser.h>
> > > >
> > > > .. prefix this with dirac/.
> > >
> > > Of course this will not work, since the headers in libdirac_decoder/
> > > etc. #include other headers from that directory.
> > >
> >
> > The same applies for Schroedinger header files as well. I can't figure
> > out how this can be done other than by adding extra functions to
> > configure. Can you suggest a method?
>
> add_cflags
>
> Even better: You could restructure your includes to be less weird. I
> have never seen empty subdirectories below /usr/[local/]include and I
> must say I find it very weird. You are behaving different from any
> library I have seen before or is installed on my system.
>
How about the following:
In configure
# use pkg-config to check if library is installed
check_foo_config2(){
cfg=$1
library=$2
shift 2
disable $cfg
check_cmd pkg-config --libs $library || die "ERROR: can't find
$library library"
add_extralibs `pkg-config --libs $library`
enable $cfg
}
The function will exit printing an error message to std out if libdirac
is enabled but Dirac libraries are not installed.
For Dirac this will be invoked as
enabled dirac && check_foo_config2 libdirac dirac
In libavcodec/Makefile
LIBDIRAC-OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
LIBDIRAC-OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o
libdirac_libschro.o
$(addprefix $(SUBDIR),$(LIBDIRAC-OBJS-yes)): CFLAGS += `pkg-config
--cflags dirac`
OBJS-$(CONFIG_LIBDIRAC) += $(LIBDIRAC-OBJS-yes)
(Something similar to this is done to ALTIVEC files)
> Diego
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list