Commit Graph

1221 Commits

Author SHA1 Message Date
Max Kellermann
c7b1038a9d Merge branch 'v0.18.x' 2013-12-14 12:37:16 +01:00
Max Kellermann
af4133e3c9 Util/StringUtil: add StringStartsWith()
Replaces GLib's g_str_has_prefix().
2013-11-28 18:48:35 +01:00
Max Kellermann
f90abe9530 include cleanup using iwyu 2013-11-28 11:50:54 +01:00
Max Kellermann
47c50c079d decoder/ffmpeg: use IgnoreError instead of local Error instance 2013-11-28 00:05:26 +01:00
Max Kellermann
73f45d87d5 decoder/{dsf,dsdiff}: eliminate useless assignments 2013-11-23 18:30:12 +01:00
Denis Krjuchkov
0bcc477d46 decoder/OggFind.cxx: include stdio.h for SEEK_END definition 2013-11-18 16:28:39 +06:00
Jurgen Kramer
47d3758820 decoder/dsdiff: fix byte order bug 2013-11-10 16:49:39 +01:00
Jurgen Kramer
f4b61e8c8d decoder/dsf: enable DSD128 2013-11-05 17:38:48 +01:00
Max Kellermann
ecf12a60e8 Log: add level "DEFAULT"
Map LogLevel::INFO to G_LOG_LEVEL_INFO, and LogLevel::DEFAULT to
G_LOG_LEVEL_MESSAGE.  Now client connect/disconnect message are only
logged on log_level "secure".
2013-11-04 22:27:49 +01:00
Max Kellermann
8555b65c50 *: update copyright year to 2013 2013-10-30 23:37:06 +01:00
Max Kellermann
20597b3632 *: use nullptr instead of NULL 2013-10-28 23:58:17 +01:00
Max Kellermann
4728735acf decoder/dsf: don't play junk at the end of the "data" chunk 2013-10-28 23:47:25 +01:00
Max Kellermann
9dcbd005f0 decoder/dsf: add range check 2013-10-28 23:41:51 +01:00
Max Kellermann
0ad2eb34c7 decoder/dsdlib: add class DsdUint64
Merge lots of duplicate code.
2013-10-28 23:29:23 +01:00
Max Kellermann
0e8a15e813 decoder/dsdlib: include cleanup 2013-10-28 23:26:37 +01:00
Max Kellermann
5b0d6a59cf decoder/dsdlib: move API documentation to header 2013-10-28 23:26:16 +01:00
Max Kellermann
fd3dc7e5fb decoder/dsdlib: convert struct dsdlib_id to a class 2013-10-28 23:12:48 +01:00
Max Kellermann
85ae7e9c9a DecoderControl: move code/attributes to new class MixRampInfo 2013-10-26 14:19:34 +02:00
Max Kellermann
d6e28c42e5 ReplayGainInfo: refactor to a class 2013-10-25 19:12:46 +02:00
Max Kellermann
6d475c40de ReplayGainInfo: use CamelCase for struct name 2013-10-25 19:12:38 +02:00
Max Kellermann
ac8e5be9f4 decoder/opus: support replay gain
Parse the R128_TRACK_GAIN comment string.
2013-10-24 23:56:06 +02:00
Max Kellermann
c76952534e decoder/Opus: implement seeking 2013-10-24 23:26:58 +02:00
Max Kellermann
f0060718de decoder/opus: provide time stamps
Call decoder_timestamp().  This is not necessary currently, but will
be as soon as we implement seeking.
2013-10-24 23:26:54 +02:00
Max Kellermann
982ab9e496 decoder/opus: show song duration during playback
This requires seeking to the end-of-stream, checking its granulepos,
and then seeking back to the previous file position.  We do this only
for local files.
2013-10-24 23:26:46 +02:00
Max Kellermann
b74bcf2274 decoder/opus: call ogg_stream_reset() in OggSeekPageAtOffset() 2013-10-24 23:23:23 +02:00
Max Kellermann
dc328e0c4a decoder/opus: move code to OggSeekPageAtOffset() 2013-10-24 20:40:23 +02:00
Max Kellermann
92c85bd20d decoder/opus: move SeekFindEOS() to OggFind.cxx 2013-10-24 20:33:12 +02:00
Max Kellermann
f629eb8cb2 decoder/opus: make opus_sample_rate constexpr 2013-10-24 20:14:47 +02:00
Max Kellermann
e4f41ff61d decoder/opus: use std::copy_n() instead of memcpy() 2013-10-24 20:06:50 +02:00
Max Kellermann
dae6ecb680 decoder/opus: support all core tag names 2013-10-24 20:01:14 +02:00
Max Kellermann
a57a7b1a76 decoder/opus: move code to ParseOpusTagName() 2013-10-24 20:01:14 +02:00
Max Kellermann
03073b366b decoder/opus: use delete[] for the OpusReader::ReadString() result 2013-10-24 20:01:14 +02:00
Max Kellermann
0a5c991ab5 decoder/wavpack: move variable declarations 2013-10-23 23:20:55 +02:00
Max Kellermann
93deb84499 input_stream: rename struct to InputStream 2013-10-23 23:12:02 +02:00
Max Kellermann
f1027ed198 InputStream: add method Rewind() 2013-10-23 21:58:44 +02:00
Max Kellermann
10bc1a9acc decoder/flac: fix tag name comparison 2013-10-22 01:05:09 +02:00
Max Kellermann
82059645f1 decoder: rename the struct to "Decoder" 2013-10-21 21:12:37 +02:00
Max Kellermann
72af3c0489 decoder_plugin: rename struct to DecoderPlugin 2013-10-21 20:31:34 +02:00
Max Kellermann
65e54f6ed1 decoder/modplug: use WritableBuffer instead of GByteArray
Eliminate the temporary buffer, do I/O right into the WritableBuffer.
2013-10-21 20:22:53 +02:00
Max Kellermann
10196496f3 decoder/modplug: move code to LoadModPlugFile() 2013-10-21 20:19:27 +02:00
Max Kellermann
222dc8a239 Util/ASCII: add StringEqualsCaseASCII() overload with length
Replaces GLib's g_ascii_strncasecmp().
2013-10-21 08:42:55 +02:00
Max Kellermann
0e4d2e7277 Util/ASCII: add function StringEqualsCaseASCII()
Replaces GLib's g_ascii_strcasecmp().
2013-10-20 23:09:51 +02:00
Max Kellermann
a78b2d84ed TagType: rename enum tag_type to TagType 2013-10-20 13:32:59 +02:00
Max Kellermann
c1e7be3b8e decoder/sidplay: add header file 2013-10-20 13:05:50 +02:00
Max Kellermann
17ecc56e83 decoder/sidplay: update file name 2013-10-20 13:03:58 +02:00
Max Kellermann
59f8144c50 *: use nullptr instead of NULL 2013-10-19 18:19:03 +02:00
Max Kellermann
1373d40fea decoder/mpg123: use const_cast instead of g_strdup() 2013-10-19 17:46:00 +02:00
Max Kellermann
39e2ffe212 decoder/mikmod: use const_cast instead of g_strdup() 2013-10-19 17:30:56 +02:00
Max Kellermann
5dc4cbdf82 util/FormatString: new library to replace g_strdup_printf() 2013-10-19 17:24:21 +02:00
Max Kellermann
1434e5a22e decoder/gme,input/curl,...: use static buffers instead of g_strdup_printf() 2013-10-19 17:15:17 +02:00
Sebastian Thorarensen
db44a6e948 decoder/modplug: Add "loop_count" parameter
The "loop_count" configuration parameter allows the user to set how
many times a module with backward loops shall loop. "0" (the default)
means a module is not allowed to use backward loops at all. "-1"
enables inifinite looping.
2013-10-19 16:12:17 +02:00
Sebastian Thorarensen
b6ac249c3c decoder/mikmod: Add loop configuration parameter
This patch allows the user to configure the mikmod decoder plugin to loop
modules. It adds a configuration parameter to the mikmod decoder called
"loop" which can be "no" (the old behaviour, default) or "yes" to allow
modules to use backward loops.
2013-10-18 14:23:24 +02:00
Max Kellermann
abfbd55305 fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being
responsible for allocation/deallocation.  The FileSystem.hxx library
accepts Path arguments instead of AllocatedPath, to avoid forcing
callers to allocate another string object.
2013-10-17 23:43:46 +02:00
Max Kellermann
05de2e998c InputStream: use int64_t instead of goffset
Decouple some more from GLib.
2013-10-17 10:45:10 +02:00
Max Kellermann
d6967db761 decoder/wildmidi: remove suport for libwildmidi 0.2.2 or older 2013-10-16 23:57:26 +02:00
Max Kellermann
5e26e2ab1d system/ByteOrder: new library for byte ordering / endianess
Replacing GLib macros.
2013-10-16 22:09:44 +02:00
Max Kellermann
6b2b5af344 util/byte_reverse: convert to C++ 2013-10-16 22:07:52 +02:00
Max Kellermann
509f8dab89 Util/Macros: replacement for GLib's G_N_ELEMENTS() 2013-10-15 22:47:39 +02:00
Max Kellermann
be2951b45f gcc.h: rename to Compiler.h 2013-10-15 09:21:59 +02:00
Max Kellermann
17c6db6c33 replay_gain_*.h: rename to *.hxx 2013-10-02 12:22:12 +02:00
Max Kellermann
060814daa8 Log: new logging library API
Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
2013-10-02 08:57:55 +02:00
Max Kellermann
c5d05ac0cf DecoderCommand: convert to strictly-typed enum 2013-09-27 12:11:37 +02:00
Max Kellermann
52ee132d92 TagHandler: use a TagBuilder internally
Reduce heap allocator overhead.
2013-09-26 17:35:08 +02:00
Max Kellermann
d7b0073ce1 decoder/modplug: fix include directory
Since Debian package 1:0.8.8.4-4, the pkg-config file does not contain
-I/usr/include/libmodplug anymore, and we need to add the
"libmodplug/" prefix to the #include line.
2013-09-26 17:27:35 +02:00
Max Kellermann
3f267b1795 Tag, ...: move to libtag.a 2013-09-05 18:26:56 +02:00
Max Kellermann
7a4c9f5f4c mpd_error.h: remove obsolete header
Migrate the remaining callers to FatalError().
2013-09-05 18:26:46 +02:00
Max Kellermann
26d92c80ed conf.h: remove obsolete header
Use only ConfigData.hxx in plugin sources to reduce header
dependencies.
2013-09-05 08:47:10 +02:00
Max Kellermann
7d0269d2ce InputLegacy: move functions to the input_stream class 2013-09-05 00:23:14 +02:00
Max Kellermann
681d6bbdc5 TagTable: un-inline the two functions
Reduce header dependencies.
2013-09-04 23:57:30 +02:00
Max Kellermann
867b82b6de Tag*: move TagTable.hxx to libtag.a 2013-09-04 23:54:37 +02:00
Max Kellermann
5101ef4b02 Tag*: move libtag.a sources to src/tag/ 2013-09-04 23:46:20 +02:00
Max Kellermann
29030b54c9 util/Error: new error passing library
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann
85216966fa decoder/wildmidi: use class Path for the "timidity.cfg" location 2013-08-10 11:52:31 +02:00
Alexis Ballier
3f846cf6b8 FfmpegDecoderPlugin: Allocate the interleaved buffer as needed instead of using an arbitrary big constant.
Also, save a memcpy when FFmpeg outputs interleaved audio.

Fixes build with FFmpeg 2.0.
2013-08-07 15:07:41 +02:00
Max Kellermann
498491ec05 decoder/ffmpeg: convert struct mpd_ffmpeg_stream to a class 2013-08-05 00:15:25 +02:00
Max Kellermann
85b77b81ca *: use gcc.h macros instead of GLib 2013-08-04 23:48:01 +02:00
Max Kellermann
9326ce53ec Merge tag 'release-0.17.5' 2013-08-04 14:36:22 +02:00
Justin Riley
3a34fd181d FfmpegDecoderPlugin: add application/flv to mime types list 2013-08-04 14:20:16 +02:00
Max Kellermann
7a1d466fb2 DecoderPlugin: pass config_param reference 2013-08-04 13:30:47 +02:00
Max Kellermann
d1e7b4e381 audio_format: convert to C++ 2013-08-03 21:37:56 +02:00
Max Kellermann
67f591a9ce gcc.h: add macro gcc_unreachable() 2013-08-03 21:34:17 +02:00
Christoph Mende
7ff988275f decoder/mikmod: use MikMod_free() to free the title on libmikmod-3.2
Player_LoadTitle() returns an aligned pointer in libmikmod-3.2 that
cannot be freed with free(). The correct way to do this now is
MikMod_free() which extracts the original pointer from the buffer and
frees that.

Signed-off-by: Christoph Mende <mende.christoph@gmail.com>
2013-08-01 09:30:20 +02:00
Max Kellermann
8b2dcf7018 decoder/ffmpeg: require ffmpeg/libav 0.8
Now that even Debian stable has picked up version 0.8, we can safely
make this a requirement, and remove a lot of old cruft.
2013-07-31 01:01:21 +02:00
Max Kellermann
8ead8f7ea6 decoder/mpcdec: remove support for the "old" API
This old version has been obsolete for many years - time to remove it.
2013-07-31 00:43:21 +02:00
Max Kellermann
7f9402bd22 Tag: add method Clear()
Allow reusing Tag instances.
2013-07-31 00:35:05 +02:00
Max Kellermann
cbd38327e7 DecoderAPI: pass rvalue reference to decoder_tag()
Avoid duplicating the tag.
2013-07-31 00:34:22 +02:00
Max Kellermann
06f898cc12 tag: convert to C++ 2013-07-30 20:19:53 +02:00
Max Kellermann
28030d7edb include cleanup 2013-07-30 08:39:21 +02:00
Max Kellermann
c75cb67c44 pcm_buffer: convert to C++ 2013-07-30 08:31:02 +02:00
Max Kellermann
43166130b5 audio_check: convert to C++ 2013-07-29 07:50:08 +02:00
Max Kellermann
14f21378e3 tag_table: convert to C++ 2013-07-29 07:45:58 +02:00
Max Kellermann
bd42aeab46 XiphTags: convert to C++ 2013-07-29 07:42:50 +02:00
Max Kellermann
cde6a3a00c tag_handler: convert to C++ 2013-07-29 07:39:58 +02:00
Max Kellermann
96b763067e ape: convert to C++ 2013-07-29 07:39:36 +02:00
Max Kellermann
dd5ba062cc tag_id3: convert to C++ 2013-07-28 20:25:45 +02:00
Max Kellermann
43f613d9be decoder_api: convert to C++ 2013-07-28 13:18:48 +02:00
Max Kellermann
2277d143fa decoder/fluidsynth: convert to C++ 2013-07-28 13:16:27 +02:00
Max Kellermann
6b6d9e64bd decoder/pcm: convert to C++ 2013-07-28 13:10:05 +02:00
Max Kellermann
f016a99f24 decoder/mpcdec: convert to C++ 2013-07-28 13:04:12 +02:00
Max Kellermann
2eed9d64ce decoder/modplug: convert to C++ 2013-07-28 13:03:04 +02:00
Max Kellermann
1688b6dda9 decoder/mikmod: convert to C++ 2013-07-28 13:03:04 +02:00
Max Kellermann
33aedc887a decoder/wildmidi: convert to C++ 2013-07-28 13:03:04 +02:00
Max Kellermann
258d0ea97e decoder/mpg123: convert to C++ 2013-07-28 13:03:04 +02:00
Max Kellermann
d3641766a5 decoder/sndfile: convert to C++ 2013-07-28 12:48:26 +02:00
Max Kellermann
b25d5c5d33 decoder/audiofile: convert to C++ 2013-07-28 12:48:26 +02:00
Max Kellermann
352d7f477e decoder/{dsf,dsdiff}: convert to C++ 2013-07-28 12:20:50 +02:00
Max Kellermann
1fcf35ad3b tag_rva2: convert to C++ 2013-07-26 12:52:51 +02:00
Max Kellermann
c8054e569a decoder/mad: convert to C++ 2013-07-26 11:59:17 +02:00
Denis Krjuchkov
21dac6c05d decoder/FLAC*: rename files and symbols to Flac* 2013-05-06 23:36:47 +06:00
Max Kellermann
abaabe92d6 decoder_buffer: convert to C++ 2013-04-17 22:45:10 +02:00
Max Kellermann
257b42b87f decoder/faad: convert to C++ 2013-04-17 22:33:59 +02:00
Max Kellermann
c654c7630a pcm_*: move to src/pcm/ 2013-04-09 01:24:52 +02:00
Max Kellermann
14df240f5b OpusReader: don't use strndup()
Eliminate the fallback strndup() and strnlen() implementations.
2013-04-09 01:03:44 +02:00
Max Kellermann
7ec1121cc8 uri: convert to C++ 2013-04-08 23:45:31 +02:00
Max Kellermann
f84e288ad7 decoder/gme: fix rounding error
Cast to integer after multiplying with 1000.  Allows sub-second
seeking.
2013-04-08 23:45:21 +02:00
Max Kellermann
8e31366431 decoder/gme: convert to C++ 2013-04-08 23:32:53 +02:00
Max Kellermann
3477acee48 decoder/ffmpeg: suppress warning about unused variable
Only relevant for old ffmpeg versions.
2013-04-08 22:12:49 +02:00
Anton Khirnov
8becbb8b08 ffmpeg decoder plugin: do not allocate an AVFrame on stack.
AVFrame must be allocated with avcodec_alloc_frame().
2013-04-05 23:34:10 +02:00
Anton Khirnov
e0c2c77c2a ffmpeg decoder plugin: do not allocate an AVFrame on stack.
AVFrame must be allocated with avcodec_alloc_frame().
2013-04-05 23:30:47 +02:00
Max Kellermann
3b3c9334c8 decoder/Opus: replace non-static data member initializers
Would require gcc 4.7, and MPD attempts to be compatible with gcc 4.6.
2013-02-04 11:08:32 +01:00
Max Kellermann
3dd8beb380 decoder/faad: use the newer NeAAC* API
Drop support for the old faacDec* API.
2013-01-29 16:17:15 +01:00
Max Kellermann
76417d4446 InputStream: use std::string 2013-01-28 23:41:45 +01:00
Max Kellermann
cffc78ad6a InputStream: store references instead of pointers 2013-01-28 23:35:01 +01:00
Max Kellermann
0dd4b52b63 decoder/ffmpeg: require ffmpeg/libav 0.7.6
This is the version present in Ubuntu Oneiric, the oldest distribution
with gcc 4.6.  Debian Squeeze is off target, because it has gcc 4.4,
which is unable to compile MPD anyway.

This commit drops all API compatibility hacks for older versions.
2013-01-28 21:32:14 +01:00
Max Kellermann
88c17926e4 decoder/mp4ff: delete obsolete plugin
The underlying library has been obsolete for many years.
2013-01-28 21:32:14 +01:00
Max Kellermann
6f3d70b5e2 DecoderControl, InputStream: use Mutex/Cond instead of GMutex/GCond 2013-01-27 18:39:32 +01:00
Max Kellermann
0273cd44b0 input_stream: forward-declare the struct
Hide the definition from C code, to prepare the transition to C++.
2013-01-26 01:24:01 +01:00
Max Kellermann
ba49f20f68 decoder/ffmpeg: convert to C++ 2013-01-26 01:17:43 +01:00
Max Kellermann
74500eacca Merge branch 'v0.17.x' 2013-01-16 20:05:26 +01:00
Brice Jaglin
1105e61f29 decoder/ffmpeg: support float planar audio 2013-01-16 19:54:54 +01:00
Denis Krjuchkov
a98aa66620 string_util.c: provide fallback strndup() implementation
This patch also adds extern "C" { } wrapper around string_util.h
to allow its usage in C++ code
2013-01-11 13:51:39 +06:00
Max Kellermann
3dd38e7b7f decoder/wavpack: convert to C++ 2013-01-10 18:18:14 +01:00
Max Kellermann
3711a97657 decoder/wavpack: include cleanup 2013-01-10 18:18:02 +01:00
Max Kellermann
bf4311cd9b decoder/OggUtil,Opus: move code to new class OggSyncState 2013-01-08 11:04:14 +01:00
Max Kellermann
8f7adf79a3 decoder/Opus: read total time 2013-01-08 01:38:02 +01:00
Max Kellermann
97b164d03b decoder/OggUtil: add OggExpectPageSeek() 2013-01-08 01:30:44 +01:00
Max Kellermann
61e7e531c2 decoder/Opus: move page reader into the decoder class 2013-01-08 01:22:11 +01:00
Max Kellermann
ceb652915f decoder/Opus: move code to HandlePackets() 2013-01-08 01:20:03 +01:00
Max Kellermann
cdaf504ab8 decoder/Opus: make internal methods inline 2013-01-08 01:19:18 +01:00
Max Kellermann
9fb5aad157 decoder/OggUtil: add OggExpectFirstPage() and OggExpectPageIn() 2013-01-08 01:08:01 +01:00
Max Kellermann
a6301d45f4 decoder/Opus: use OggExpectPage() in main loop 2013-01-08 01:05:59 +01:00
Max Kellermann
b83d069266 decoder/OggUtil: add struct forward declarations 2013-01-08 01:02:06 +01:00
Max Kellermann
960b9a9664 input_stream: add method _cheap_seeking()
Move code from the Vorbis decoder plugin.
2013-01-07 23:25:08 +01:00
Max Kellermann
acb45caa42 decoder/ogg_codec: convert to C++ 2013-01-07 22:14:52 +01:00
Max Kellermann
39060b528a decoder/vorbis: convert to C++ 2013-01-07 22:04:58 +01:00
Max Kellermann
975370c084 decoder_api.h, ...: add "extern C" 2013-01-07 10:07:40 +01:00
Max Kellermann
46ed91b53d DecoderAPI: _replay_gain() returns void
Let the function decoder_replay_gain() update
decoder_control::replay_gain_db instead of letting each decoder plugin
take care for that.
2013-01-05 02:40:29 +01:00
Max Kellermann
22f0ef6d6b don't include stdbool.h in C++ sources
The "bool" type is built-in.
2013-01-02 20:56:04 +01:00
Jurgen Kramer
dc32d1f3f3 Add tag support for DSD (DSDIFF & DSF) decoders 2012-10-27 11:42:34 +02:00
Max Kellermann
cbdaa1369f Merge branch 'v0.17.x'
Conflicts:
	src/PlaylistSave.cxx
2012-10-05 17:12:44 +02:00
Max Kellermann
d4b5699403 decoder/ffmpeg: support planar audio
Implements Mantis feature request 3582.
2012-10-05 16:40:25 +02:00
Max Kellermann
1dc27be015 decoder/ffmpeg: fix playback of planar PCM data
Interleaving was completely wrong.  This code was never used, so it
didn't have an effect.
2012-10-05 16:38:55 +02:00
Max Kellermann
230a3eb400 decoder/ffmpeg: move code to copy_interleave_frame2() 2012-10-05 16:37:07 +02:00
Max Kellermann
e39382dedd decoder/ffmpeg: ignore negative time stamps
Works around assertion failure in decoder_timestamp().
2012-10-05 16:37:07 +02:00
Max Kellermann
fd016f4507 decoder/ffmpeg: show unsupported sample format name
Use av_get_sample_fmt_string() to obtain a human-readable string.
2012-10-05 15:24:53 +02:00
Max Kellermann
9d728b365d decoder/ffmpeg: pass AVSampleFormat to ffmpeg_sample_format()
API simplification.
2012-10-05 15:14:57 +02:00
Max Kellermann
ddc0283339 decoder/ffmpeg: remove duplicate sample format error message 2012-10-05 14:52:30 +02:00
Max Kellermann
b8fdb452be decoder/flac: support FLAC files inside archives
Implement the "scan_stream" method that can read tags from any
input_stream object.  This requires a FLAC__IOCallbacks implementation
based on the input_stream API.
2012-10-04 10:37:09 +02:00
Max Kellermann
6b416ce6be decoder/flac: move flac_scan_file2() to main plugin file 2012-10-04 10:32:52 +02:00
Max Kellermann
ebd90dbb1a decoder/flac: move callbacks to class FLACInput 2012-10-02 19:59:49 +02:00
Max Kellermann
c9e700f079 decoder/flac: add ctor/dtor to struct flac_data 2012-10-02 19:47:31 +02:00
Max Kellermann
3c2d73d161 decoder/flac: add method FLACMetadataChain::Scan()
Merge common code.
2012-10-02 18:24:15 +02:00
Max Kellermann
343de8b8ab decoder/flac: don't use FLAC__Metadata_SimpleIterator
Use the new FLACMetadataIterator C++ class, which is more powerful.
2012-10-02 17:38:21 +02:00
Max Kellermann
c645b906f3 decoder/flac: add C++ libFLAC wrappers
Not using libFLAC++ because this library adds a lot of overhead due to
virtual method calls.  This new class library is zero-overhead.
2012-10-02 17:37:07 +02:00
Max Kellermann
9c1d1ef268 decoder/flac: eliminate the obsolete "track number" code
This has been deprecated by the "embcue" playlist plugin.
2012-10-02 17:36:54 +02:00
Max Kellermann
e5fd1924db decoder/flac: remove unused function flac_tag_load() 2012-10-02 11:39:10 +02:00
Max Kellermann
cbdd042adc decoder/flac: use C++ compiler 2012-10-02 10:59:56 +02:00
Max Kellermann
ccd7104cdc {decoder,encoder}/flac: drop support for libFLAC 1.1 2012-10-02 10:04:44 +02:00
Max Kellermann
33364edfb3 decoder/adplug: new decoder plugin 2012-09-25 22:03:44 +02:00
Simon Hosie
5e9ccdec63 decoder/vorbis: skip 16 bit quantisation, provide float samples
Internally the vorbis (non-Tremor) decoder is working in floating
point, and it's not really necessary to cut the output back to 16-bit
if the soundcard or OS supports higher resolution.

The decoder can be trivially modified to bypass its internal
quantisation and produce floating-point output, and a separate
quantisation can be used as appropriate to the platform.
2012-09-25 21:27:50 +02:00
Max Kellermann
071aca60be decoder/vorbis: rename local variables 2012-09-25 21:26:27 +02:00
Max Kellermann
133e4d5c51 decoder/vorbis: improved support for initial seek
Call decoder_get_command() before doing anything else.
2012-09-25 21:26:27 +02:00
Max Kellermann
fd56461d5f decoder/vorbis: make variables more local 2012-09-25 21:11:38 +02:00
Max Kellermann
e2a574e2a0 Merge branch 'v0.17.x'
Conflicts:
	src/locate.c
2012-09-25 11:39:01 +02:00
Max Kellermann
ba6ef53ef9 decoder_control: remove MixRamp debug messages
These are confusing, and since MixRamp development has ceased, not
useful to anybody.
2012-09-25 11:08:16 +02:00
Max Kellermann
7088a679a2 decoder/wavpack: support all APEv2 tags
WavPack tags are always APEv2, by definition.  Reuse the tag_table
from tag_ape.c, instead of rolling our own.
2012-09-25 09:37:16 +02:00
Max Kellermann
1536b5a9d6 src/decoder/opus: new decoder plugin for the Opus codec
Using libopus and libogg.
2012-09-05 23:01:17 +02:00
Max Kellermann
bab756a5d0 decoder/{flac,vorbis}: move tag table to XiphTags.c
Merge duplicate data.
2012-09-05 22:56:57 +02:00
Max Kellermann
7102ed8026 decoder/ogg_codec: return UNKNOWN on error 2012-09-04 13:46:12 +02:00
Max Kellermann
ebf481e1a1 decoder/ogg_common: rename to ogg_codec.c 2012-09-04 13:05:12 +02:00
Max Kellermann
5a52e91350 decoder/ogg_common: pass decoder to _type_detect()
Allow the function to be cancelled.
2012-09-04 12:49:02 +02:00
Max Kellermann
18e458154a decoder/ogg_common: apply coding style 2012-09-04 11:52:18 +02:00
Max Kellermann
015e1ab183 decoder/_ogg_common: rename to ogg_common.c 2012-09-04 11:28:36 +02:00
Max Kellermann
2a4c799471 Merge branch 'v0.17.x' 2012-09-04 11:28:13 +02:00
Max Kellermann
41487426f5 decoder/_ogg_common: fix buffer size check
Fixes potential access to uninitialised memory.
2012-09-04 11:22:15 +02:00
Max Kellermann
0d24250aa7 decoder/_ogg_common: simplify the large "if" expression 2012-09-04 11:22:05 +02:00
Max Kellermann
fb0a52a34a decoder/mad, output_thread: add gcc_unlikely() 2012-08-29 17:41:22 +02:00
Max Kellermann
efccb6ac82 Merge branch 'v0.17.x' 2012-08-15 01:04:34 +02:00
Max Kellermann
4a993cd79e decoder/fluidsynth: add "sample_rate" setting 2012-08-15 00:57:32 +02:00
Max Kellermann
02325d2ede decoder/fluidsynth: add "soundfont" setting
Replaces the old global "soundfont" which never worked.
2012-08-15 00:51:45 +02:00
Max Kellermann
9c83464b95 configure.ac: auto-detect libfluidsynth
Now that the libfluidsynth API was sanitized, we can enable the plugin
automatically if libfluidsynth is installed.
2012-08-15 00:48:52 +02:00
Max Kellermann
b1bbd70f0f decoder/fluidsynth: stop playback at end of file
Use libfluidsynth's new function fluid_player_get_status().
2012-08-15 00:47:10 +02:00
Max Kellermann
c31d11bfe0 decoder/fluidsynth: don't duplicate path
The libfluidsynth now accepts const strings.
2012-08-15 00:39:22 +02:00
Max Kellermann
c8ec85d649 decoder/fluidsynth: check if file is really a MIDI
Use fluid_is_midifile() to verify the file format.
2012-08-15 00:36:04 +02:00
Max Kellermann
e291f3d257 decoder/fluidsynth: remove throttle (requires libfluidsynth 1.1)
The libfluidsynth API is now sane, and does not require real-time
decoding.
2012-08-15 00:29:38 +02:00
Max Kellermann
8e331cfc65 gcc.h: re-add gcc_const and gcc_pure
Remove GLib dependency from some headers.
2012-08-02 19:12:18 +02:00
Max Kellermann
79200a8611 decoder/sidplay: fix C++ compiler warnings 2012-08-01 09:59:12 +02:00
Jurgen Kramer
d4d92ac1a7 Add song duration to DSF and DSDIFF DSD decoders. 2012-07-13 10:14:17 +02:00
Jurgen Kramer
7235dbadfd patch to split DSD decoder into separate decoders for DSF en DFF. Move common
functions to new dsdlib. Update user doc.
2012-06-27 09:54:24 +02:00
Max Kellermann
4eb57e1e9a Merge branch 'v0.16.x'
Conflicts:
	src/cmdline.c
	src/decoder/wildmidi_decoder_plugin.c
	src/gcc.h
	src/glib_compat.h
	src/input_stream.c
	src/output_list.c
	src/output_thread.c
	valgrind.suppressions
2012-06-12 23:22:03 +02:00
Denis Krjuchkov
25d053cbf2 Work around incorrect g_file_test() behavior on Win32
g_file_test is redefined to be g_file_test_utf8 and thus can't handle
non-ASCII characters. This fix adds simple wrapper (taken from glib)
that fixes encoding and calls g_file_test_utf8. All required inclusions
of glib_compat.h are added as well.
2012-06-12 19:31:19 +02:00
Max Kellermann
d662c4c0cc Merge branch 'v0.16.x'
Conflicts:
	NEWS
2012-05-29 23:46:10 +02:00
Jonathan Neuschäfer
cca9bc5176 decoder/ffmpeg: improve "decoding failed" message
"Frame skipped" might cause the impression that the decoding of a whole
song failed.
2012-05-29 22:46:27 +02:00
Jonathan Neuschäfer
8b6b25220d decoder/ffmpeg: add webm as a supported format 2012-05-29 22:38:40 +02:00
Jurgen Kramer
3c3f1b7ff2 Add support for DSF files to DSDIFF decoder - v4
Version 4 of my patch to add DSF support to the DSDIFF
decoder plugin.

This time I have taken a different approach and created a new
read_metadata function specific for reading DSF files. This saves an
indent (and for me a lot of indent nightmares) and also useful for
splitting the DSF and DFF decoders later on.

There are still a few lines which exceed the 80 character width limit by
a few chars. I was not able to stay within the limit and create (for me)
readable code.

Jurgen
2012-05-02 08:47:02 +02:00
Max Kellermann
a2b5db0003 audio_format: remove SAMPLE_FORMAT_DSD_OVER_USB
DSD-over-USB should not be a MPD core format, because it is not a
"natural" format; it is just a temnporary over-the-wire format.  This
format has been implemented in pcm_export, and does not need to be
supported by pcm_convert.
2012-03-27 01:22:50 +02:00
Max Kellermann
b99ecb4dc9 audio_format: remove the packed S24 format
For simplicity, the MPD core should not have to deal with packing.  It
is rarely used, and those plugins that need it should use the
pcm_export library instead.
2012-03-22 00:42:12 +01:00
Max Kellermann
7ebf8e66c9 decoder/pcm: always supply host byte order samples
Don't use audio_format.reverse_endian.
2012-03-21 19:10:57 +01:00
Max Kellermann
9c6a4505c8 audio_format: remove the format SAMPLE_FORMAT_DSD_LSBFIRST
This format is unused since the DSDIFF decoder plugin now reverses the
bit order.
2012-03-21 09:06:48 +01:00
Max Kellermann
238c3adad1 decoder/dsdiff: reverse bits to most significant bit first
Allow to remove this complexity from the MPD core.
2012-03-21 09:01:56 +01:00
Max Kellermann
08ce24ec3f audio_format: basic support for DSD-over-USB 2012-03-19 23:49:29 +01:00
Jonathan Neuschäfer
b9e64d0472 decoder/audiofile: fix compiler warnings with libaudiofile 0.3.3
This might break older versions, I didn't test.
2012-03-19 23:21:12 +01:00
Max Kellermann
9c36e71081 decoder/dsdiff: don't convert to PCM
Move the responsibility for the conversion to the PCM library.  This
will allow passing the verbatim DSD samples to an output plugin.
2012-03-01 02:05:40 +01:00
Max Kellermann
2516496993 audio_format: add DSD sample format
Basic support for Direct Stream Digital.  No conversion yet, and no
decoder/output plugin support.
2012-03-01 01:15:22 +01:00
Jonathan Neuschäfer
00a20fc8a5 decoder/ffmpeg: always use AV_VERSION_INT 2012-02-15 21:42:52 +01:00
Max Kellermann
645663cdfe Merge branch 'af' of git://git.musicpd.org/jn/mpd 2012-02-15 21:06:53 +01:00
Jonathan Neuschäfer
ee2bcbb41d decoder/audiofile: fix compiler warnings with libaudiofile 0.3.3
This might break older versions, I didn't test.
2012-02-15 20:52:48 +01:00
Jonathan Neuschäfer
e77d96cf89 decoder/sidplay: remove unused variable 'ret' 2012-02-15 20:35:05 +01:00
Max Kellermann
c616165f81 Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
	src/decoder/ffmpeg_decoder_plugin.c
	test/read_tags.c
2012-02-13 19:15:18 +01:00
Max Kellermann
103832742d decoder/ffmpeg: read the "year" tag
This was disabled when compiled with a new ffmpeg version.  Older
ffmpeg versions used it explicitly, while newer ones may pass it
through from the codec.
2012-02-13 19:05:39 +01:00
Max Kellermann
8a3192ffc1 decoder/wavpack: bigger tag value buffer
Prepare for big CUESHEET tags.
2012-02-12 16:10:20 +01:00
Max Kellermann
ffea273a28 tag_handler: handle arbitrary name/value pairs
The new method pair() receives an arbitrary name/value pair.  Support
for this is being added to a few decoder plugins.
2012-02-12 13:41:48 +01:00
Max Kellermann
1783aac438 decoder/wavpack: move code to wavpack_scan_tag_item()
Remove clutter from wavpack_scan_file(), and use a (large) fixed
buffer for the tag item.
2012-02-11 19:36:59 +01:00
Max Kellermann
29bf3d2c04 decoder/wavpack: use the tag_table library 2012-02-11 19:34:10 +01:00
Max Kellermann
ee16fc958c decoder/{mikmod,fluidsynth,mp4ff}: adapt to tag_handler API
Fixes build regression.
2012-02-11 19:28:56 +01:00
Max Kellermann
5d73215a8d decoder_plugin: scan tags with callback table
Pass a callback table to scan_file() and scan_stream(), instead of
returning a tag object.
2012-02-11 17:04:29 +01:00
Max Kellermann
b7356bc526 decoder/gme: convert runtime check to assertion
When gme_track_info() returns with success, then the gme_info_t
pointer must be set.
2012-02-11 16:59:24 +01:00
Max Kellermann
8ec8282f38 decoder/ffmpeg: use the tag_table library 2012-02-11 16:39:03 +01:00
Max Kellermann
43b7b98949 decoder/ffmpeg: move code to ffmpeg_metadata.c 2012-02-11 16:37:29 +01:00
Max Kellermann
f791065a98 decoder/ffmpeg: remove AV_VERSION_INT definition
All supported ffmpeg/libav versions have this.
2012-02-11 16:37:25 +01:00
Max Kellermann
d95db28695 decoder/flac: check for errors only after _process_single()
The only other libFLAC call (seek) does not produce fatal errors.
2012-02-11 12:57:18 +01:00
Max Kellermann
851fb16e7c decoder/flac: symmetric FLAC__stream_decoder_finish() calls
Call it in the function that also invokved
FLAC__stream_decoder_init_*().
2012-02-11 12:56:52 +01:00
Max Kellermann
a4cbaafd10 decoder/flac: use error messages from libFLAC 2012-02-11 12:37:24 +01:00
Max Kellermann
c5f2cdb822 decoder/flac: eliminate the remaining "gotos"
https://www.xkcd.com/292/
2012-02-11 12:37:24 +01:00
Max Kellermann
1892d29be0 decoder/{vorbis,flac}: use the tag_table library 2012-02-11 12:37:24 +01:00
Max Kellermann
767ade02f4 tag_table: convert to a struct
The struct is smaller because it is sparse.  Its traversal is also
more efficient.
2012-02-11 12:37:24 +01:00
Max Kellermann
c8a990b9d3 decoder/vorbis: move code to vorbis_comment.c 2012-02-11 10:04:02 +01:00
Max Kellermann
c46239af22 Merge branch 'v0.16.x'
Conflicts:
	src/decoder/ffmpeg_decoder_plugin.c
	test/read_tags.c
	test/run_decoder.c
2012-02-04 17:23:53 +01:00
Max Kellermann
5d9876e338 decoder/ffmpeg: use AV_SAMPLE_FMT_* if available
Implements support for libavcodec 0.9, which removes the compatibility
macros SAMPLE_FMT_*
2012-02-03 09:55:25 +01:00
Max Kellermann
083340a937 decoder/ffmpeg: use sentinel for the ffmpeg_tag_maps table
Minor optimisation.
2012-02-03 09:18:05 +01:00
Max Kellermann
378fa5ee6a decoder/ffmpeg: support all MPD tags
Use the tag_item_names table to look up the names of all MPD tags, and
remove the duplicate entries from ffmpeg_tag_maps.
2012-02-03 09:10:48 +01:00
Max Kellermann
4764daf3c2 decoder/ffmpeg: pass tag_type and name to _copy_metadata()
Allow using this function without the ffmpeg_tag_map struct.
2012-02-03 09:09:18 +01:00
Max Kellermann
6357496d17 decoder/ffmpeg: merge code to _copy_dictionary()
Eliminate some duplicate code.
2012-02-03 09:09:18 +01:00
Max Kellermann
001e2a604b decoder/ffmpeg: add macros emulating AVDictionary
Move the #ifdefs out of _copy_metadata().
2012-02-03 09:02:14 +01:00
Max Kellermann
f370911c15 decoder/ffmpeg: _copy_metadata() returns void
No interest in this return value.
2012-02-03 08:59:26 +01:00
Max Kellermann
c2fe961db1 decoder/ffmpeg: remove debug code 2012-01-24 17:15:29 +01:00
Max Kellermann
ec43721c3c Merge branch 'v0.16.x'
Conflicts:
	src/decoder/ffmpeg_decoder_plugin.c
2012-01-12 18:59:21 +01:00
Max Kellermann
39d52762d1 decoder/ffmpeg: check libavutil version for AVDictionaryEntry
Require libavutil 51.5.0.
2012-01-12 18:45:18 +01:00
Max Kellermann
8d45d0d104 decoder/ffmpeg: raise version dependency for avformat_find_stream_info()
This function was added when the libavformat version was 53.2.0, but
the actual release 53.2.0 did not have it.
2012-01-12 18:28:19 +01:00
Max Kellermann
9937ff8ac0 Merge branch 'v0.16.x'
Conflicts:
	src/decoder/ffmpeg_decoder_plugin.c
	src/input/ffmpeg_input_plugin.c
2012-01-05 00:33:23 +01:00
Max Kellermann
abd1949825 decoder/ffmpeg: support libavformat 0.8 2012-01-05 00:17:56 +01:00
Max Kellermann
4e6bc77a70 decoder/ffmpeg: use avcodec_decode_audio4(), support libavcodec 0.8 2012-01-04 22:10:38 +01:00
Max Kellermann
531948358b decoder/ffmpeg: include libavutil/mathematics.h
Needed for av_rescale_q() in ffmpeg 0.8.
2012-01-04 21:54:54 +01:00
Max Kellermann
21caca4aea decoder/ffmpeg: use avcodec_open2() on newer ffmpeg versions
avcodec_open() has been deprecated.
2012-01-04 21:48:30 +01:00
Max Kellermann
fbf3edf07d decoder/ffpmeg: don't use av_metadata_conv() in ffmpeg 0.7
It's a no-op and deprecated.
2012-01-04 21:47:56 +01:00
Max Kellermann
76fcf25898 decoder/ffmpeg: use AVIOContext instead of ByteIOContext 2012-01-04 21:47:47 +01:00
Max Kellermann
99949c8f6f command: new command "seekcur"
For simpler seeking within current song.
2011-12-24 11:20:02 +01:00
Max Kellermann
aa4f45b9a5 Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-12-13 21:57:44 +01:00
Max Kellermann
533e4fcdad decoder/mp4ff: work around assertion failure in read() callback
This workaround leads to an infinite loop instead of an assertion
failure, but hey, now it's libmp4ff's fault.
2011-12-13 20:08:31 +01:00
Max Kellermann
4f093d5b97 Merge branch 'v0.16.x'
Conflicts:
	Makefile.am
	NEWS
	configure.ac
	src/encoder/flac_encoder.c
	src/log.c
	src/pcm_buffer.c
2011-11-28 11:56:01 +01:00
Max Kellermann
e1b032cbad decoder/ffmpeg: work around bogus channel count
Initialize the audio_format before calling avcodec_open(), because
avcodec_open() will fill bogus values.
2011-11-28 11:39:21 +01:00
Max Kellermann
1e89ca0994 decoder/dsdiff: provide floating point samples
Eliminate the conversion to integer samples, the MPD core can do this
now.
2011-10-20 03:01:31 +02:00
Max Kellermann
92bb10eed8 decoder/wavpack: read float samples as-is, don't convert to integer
For MPD's new floating point support: when a decoded wavpack file
needs to be resampled, don't convert float to int and back to float.
2011-10-20 02:55:05 +02:00
Max Kellermann
545685bc32 audio_format: basic support for floating point samples
Support for conversion from float to 16, 24 and 32 bit integer
samples.
2011-10-20 02:32:39 +02:00
Max Kellermann
4c9782ee28 decoder/pcm: support reverse byte order 2011-10-10 10:13:43 +02:00
Max Kellermann
f3ea834322 decoder/{pcm,dsdiff}: add missing stdio.h include 2011-10-09 17:40:37 +02:00
Max Kellermann
b9e99575ce Merge commit 'release-0.16.5'
Conflicts:
	NEWS
	configure.ac
2011-10-09 16:32:36 +02:00
Max Kellermann
71536eb412 decoder/wavpack: don't call WavpackGetMode() twice
Use local variable "is_float".
2011-10-08 15:37:47 +02:00
Max Kellermann
894b9cfdb9 decoder/dsdiff: add option "lsbitfirst"
Defaults to "no", which fixes the noise problems.
2011-10-07 10:10:43 +02:00
Max Kellermann
7ecbb0454f decoder/dsdiff: add documentation 2011-10-07 06:38:23 +02:00
Max Kellermann
4e909f9411 decoder/dsdiff: new decoder plugin
Doesn't seem to work yet, getting just noise from a test file.
Seeking isn't implemented yet.
2011-10-04 21:41:03 +02:00
Max Kellermann
47774ce882 Merge branch 'v0.16.x' 2011-09-17 19:59:52 +02:00
Tim Harder
79435dbdec decoder/audiofile: include stdio header for SEEK_* defines
The stdio header is no longer pulled in by af_vfs.h in audiofile-0.3.0.
2011-09-17 07:33:42 +02:00
Max Kellermann
754f26a97c input_stream: non-blocking I/O
Add GMutex, GCond attributes which will be used by callers to
conditionally wait on the stream.

Remove the (now-useless) plugin method buffer(), wait on GCond
instead.  Lock the input_stream before each method call.  Do the same
with the playlist plugins.
2011-09-16 21:22:13 +02:00
Max Kellermann
f804a739b1 Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-09-15 21:48:33 +02:00
Max Kellermann
2ed870c854 decoder/ffmpeg: flush the codec after seeking
Let the codec start with fresh buffers.  This should fix the remaining
seeking issues.
2011-09-15 21:41:25 +02:00
Max Kellermann
ce35ba9ac9 decoder/ffmpeg: explicitly specify the current stream for seeking
Use AVStream.time_base to convert the decoder_seek_where() value, and
pass the current stream number to av_seek_frame().
2011-09-15 21:35:29 +02:00
Max Kellermann
724a59aaf7 decoder/ffmpeg: don't require key frame for seeking
Use flag AV_TIME_BASE.
2011-09-15 21:32:29 +02:00
Max Kellermann
42d8c2981f decoder/ffmpeg: higher precision timestamps 2011-09-15 21:30:27 +02:00
Max Kellermann
9aa91e0f17 decoder/ffmpeg: move formula to time_from_ffmpeg() 2011-09-15 21:23:48 +02:00
Max Kellermann
5aabee8996 decoder/ffmpeg: add local variable "av_stream"
Code simplification.
2011-09-15 21:14:53 +02:00
Max Kellermann
3d3bca5338 decoder/oggflac: delete this obsolete plugin
libOggFLAC has been deprecated for 5 years now, and we havn't been
testing it for a long time.  Let's delete it.
2011-09-01 19:29:04 +02:00
Jonathan Neuschäfer
310895f060 rename 'Timer' to 'struct timer' 2011-08-27 11:30:34 +02:00
Max Kellermann
5ecb6fecc4 Merge branch 'v0.16.x' 2011-08-24 01:47:10 +02:00
Max Kellermann
d3b15f8fda decoder/mpcdec: fix gcc warning
Move the variable "vbr_update_acc" into the #ifdef block.
2011-08-23 17:58:56 +02:00
Max Kellermann
0ea4c970d7 Merge branch 'v0.16.x'
Conflicts:
	src/player_thread.c
	src/playlist_control.c
2011-07-20 21:46:05 +02:00
Max Kellermann
2e28ed8f81 wavpack: obey all decoder commands, stop at CUE track border
It used to ignore the decoder_data() return value.
2011-07-20 12:54:30 +02:00
Max Kellermann
4c4f8bf02a decoder/wavpack: use the correct integer types
libwavpack provides int32_t samples, and wants uin32_t for sample
counts.
2011-07-20 12:54:22 +02:00
Max Kellermann
e464be5f39 decoder/wavpack: simplify the WavpackUnpackSamples()==0 check
.. and remove one indent level.
2011-07-20 12:32:48 +02:00
Max Kellermann
eb2f413cf0 Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-07-19 00:24:20 +02:00
Max Kellermann
736fd0e293 decoder/ffmpeg: use avformat_open_input() if available
av_open_input_stream() has been deprecated.
2011-07-18 23:31:47 +02:00
Max Kellermann
6592ca9f88 decoder: use AVDictionary instead of AVMetadata
AVMetadata has been deprecated.
2011-07-18 23:31:31 +02:00
Max Kellermann
6aa6a9c272 decoder/flac: validate the sample rate when scanning the tag
Don't calculate the song duration when the sample rate is 0 (division
by zero crash).
2011-07-03 14:57:56 +02:00
oblique
8d1c7ca206 ffmpeg: workaround for semantic API change in recent ffmpeg versions 2011-07-03 14:54:56 +02:00
Max Kellermann
e228caaca6 Merge branch 'v0.16.x'
Conflicts:
	src/decoder/ffmpeg_decoder_plugin.c
2011-06-03 16:58:09 +02:00
Max Kellermann
c6a72a14ac decoder/ffpmeg: don't use av_metadata_conv() in ffmpeg 0.7
It's a no-op and deprecated.
2011-05-09 21:24:18 +02:00
Max Kellermann
c74edd0e33 decoder/ffmpeg: use AVIOContext instead of ByteIOContext 2011-05-09 21:23:58 +02:00
Max Kellermann
246db3d565 decoder/ffmpeg: use avcodec_decode_audio3() if available
avcodec_decode_audio3() has been added in libavformat 52.25.0, and the
predecessor avcodec_decode_audio2() has been deprecated.
2011-05-09 09:24:17 +02:00
Max Kellermann
eaf414cbc8 decoder/ffmpeg: make variables more local 2011-05-09 09:24:15 +02:00
Anton Khirnov
327d41c00f decoder/ffmpeg: don't use deprecated CODEC_TYPE_AUDIO with new lavc
fixes build with lavc 53.
2011-05-09 08:00:45 +02:00
Max Kellermann
05d8ce3bcd decoder/ffmpeg: define fallback macro AV_VERSION_INT()
For ffmpeg < 0.5.  Copied from libavutil 0.5.
2011-05-09 08:00:45 +02:00
Max Kellermann
fe30db935b decoder/ffmpeg: use avcodec_decode_audio3() if available
avcodec_decode_audio3() has been added in libavformat 52.25.0, and the
predecessor avcodec_decode_audio2() has been deprecated.
2011-04-12 08:20:35 +02:00
Max Kellermann
6303d54cbb decoder/ffmpeg: make variables more local 2011-04-12 08:17:30 +02:00
Anton Khirnov
9d91aa23e6 decoder/ffmpeg: drop support for pre-0.5 ffmpeg
All modern distros ship 0.5, so there's no need to support old and buggy
ffmpeg versions.
2011-04-12 08:14:14 +02:00
Max Kellermann
c2ada39fd3 Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-04-12 08:11:33 +02:00
Max Kellermann
f680b0a431 decoder/flac: fix enum mismatch in flac_tell_cb()
Fix clang warning.
2011-03-23 22:31:40 +01:00
Simon Kagstrom
640bac1aa4 decoder: PCM decoder: Inherit seekable from the input stream
E.g., spotify isn't seekable.
2011-03-23 22:13:11 +01:00
Simon Kagstrom
0b12fae84d decoder: PCM decoder: Break loop if EOF is encountered
Otherwise the song playing might go on forever.
2011-03-23 22:13:08 +01:00
Max Kellermann
0c9fc2f809 Merge commit 'release-0.16.2'
Conflicts:
	Makefile.am
	NEWS
	configure.ac
2011-03-19 09:58:07 +01:00
Thomas Jansen
948b8f35e6 general: whitespace cleanup
Remove trailing whitespace found by this command:
find -name '*.[ch]' | xargs grep "[[:space:]]$"
2011-02-09 22:42:31 +01:00
Tony Miller
8b2f4fc823 Set fadeout in gme_decoder_plugin. Due to the nature of the gme library,
this needs to be done for the end of songs to be detected.
2011-02-03 00:25:35 +01:00
Max Kellermann
c6cbcc2c25 copyright year 2011 2011-01-29 10:13:54 +01:00
Yuriy Kaminskiy
9ae3acf2e7 mpg123 decoder: implement seeking 2011-01-21 15:37:08 +01:00
Yuriy Kaminskiy
731ea9b489 mpg123 decoder: report bitrate 2011-01-21 15:37:08 +01:00
Max Kellermann
1a2ea4c06c Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-01-07 23:52:23 +01:00
Max Kellermann
e3cba18532 decoder: new "pcm" decoder plugin
Just there to support the "cdio_paranoia" input plugin.
2010-12-22 09:48:48 +01:00
Alex Viskovatoff
41fdcf328c decoder/mad: work around build failure on Solaris
Rename the "version" struct, because it seems to be a reserved name on
Solaris:

 "src/decoder/mad_decoder_plugin.c", line 550: (enum) tag redeclared: version
 cc: acomp failed for src/decoder/mad_decoder_plugin.c
2010-12-21 07:57:07 +01:00
Max Kellermann
4478b3ef74 Merge release 0.15.14 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/decoder_control.c
	src/decoder_control.h
	src/input/rewind_input_plugin.c
	src/output_control.c
	src/output_thread.c
	src/player_thread.c
2010-11-07 15:30:18 +01:00
Max Kellermann
e8d8bd4c0d decoder/{mp4ff,ffmpeg}: add extension ".m4b" (audio book)
Same as ".m4a".
2010-11-05 02:01:35 +01:00
Max Kellermann
3f89f77429 decoder/ffmpeg: check AVCodecContext.sample_fmt value
.. instead of av_get_bits_per_sample_format().  The SampleFormat enum
value is authoritative.
2010-11-04 20:04:15 +01:00
Alder Hornbridge
fe1b626f76 decoder/sidplay: play mus, str, prg, x00 files 2010-10-27 21:18:43 +02:00
Alder Hornbridge
4e94516912 decoder/sidplay: play monaural SID tunes in mono 2010-10-27 21:16:24 +02:00
Tony Miller
dadb6747ad Container support for gme decoder. 2010-10-14 17:11:59 +02:00
Thomas Jansen
28bcb8bdf5 eliminate g_error() usage
Replaced all occurrences of g_error() with MPD_ERROR() located in a new header
file 'mpd_error.h'. This macro uses g_critical() to print the error message
and then exits gracefully in contrast to g_error() which would internally call
abort() to produce a core dump.

The macro name is distinctive and allows to find all places with dubious error
handling. The long-term goal is to get rid of MPD_ERROR() altogether. To
facilitate the eventual removal of this macro it was added in a new header
file rather than to an existing header file.

This fixes #2995 and #3007.
2010-09-25 15:00:43 +02:00
Max Kellermann
0955f33a86 decoder/mp4ff: support more variations of "album artist"
According to the mantis bug report 2847, there are several possible
variations of the "album artist" tag:

- "album artist"
- "album_artist"
- "albumartist"

This patch adds support for the latter two.
2010-09-23 21:19:41 +02:00
Max Kellermann
635cfbae13 decoder_control: use g_free() to manage mixramp allocations
Be consistent with the rest of MPD, and don't use the non-portable
header "malloc.h".
2010-09-23 08:49:21 +02:00
Rasi
31ab0b3df1 Added album tag support for libgme decoder 2010-07-23 23:13:03 +02:00
Max Kellermann
4364b30c42 decoder/mad: move RVA2 code to tag_rva2.c 2010-07-20 23:03:54 +02:00
Max Kellermann
c0da938d4f Merge release 0.15.12 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
2010-07-20 23:03:06 +02:00
Max Kellermann
8b055c3127 tag_rva2: set "gain", not "peak"
RVA2 tags only store the "gain" value, there is no "peak" attribute.
2010-07-20 22:32:55 +02:00
Max Kellermann
172182b18f decoder/mad: parse_rva2() returns bool 2010-07-20 18:27:11 +02:00
Max Kellermann
898a13f196 decoder/wildmidi: support version 0.2.3
In libwildmidi 0.2.3, the function WildMidi_SampledSeek() was removed,
without changing the SO name.  This patch adds an autoconf check for
that function.  Fall back to WildMidi_FastSeek() if
WildMidi_SampledSeek() is not available anymore.
2010-07-20 18:23:56 +02:00
Max Kellermann
e2e8d0d2f3 decoder/ffmpeg: fix libavformat 0.6 by using av_open_input_stream()
libavformat 0.6 does not pass the original URI pointer to the "open"
method, which leads to a crash because MPD was using a dirty hack to
pass a pointer to that method.

This patch switches to av_open_input_stream() with a custom
ByteIOContext class, instead of doing the URI string hack with
av_open_input_file().

Loosely based on a patch from Jasper St. Pierre.
2010-07-19 23:03:06 +02:00
Max Kellermann
b2e3c0757b decoder/ffmpeg: manual format probing
Use the libavformat function av_probe_input_format() to probe the
AVInputFormat, instead of letting av_open_input_file() do it
implicitly.  We will switch to av_open_input_stream() very soon, which
does not have the probing code.

Loosely based on a patch from Jasper St. Pierre.
2010-07-19 22:59:59 +02:00
Anton Khirnov
0fc0196dba ffmpeg: read the audio stream metadata in addition to global
in some formats, e.g. vorbis, the metadata is stored per-stream.
2010-07-12 11:36:55 +02:00
Anton Khirnov
1492324c76 ffmpeg: factor tag_type <-> ffmpeg tag name maps into a table. 2010-07-12 11:36:55 +02:00
Max Kellermann
49bc317fb8 decoder/ffmpeg: fix libavformat 0.6 by using av_open_input_stream()
libavformat 0.6 does not pass the original URI pointer to the "open"
method, which leads to a crash because MPD was using a dirty hack to
pass a pointer to that method.

This patch switches to av_open_input_stream() with a custom
ByteIOContext class, instead of doing the URI string hack with
av_open_input_file().

Loosely based on a patch from Jasper St. Pierre.
2010-06-30 23:41:32 +02:00
Max Kellermann
375a09d6f6 decoder/ffmpeg: manual format probing
Use the libavformat function av_probe_input_format() to probe the
AVInputFormat, instead of letting av_open_input_file() do it
implicitly.  We will switch to av_open_input_stream() very soon, which
does not have the probing code.

Loosely based on a patch from Jasper St. Pierre.
2010-06-30 23:40:31 +02:00
Max Kellermann
0265c34bed decoder/ffmpeg: free URI, fix memory leak
Free the string allocated by decoder_get_uri().
2010-06-30 23:40:04 +02:00
Max Kellermann
a1882f48be decoder/vorbis: handle uri==NULL
This fixes a theoretical crash, which has never occurred in practice.
2010-06-30 23:38:49 +02:00
Anton Khirnov
c3569814bd ffmpeg: read more metadata. 2010-06-30 23:18:45 +02:00
Max Kellermann
814daac5ba decoder/ffmpeg: free AVFormatContext on error
Fix a memory leak in some code paths.
2010-06-30 23:14:43 +02:00
Max Kellermann
ec89ce5a8a decoder/mp4ff: support tag "album artist"
We already supported "albumartist", but it seems some folks also use
"album artist" (with a space).
2010-06-30 21:55:03 +02:00
Max Kellermann
77e6810c14 decoder/mikmod: fix memory leak
The return value of Player_LoadTitle() is allocated with malloc(), and
must be freed by the caller.
2010-06-30 19:37:36 +00:00
Max Kellermann
5ebe33653c decoder/mp4ff: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
2010-06-30 21:36:15 +02:00
Max Kellermann
8e3eace289 decoder/mp4ff: moved code to mp4ff_tag_name_parse() 2010-06-30 21:36:00 +02:00
Max Kellermann
4d6d372a5b decoder/vorbis: use single global ov_callbacks constant
Initialize the ov_callbacks struct at compile time.
2010-06-30 19:24:41 +00:00
Max Kellermann
0aeec90590 decoder/mp4ff: support tags "albumartist", "band"
I'm not sure if mapping "band" to TAG_PERFORMER is correct, but it
might be better than nothing.
2010-06-30 21:22:13 +02:00
Max Kellermann
cfcd84655c decoder/mp4ff: use tag_table.h to parse tag names
Convert if/else/else/... to a loop.
2010-06-30 21:19:30 +02:00
Max Kellermann
9eb292c1e5 decoder/mp4ff: support tag "album artist"
We already supported "albumartist", but it seems some folks also use
"album artist" (with a space).
2010-06-25 22:54:18 +02:00
Romain Bignon
b571ba27a4 fix crash when decoder is NULL 2010-05-31 22:11:59 +02:00
Max Kellermann
de8f2739c2 decoder/mikmod: fix memory leak
The return value of Player_LoadTitle() is allocated with malloc(), and
must be freed by the caller.
2010-05-31 10:24:08 +02:00
Max Kellermann
2c1c588868 decoder/mikmod: duplicate the path only once 2010-05-31 10:22:08 +02:00
Max Kellermann
e271f69a34 decoder/mikdmod: moved local variable declarations in tag_dup() 2010-05-31 10:16:09 +02:00
Max Kellermann
39105f2119 decoder/wildmidi: moved local variable declarations in tag_dup() 2010-05-31 10:14:48 +02:00
Max Kellermann
4e080a9b06 decoder/gme: replace macro GME_BUF_SIZE
Added macros with better names: GME_BUFFER_FRAMES, GME_BUFFER_SAMPLES
(the former only used to calculate the latter).
2010-05-31 10:03:43 +02:00
Max Kellermann
d55740808d decoder/gme: added constants for sample rate and channels
Move into enums.
2010-05-31 10:02:43 +02:00
Max Kellermann
6566038df9 decoder/gme: pass the whole buffer to decoder_data()
Pass sizeof(buf) to decoder_data(), not the number of samples (which
is half the size).  At the same time, pass GME_BUF_SIZE to gme_play()
- libgme really wants to get the number of samples, not the number of
stereo frames.  Previously, this plugin had been using only the first
half of the buffer.
2010-05-31 09:57:15 +02:00
Max Kellermann
f0faf00320 decoder/gme: allocate tag later, fixes memory leak
Allocate the "tag" object after the file has been opened successfully.
2010-05-31 09:43:25 +02:00
Max Kellermann
51c7577c8f decoder/mp4ff: rename and move local variable
Allocate the "tag" object after the file has been checked.  That
removes one tag_free() call in an error handler.
2010-05-31 09:35:49 +02:00
Max Kellermann
be308c6657 decoder/mp4ff: merge code into mp4ff_input_stream_open() 2010-05-31 09:29:45 +02:00
Max Kellermann
1729a0b437 decoder/mp4ff: move mp4ff_callback_t into mp4ff_input_stream
Allocate only one item on the stack.
2010-05-31 09:23:27 +02:00
Max Kellermann
1b2fc2ae19 decoder/mp4ff: rename mp4_context to mp4ff_input_stream 2010-05-31 09:22:42 +02:00
Max Kellermann
58a75f0b78 decoder/mp4ff: remove duplicate entries in the tag name table
Reuse the function tag_name_parse_i().
2010-05-31 08:48:41 +02:00
Max Kellermann
daf6e2b5da decoder/mp4ff: moved code to mp4ff_tag_name_parse() 2010-05-31 08:47:59 +02:00
Max Kellermann
ca08c4dbf4 decoder/vorbis: rename local variable "ret" 2010-05-31 00:06:37 +02:00
Max Kellermann
8af52fa205 decoder/vorbis: implement method stream_tag()
This allows tags in archive files.
2010-05-31 00:02:57 +02:00
Max Kellermann
3b0bf856c4 decoder/vorbis: move code to vorbis_open_stream() 2010-05-31 00:00:04 +02:00
Max Kellermann
28f5803d34 decoder/vorbis: use single global ov_callbacks constant
Initialize the ov_callbacks struct at compile time.
2010-05-30 23:59:36 +02:00
Max Kellermann
0b72299857 decoder/vorbis: rename struct vorbis_decoder_data to vorbis_is 2010-05-30 23:57:58 +02:00
Max Kellermann
017d61a1aa decoder/mp4ff: support tags "albumartist", "band"
I'm not sure if mapping "band" to TAG_PERFORMER is correct, but it
might be better than nothing.
2010-05-30 22:55:02 +02:00
Max Kellermann
4028d03a6e decoder/mp4ff: use tag_table.h to parse tag names
Convert if/else/else/... to a loop.
2010-05-30 22:52:45 +02:00
Max Kellermann
44b771aca1 decoder/mp4ff: rename plugin "mp4" to "mp4ff"
The underlying library is named "libmp4ff".  To reduce confusion,
rename the plugin to a more specific name.
2010-05-30 22:52:44 +02:00
Max Kellermann
9dda53e1d2 Merge release 0.15.10 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/input/mms_input_plugin.c
2010-05-30 18:26:33 +02:00
Max Kellermann
442d2e74e3 decoder/mad: fix buffer variable name on !HAVE_ID3TAG 2010-05-30 17:27:03 +02:00
Max Kellermann
fa2ff849c5 input/ffmpeg: new input plugin using libavformat's "avio" library 2010-05-18 21:20:31 +02:00
Tim Phipps
0ac5b6e613 mixramp: Adjust MixRamp threshold to account for ReplayGain. 2010-05-08 00:19:44 -07:00
Max Kellermann
cf3ada3d04 Merge branch 'master' of git://github.com/mcfiredrill/mpd 2010-04-20 21:16:39 +02:00
Max Kellermann
a1a03deed2 decoder/mad: properly calculate ID3 size without libid3tag
Without libid3tag, we were trying to skip the ID3 frame (since
0.15.2).  Its length however was not calculated at all, we were just
dropping everything from the current input buffer.  This lead to the
first few seconds of the file being skipped.  This patch attempts to
calculate the ID3v2 frame size with the formula from:

 http://www.id3.org/id3v2.4.0-structure 3.1 and 6.2
2010-04-13 08:51:29 +02:00
Charles Kerr
6a95898038 decoder/ffmpeg: fix crash on startup in mpd_ffmpeg_log_callback()
What's happening is the `ptr' argument to that function is NULL for me
every time. `ptr' is unconditionally dereferenced to generate a log
message, and this is where mpd crashes.

Attached is a simple patch that tests for NULL and omits the log. With
this patch the crash disappeared and mpd went back to working well.
2010-04-11 19:18:30 +02:00
Tony Miller
9d55b16998 Decoder for game music emulation library.
Supports a number of videogame music formats, more info here:
http://www.fly.net/~ant/libs/audio.html

I wrote this plugin for the latest svn, get it here:
http://code.google.com/p/game-music-emu/source/checkout
2010-04-10 01:05:16 -07:00
Max Kellermann
8446b70ddc decoder/ffmpeg: print item name in log callback 2010-03-28 19:48:57 +02:00
Max Kellermann
e9beea072d Merge release 0.15.9 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/cue/cue_tag.c
	src/decoder/mpcdec_decoder_plugin.c
	src/player_thread.c
2010-03-28 19:31:47 +02:00
Tim Phipps
e7a515c8b1 Add support for MixRamp tags
Adds mixrampdb and mixrampdelay commands.  Reads MIXRAP_START and
MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
2010-03-21 18:21:47 +01:00
Aleksei Kaveshnikov
73ba4ea3da decoder/mpcdec: fix replay gain formula with v8
"When playing musepack files with mpd v0.15.8, rg seems to have no effect.

Using sample file below, mpd says 'computing ReplayGain album scale with gain 122.879997, peak 0.549150'.

One thing though, if I build mpd against old libmpcdec-1.2.6, rg works
as expected: 'computing ReplayGain album scale with gain 16.820000,
peak 0.099765'"
2010-03-19 10:26:08 +01:00
Piotr Gozdur
96033e4b4e decoder/mpcdec: fix negative shift on fixed-point samples
"There is a bug in fixed-point musepack (musepack_src_r435) playback.
In floating-point audio is OK but in fixed audio is distorted.  I have
made a patch for this"
2010-03-17 17:54:21 +01:00
Max Kellermann
5842015b90 decoder/ffmpeg: fix indentation 2010-03-07 19:20:34 +01:00
Max Kellermann
ae56901863 decoder/ffmpeg: implement the libavutil log callback
Pass everything to the GLib logging library.  No direct stderr access.
2010-02-27 19:32:59 +01:00
Max Kellermann
4e364854ab decoder/ffmpeg: don't close the AVFormatContext after open failure
The pointer is invalid if av_open_input_file() fails.
2010-02-27 19:25:56 +01:00
Max Kellermann
35c5a371ea decoder/mad: fix crash when seeking at end of song
Removed the decoder_command_finished() call at the end of
mp3_decode().  This is invalid, because decoder_command_finished() has
already been called in mp3_read().
2010-02-27 18:35:31 +01:00
Max Kellermann
5e0117b444 replay_gain_info: allocate the struct statically
Don't allocate each replay_gain_info object on the heap.  Those
objects who held a pointer now store a full replay_gain_info object.
This reduces the number of allocations and heap fragmentation.
2010-02-17 07:22:44 +01:00
Anton Khirnov
766b9fd453 ffmpeg: read more metadata. 2010-02-02 17:55:58 +01:00
Tim Phipps
891dab7b91 decoder/flac: fix replay gain (short-circuiting "or") 2010-01-28 20:54:04 +01:00
Max Kellermann
acb0ff1ea8 decoder/wavpack: fixed WVC URI
Pass the current URI to wavpack_open_wvc().
2010-01-20 12:08:44 +01:00
Max Kellermann
2acad9fe1e decoder/ffmpeg: call decoder_timestamp() once per packet 2010-01-18 13:11:04 +01:00
Max Kellermann
8914ebc964 decoder/ffmpeg: merged ffmpeg_helper() into ffmpeg_decode() 2010-01-18 11:06:09 +01:00
Max Kellermann
5477c31160 decoder/ffmpeg: optimized the stream_tag() method
Don't use the function ffmpeg_helper(), don't initialize the codec.
2010-01-18 11:06:04 +01:00
Max Kellermann
acd3f8cd91 decoder/ffmpeg: free AVFormatContext on error
Fix a memory leak in some code paths.
2010-01-18 11:05:15 +01:00
Max Kellermann
ca1fc13116 decoder_api: removed function decoder_get_uri()
Use input_stream.uri.
2010-01-18 10:21:57 +01:00
Max Kellermann
a0a26d3341 Merge release 0.15.8 from branch 'v0.15.x
Conflicts:
	Makefile.am
	NEWS
	configure.ac
	src/decoder/ffmpeg_decoder_plugin.c
	src/decoder_thread.c
2010-01-18 07:52:58 +01:00
Max Kellermann
2579a2f924 decoder/ffmpeg: added more MIME types
Taken from the ffmpeg sources.
2010-01-17 16:00:14 +01:00
Max Kellermann
1b441837f1 decoder/ffmpeg: append file name suffix to virtual stream URL
To allow libavformat to detect the format of the input file, append
the suffix of the input file to the URL of the virtual stream.  This
specifically enables the "shorten" codec, which is supported by
libavformat/raw.c, detected only by the suffix.
2010-01-17 02:36:07 +01:00
Max Kellermann
1abfcc56af audio_format: support packed 24 bit samples 2010-01-16 23:44:54 +01:00
Max Kellermann
a942384fbf decoder/flac: support streams without STREAMINFO block 2010-01-06 10:17:16 +01:00
Max Kellermann
de0cdee4aa decoder/flac: pass bits_per_sample to flac_sample_format()
Easier to reuse the function.
2010-01-06 09:55:20 +01:00
Max Kellermann
550c9319e9 decoder/flac: moved decoder initialization to _flac_common.c
Invoke decoder_initialized() in the libFLAC metadata callback.  This
merges code from the FLAC and the OggFLAC decoder plugin into the
common library.
2010-01-06 09:50:34 +01:00
Max Kellermann
ae9c02b3a8 decoder/flac: remember audio_format, not stream_info 2010-01-06 09:00:32 +01:00
Max Kellermann
6f6d47dd20 decoder/flac: removed CUE sheet support
This feature has been moved to the "flac" playlist plugin.
2010-01-06 08:52:35 +01:00
Max Kellermann
d6d5caae23 decoder/flac: moved flac_tag_load() to flac_metadata.c
Make this code is reusable.
2010-01-06 08:50:35 +01:00
Max Kellermann
9b9abff972 renamed decoder plugin sources
Make it X_decoder_plugin.c.
2010-01-04 21:45:32 +01:00
Max Kellermann
c69cc31de0 decoder/mad: fix build error without libid3tag 2010-01-04 21:45:32 +01:00
Max Kellermann
1330274ffc replay_gain: moved code to replay_gain_info.c 2010-01-04 21:02:36 +01:00
Max Kellermann
cd8f92c928 decoder_api: added function decoder_replay_gain()
This function replaces the replay_gain_info parameter for
decoder_data().  This allows the decoder to announce replay gain
changes, instead of having to pass the same object over and over.
2010-01-04 20:42:49 +01:00
Max Kellermann
d3b763a48c input_stream: return allocated input_stream objects
Major API redesign: don't let the caller allocate the input_stream
object.  Let each input plugin allocate its own (derived/extended)
input_stream pointer.  The "data" attribute can now be removed, and
all input plugins simply cast the input_stream pointer to their own
structure (with an "struct input_stream base" as the first attribute).
2010-01-01 17:25:07 +01:00
Avuton Olrich
9d3865cb95 Update copyright notices. 2009-12-31 20:58:43 -08:00
Max Kellermann
05cde5810a decoder: switch a bunch of plugins to stream_tag()
This patch changes the following decoder plugins to implement
stream_tag() instead of tag_dup():

 faad, ffmpeg, mad, modplug, mp4ff, mpcdec, oggflac

This simplifies their code, because they do not need to take care of
opening/closing the stream.
2009-12-31 18:32:09 +01:00
Max Kellermann
6b96f5d566 decoder_plugin: added method stream_tag()
This is like tag_dup(), but works with an input_stream object instead
of a file path.
2009-12-31 18:27:48 +01:00
Max Kellermann
efc885a9dc Merge vorbis+icy fixes from branch 'v0.15.x'
Conflicts:
	Makefile.am
	NEWS
	configure.ac
	src/input/curl_input_plugin.c
	src/input_stream.c
2009-12-30 23:24:11 +01:00
Max Kellermann
c7d099c757 decoder/{ffmpeg,flac,vorbis}: added more flac/vorbis MIME types
Support deprecated MIME types such as "audio/x-ogg".  Support new
types such as "audio/flac".
2009-12-29 22:33:46 +01:00
Max Kellermann
333e11d0eb Merged release 0.15.7 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
	src/decoder_api.c
2009-12-27 20:10:45 +01:00
Max Kellermann
bad350bc18 decoder_api: added function decoder_timestamp()
Remove the data_time parameter from decoder_data().  This patch
eliminates the timestamp counting in most decoder plugins, because the
MPD core will do it automatically by default.
2009-12-26 03:01:43 +01:00
Max Kellermann
8a6d448aaf decoder/wavpack: allow fine-grained seeking
First multiply the floating point return value of
decoder_seek_where(), then cast to integer.
2009-12-26 02:58:30 +01:00
Alam Arias
b05ba0286e updated mp4ff decoder about input_stream_seek 2009-12-16 06:47:15 +01:00
Max Kellermann
228b03edf8 input_stream: return errors with GError 2009-12-15 23:12:11 +01:00
Max Kellermann
849d7895dc decoder/mikmod: fixed gcc uninitialized warning
Removed local variable "sample_rate".
2009-12-14 23:20:14 +01:00
Max Kellermann
c3085d7b61 Merge branch 'v0.15.x'
Conflicts:
	src/decoder/ffmpeg_plugin.c
2009-12-14 17:40:50 +01:00
Max Kellermann
8f7bc70bf5 decoder/wavpack: don't use the nonstandard "uchar" type
Use the signed C99 type int8_t instead.
2009-12-11 12:45:57 +01:00
Max Kellermann
c412d6251e audio_format: changed "bits" to "enum sample_format"
This patch prepares support for floating point samples (and probably
other formats).  It changes the meaning of the "bits" attribute from a
bit count to a symbolic value.
2009-12-02 22:29:50 +01:00
Max Kellermann
16123f1b8e ffmpeg: don't try to force stereo
The plugin code tried to force libavcodec to supply stereo samples.
That however has never actually worked.  By removing this code, we are
able to play surround files for the first time.
2009-11-30 09:59:05 +01:00
Max Kellermann
3857bb9990 decoder/mpcdec: set 24 bit sample format
This fixes a regression due to a typo caused by "decoder: use
audio_format_init_checked()".
2009-11-25 08:59:13 +01:00
Max Kellermann
c33bbd947b Merged release 0.15.6 from branch 'v0.15.x'
Conflicts:

	NEWS
	configure.ac
2009-11-19 19:59:34 +01:00
Max Kellermann
21fdf47b56 decoder/flac: fixed compiler warning
Removed the "vtrack" local variable (which triggered a gcc warning
because it was after the newly introduced NULL check), and run
strtol() on the original parameter.
2009-11-19 19:49:44 +01:00
Max Kellermann
97f8e017c4 decoder/flac: fixed NULL pointer dereference in CUE code
The function flac_vtrack_tnum() was missing a strrchr()==NULL check.
2009-11-18 19:55:38 +01:00
Max Kellermann
77b95d08a5 decoder/ffmpeg: align the output buffer
On some platforms, libavcodec wants the output buffer aligned to 16
bytes (because it uses SSE/Altivec internally).  It will segfault when
you don't obey this rule.
2009-11-15 17:39:09 +01:00
Max Kellermann
141cbc60b9 decoder/audio: eliminate the "bits" variable
Pass the audiofile_setup_sample_format() result to
audio_format_init_checked().
2009-11-14 23:35:37 +01:00
Max Kellermann
2c1fb48318 decoder/audiofile: moved code to audiofile_setup_sample_format() 2009-11-14 23:22:14 +01:00
Max Kellermann
1dfadf4815 decoder/modplug: count frame position
Don't maintain the current time stamp in a floating point variable,
because this is subject to rounding errors.
2009-11-14 22:30:57 +01:00
Max Kellermann
f5b9e3c064 decoder/modplug: floating point division for song duration
More exact total time.
2009-11-14 22:27:27 +01:00
Max Kellermann
ff70dbd316 decoder/modplug: check ModPlug_Read() < 0
Negative return values are not documented here, but since the function
prototype is signed, let's be sure.
2009-11-14 22:27:04 +01:00
Max Kellermann
dd4625ce13 decoder/mikmod: count frame position
Don't maintain the current time stamp in a floating point variable,
because this is subject to rounding errors.
2009-11-14 02:24:42 +01:00
Max Kellermann
1648c7aa5b decoder/mikmod: sample rate is configurable
The new option "sample_rate" sets the sample rate for libmikmod.
2009-11-14 02:24:42 +01:00
Max Kellermann
edaf017908 decoder/mikmod: set drv_name and drv_version from PACKAGE/VERSION 2009-11-14 02:24:42 +01:00
Max Kellermann
2c7bf61e68 decoder/mikmod: no CamelCase 2009-11-14 02:07:41 +01:00
Max Kellermann
7efb548921 decoder/mikmod: removed the struct mod_Data 2009-11-14 02:07:41 +01:00
Max Kellermann
0c5329aedc decoder/mikmod: merged open()/close() into decode()
These functions are trivial, we don't need them separate.
2009-11-14 02:07:41 +01:00
Max Kellermann
2d236e281f decoder/mikmod: static mod_Data object
Don't allocate this object, put it on the stack.
2009-11-14 02:07:41 +01:00
Max Kellermann
719990b1c5 decoder: use audio_format_init_checked()
Let the audio_check library verify the audio format in all (relevant,
i.e. non-hardcoded) plugins.
2009-11-14 00:47:22 +01:00
Max Kellermann
873025a495 decoder/sidplay: correctly calculate floating point time
Internally, use only the integer time.  When needed, convert it to a
floating point seconds value.
2009-11-14 00:46:30 +01:00
Max Kellermann
9947b82cad added .#* to .gitignore
Temporary editor files.
2009-11-12 18:39:40 +01:00
Max Kellermann
5b82ffc291 include config.h in all sources
After we've been hit by Large File Support problems several times in
the past week (which only occur on 32 bit platforms, which I don't
have), this is yet another attempt to fix the issue.
2009-11-12 09:17:03 +01:00