Commit Graph

190 Commits

Author SHA1 Message Date
Max Kellermann 9c4e97a61b aac: detect whether to pass "uint32_t*" to NeAACDecInit2()
neaacdec.h declares all arguments as "unsigned long", but internally
expects uint32_t pointers.  This triggers gcc warnings on 64 bit
architectures.  To avoid that, make configure.ac detect whether we're
using Debian's corrected headers or the original libfaad headers.  In
any case, pass a pointer to an uint32_t, conditionally casted to
"unsigned long*".
2008-11-16 20:04:49 +01:00
Avuton Olrich 0efd80d2e5 MPD version 0.14~alpha3 2008-11-14 10:29:06 -08:00
Avuton Olrich 3eb9b3218d MPD version 0.14~alpha2 2008-11-13 14:43:10 +01:00
Max Kellermann 343f2ac3fc configure.ac: enable _ogg_common.c when flac is enabled
The build failed when the oggvorbis and oggflac decoders were
disabled, because the flac decoder references a symbol from
_ogg_common.c.
2008-11-07 17:21:21 +01:00
Max Kellermann 2172505f5c configure.ac: added AC_CONFIG_SRCDIR 2008-11-07 17:14:52 +01:00
Max Kellermann 91c1a279e4 MPD version 0.14~alpha1
First alpha version for the upcoming version 0.14.
2008-11-05 21:50:53 +01:00
Max Kellermann 259c6ed164 enable GLib threading
Call g_thread_init() from main() to enable the GLib features which
make it thread safe.
2008-11-05 18:21:49 +01:00
Max Kellermann 104d5120c9 configure.ac: check for avcodec_decode_audio2()
Disable the ffmpeg decoder plugin if avcodec_decode_audio2() is not
available.
2008-11-04 17:42:37 +01:00
Max Kellermann 792711bddd configure.ac: unset MP4FF_LIBS when MP4 support is disabled
Although there is no AC_SUBST when $enable_mp4=no, autoconf
substitutes its value in Makefile.am.  Clear it in this case.
2008-11-04 07:46:47 +01:00
Avuton Olrich b54348a1e5 configure.ac: disable libflac's oggflac support with --disable-oggflac
The configure flag "--disable-oggflac" disabled only liboggflac.
2008-11-03 17:35:16 +01:00
Max Kellermann dda8fc4f6b configure.ac: AC_SUBST(MP4FF_LIBS)
The AC_SUBST() call was missing in the previous patch.
2008-11-03 17:35:06 +01:00
Max Kellermann f70dccdce1 configure.ac: separate the "aac" and "mp4" decoder tests
MPD used to have a copy of the mp4ff library.  Since that has been
removed, AAC suport was disabled when there was no libmp4ff.  Separate
the libmp4ff test, and enable AAC support no matter if libmp4ff is
available.
2008-11-03 16:48:12 +01:00
Max Kellermann 355108666c configure.ac: fix "xyes: command not found"
Due to a missing "test", the "xyes" token was interpreted as a
command.
2008-10-26 22:03:26 +01:00
Max Kellermann 0800c6f4ca output: don't compile plugins which are disabled
Don't compile the sources of disabled output plugins at all.
2008-10-26 21:58:37 +01:00
Max Kellermann 3609de8685 http: use libcurl
MPD's HTTP client code has always been broken, no matter how effort
was put into fixing it.  Replace it with libcurl, which is known to be
quite stable.  This adds a fat library dependency, but only for people
who need streaming.
2008-10-26 19:32:43 +01:00
Max Kellermann cbc71191f0 configure.ac: reverted protocol version to 0.14.0
Several clients refuse to accept the protocol version "0.14~git",
because they think it is malformed.  This is clearly a client bug, but
we cannot wait for all clients to fix this bug right now.  For now,
change the version back to "0.14.0".
2008-10-26 10:32:20 +01:00
Max Kellermann f9d52dc968 configure.ac: changed version number to "0.14~git"
For testers, it should be clear that they're not using version 0.14.0
final, but an inofficial intermediate version from the git repository.
The protocol version is set to the same string, since the protocol is
subject to change during MPD development.
2008-10-25 21:23:54 +02:00
Max Kellermann befecb1d47 configure.ac: disable libtool
Since we're not building the local mp4ff library anymore, we can
remove AC_PROG_LIBTOOL.
2008-10-25 21:23:52 +02:00
Max Kellermann 1110a6d410 removed internal copy of libmp4ff
MPD shouldn't integrate sources of other libraries.  Since libmp4ff is
part of libfaad, we should remove the old copy from src/mp4ff and link
with the current version from libfaad instead.
2008-10-25 20:59:36 +02:00
Max Kellermann 8b4829c2fe pcm_resample: support for libsamplerate < 0.1.3
libsamplerate 0.1.2 didn't have the 32 bit <-> float conversion
routines.  Emulate them in case they aren't supported.
2008-10-24 08:41:34 +02:00
Max Kellermann 6b1c54ef96 pcm_utils: moved code to pcm_resample.c
Separate the resampling code from the rest of pcm_utils.c.  Create two
sub-libraries: pcm_resample_libsamplerate.c and
pcm_resample_fallback.c.
2008-10-23 20:00:51 +02:00
Max Kellermann e4df17f611 ffmpeg: link with libavutil
Since ffmpeg svn r13528, you have to link with libavutil manually.
2008-10-21 08:46:51 +02:00
Max Kellermann def97411f2 ffmpeg: detect which ffmpeg headers should be included
Since ffmpeg svn r12865, you have to include libavcodec/avcodec.h
instead of avcodec.h.  This cannot be checked at compile time, instead
we have to add a check to configure.ac.  Viliam's original ffmpeg
plugin was based on the newer ffmpeg library, while my Debian
installation had the older version.  My attempt to correct his include
statements wasn't correct after all.
2008-10-21 08:34:19 +02:00
Andrzej Rybczak 7487f9810c configure.ac: use libmikmod-config instead of pkg-config
[mk: use AC_SUBST instead of appending to MPD_CFLAGS / MPD_LIBS]
2008-10-18 18:34:00 +02:00
Max Kellermann 90fdf07aa9 Makefile.am: require automake 1.9
With heavy use of conditionals, I broke Makefile.am for the ancient
automake version 1.6.  Instead of supporting this automake version
forever, I'm removing support for it now.  Since automake isn't
required on the build machine, nobody should have a serious problem
with that.
2008-10-18 07:21:04 +02:00
Max Kellermann eace565212 reverted package name to "mpd"
Since mpd-mk has become the "official" MPD, the rename from commit
ba892cbc can be reverted.
2008-10-17 23:59:39 +02:00
Max Kellermann ae6ca0b8af configure.ac: test $with_zeroconf!=no
Patch 25b5d90e broke zeroconf compilation, because it assumed that
$with_zeroconf was set to "yes", although it can be either "bonjour"
or "avahi".
2008-10-17 22:48:43 +02:00
Viliam Mateicka 11ad997141 ffmpeg: new decoder plugin
[mk: fixed indent, changed copyright statement, added autoconf test,
fixed includes paths, fixed 2 gcc warnings, don't close input stream
twice]
2008-10-17 22:27:33 +02:00
Max Kellermann 4ee8da2e69 Makefile.am: don't compile disabled decoder plugins
Don't compile the sources of disabled decoder plugins at all, and
don't attempt to register these.
2008-10-17 21:57:09 +02:00
Max Kellermann 25b5d90e44 Makefile.am: don't compile disabled sources
If a feature is disabled, don't compile the source file at all,
disable it completely in Makefile.am instead.
2008-10-17 21:13:23 +02:00
Max Kellermann 9b5ce27c3b configure.ac: check if "struct ucred" is available
By default, glibc 2.8 hides struct ucred behind the _GNU_SOURCE
macro.  I don't want to enable that globally, because it may encourage
the use of non-portable functions.  Test if "struct ucred" is
available, and enable _GNU_SOURCE if required.

For details about that issue, see glib's bug database:

 http://sources.redhat.com/bugzilla/show_bug.cgi?id=6545
2008-10-16 14:59:26 +02:00
Max Kellermann 3b20fa4f3f configure.ac: reformatted AC_ARG_ENABLE section
Make the configure.ac script more readable by wrapping lines and using
proper indentation.
2008-10-16 08:40:55 +02:00
Max Kellermann b53365949a configure.ac: find more libraries with pkg-config
Detect the following libraries with pkg-config: libshout, libid3tag,
libmad.
2008-10-16 08:33:29 +02:00
Max Kellermann da83f2bbe7 configure.ac: removed iconv option
We're using GLib's character set conversion functions instead of iconv
now.
2008-10-16 08:31:21 +02:00
Max Kellermann 92513c3309 shout: check for vorbisenc library
The switch from ogg.m4 to pkg-config intentionally disabled
libvorbisenc.  Enable it when shout_ogg is used.
2008-10-15 20:40:04 +02:00
Enrico Weigelt 30cd345581 fixing several imports to work via pkg-config
This patch fixes several imports to use pkg-config instead of certain
esoteric tests.
2008-10-15 20:39:46 +02:00
Max Kellermann e89599eaad use GLib
GLib is a nice and portable utility library.  We are going to use it
from now on, and eliminate a lot of duplicated code from MPD.  Why
invent the wheel again and again?
2008-10-15 19:35:04 +02:00
Max Kellermann df5f16b54e configure.ac: enable unix socket support by default 2008-10-14 17:23:14 +02:00
Max Kellermann 50ecbec3de configure.ac: removed deprecated checks
Removed some configure checks which aren't used anymore since we use
C99.
2008-10-14 17:23:11 +02:00
Max Kellermann 731c629c6a configure.ac: disabled the C++ and fortran checks
Why check for C++ and fortran compilers?  This hack was borrowed from
Qball's gmpc git repository.
2008-10-14 17:23:06 +02:00
Max Kellermann e9ed10de3a configure.ac: added --enable-debug, --enable-werror, --enable-profile
Add more configure options which control how MPD is compiled.
--enable-debug is always enabled, until there is a stable release.
2008-10-14 17:23:00 +02:00
Max Kellermann b0c1cf7590 configure.ac: enable -pedantic
Yet another gcc flag which gives us lots of interesting warnings.
2008-10-14 17:21:58 +02:00
Max Kellermann 37b69759da configure.ac: moved CFLAGS checks down
Some warning flags may cause errors during library detection code.  Do
the CFLAGS checks at the end.
2008-10-14 17:21:51 +02:00
Max Kellermann ba892cbcb0 changed package name to "mpd-mk", updated version number
This git branch has become a real MPD fork now.  Time to change the
package name to the code name "mpd-mk".  Set the version number to
"0.14~git" to mark this as a non-released version.
2008-10-14 17:21:27 +02:00
Eric Wong a792dc5b93 autotools: add pthreads linker support
This is needed for people that don't use any of the following:
JACK, ALSA, libmikmod, Shout.
2008-10-06 18:52:48 +02:00
Max Kellermann 798eeeee63 require a C99 compiler
C99 will soon have its 10th birthday.  Let's not beat the dead C89
horse, and raise the compiler requirements.  From now on, we need a
C99 compiler.  This adds "-std=gnu99" to the GCC compiler options, in
case GCC is used.
2008-09-29 15:51:02 +02:00
Max Kellermann 9899ab5ac2 properly configure the M4 macro directory
Add information about the M4 macro dir ./m4/ to both configure.ac and
Makefile.am.
2008-09-23 22:38:46 +02:00
Eric Wollesen 5f8eebd122 shout: added mp3 encoder
[mk: moved this patch after "Refactor and cleanup of shout Ogg and MP3
audio outputs".  The original commit message follows, although it is
outdated:]

Creation of shout_mp3 audio output plugin. Basically I just copied the
existing shout plugin and replaced ogg with lame. Uses lame for mp3
encoding. Next step is to pull common functionality out of each shout
plugin and share it between them.

Configuration options for "shout_mp3" are the same as for "shout".
2008-09-12 16:05:23 +02:00
Eric Wollesen 4970c42c86 shout: introduce pluggable encoder API
I've perhaps gone a bit overboard, but here's the current rundown:

Both Ogg and MP3 use the "shout" audio output plugin.  The shout audio
output plugin itself has two new plugins, one for the Ogg encoder,
and another for the MP3 (LAME) encoder.

Configuration for an Ogg stream doesn't change.  For an MP3 stream,
configuration is the same as Ogg, with two exceptions.  First, you must
specify the optional "encoding" parameter, which should be set to "mp3".
See mpd.conf(5) for more details.  Second, the "quality" parameter is
reversed for LAME, such that 1 is high quality for LAME, whereas 10 is
high quality for Ogg.

I've decomposed the code so that all libshout related operations
are done in audioOutput_shout.c, all Ogg specific functions are in
audioOutput_shout_ogg.c, and of course then all LAME specific functions
are handled in audioOutput_shout_mp3.c.

To develop encoder plugins for the shout audio output plugin, I basically
just mimicked the plugin system used for audio outputs.  This might be
overkill, but hopefully if anyone ever wants to support some other sort
of stream, like maybe AAC, FLAC, or WMA (hey it could happen), they will
hopefully be all set.

The Ogg encoder is slightly less optimal under this configuration.
It used to send shout data directly out of its ogg_page structures.  Now,
in the interest of encapsulation, it copies the data from its ogg_page
structures into a buffer provided by the shout audio output plugin (see
audioOutput_shout_ogg.c, line 77.)  I suspect the performance impact
is negligible.

As for metadata, I'm pretty sure they'll both work.  I wrote up a test
scaffold that would create a fake tag, and tell the plugin to send it
out to the stream every few seconds.  It seemed to work fine.  Of course,
if something does break, I'll be glad to fix it.

Lastly, I've renamed lots of things into snake_case, in keeping with
normalperson's wishes in that regard.

[mk: moved the MP3 patch after this one.  Splitted this patch into
several parts; the others were already applied before this one.  Fixed
a bunch GCC warnings and wrong whitespace modifications.  Made it
compile with mpd-mk by adapting to its prototypes]
2008-09-12 16:04:40 +02:00
Eric Wong b67bb05d05 build: enable -Wcast-qual -Wwrite-strings CFLAGS
We're pretty careful about using const these days, so
enable these warnings to keep us that way.
2008-09-07 18:37:29 +02:00