gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] ffmpeg -- just to organize my thoughts


From: Russ Nelson
Subject: [Gnash-dev] ffmpeg -- just to organize my thoughts
Date: Mon, 2 Jun 2008 16:39:59 -0400

This email is just to organize my thoughts; no reply needed from
anybody.  Executive summary: we need to make sure that both avcodec.h
and avformat.h are present, but we don't (can't, actually) point to
their locations, but instead must point to their subdirectories.

Currently, the ffmpeg library is being split into several packages.
Since every distro affixes its packages on a different schedule (and
much as Shuttleworth would like to do something about that, it ain't
gonna happen) we have to deal with detecting ffmpeg differently.

OpenSUSE 10.3:
    libffmpeg-api (even on 32-bit machines installs into /usr/lib64)
Mandriva 2008.1:
    lib64ffmpeg-devel
Ubuntu Hardy Heron:
    libavformat-dev
    libavcodec-dev
    libavutil-dev

All of these install headers into /usr/include/ffmpeg/.  In the ffmpeg
SVN, ffmpeg headers get installed into per-library include
subdirectories, e.g. /usr/include/libavcodec.  It's very likely that the
next set of packages coming from distros will do the same thing.

(Not to mention that the version representation in the .h files
changes.  They still support all the old version representations, but
through macros.  Since we cross-compile, we can't rely on creating a
small .c program which #includes "avcodec.h" and just prints the
version.  We must parse the .h file to get the version, but I've got
that fixed, hence this parenthetical comment.)

Internally, the include/ffmpeg files #include "avutil.h", and the
include/libav* files #include "libavcodec/avutil.h"

Because of the latter, we cannot be clever and include the directory
in which avcodec is found: -I .../libavcodec .  We MUST detect the
base directory and then either #include <ffmpeg/avcodec.h> or #include
<libavcodec/avcodec.h>.

Since the ffmpeg folks have dumped on us a system of include headers
in which compilation fails unless libavcodec, libavformat, libavutil
are all in the same .../include directory, we can rely on that until
ffmpeg changes their api again.

So, if the compilor[1] specifies --with-ffmpeg-incl, we will expect
to find either .../ffmpeg/{avcodec.h,avformat.h} or
.../{libavcodec/avcodec.h,libavformat/avformat.h}.

We'll also search in incllist for those header files.

We only explicitly need avcodec.h and avformat.h.  The only way
avutil.h and be missing or not findable is if ffmpeg has been
improperly installed, which isn't our problem.  We must assume a sane
even if variable system configuration.

The library files aren't a problem -- they're all in the same
subdirectory, no fooling around.


[1] compilor: a person using a compiler -- but does that mean that a
person using a hammer is a hammor??

-- 
--my blog is at    http://blog.russnelson.com   | Software that needs
Crynwr sells support for free software  | PGPok | documentation is software
521 Pleasant Valley Rd. | +1 315-323-1241       | that needs repair.
Potsdam, NY 13676-3213  |     Sheepdog          | 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]