Max Kellermann
17bdcc8bae
decoder plugins: don't include gcc.h
...
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2009-01-01 18:09:24 +01:00
Max Kellermann
95b3430f52
removed os_compat.h
...
Only include headers which are really needed. os_compat.h aimed to
make MPD easily portable, but was never actually made portable.
2008-12-29 17:28:32 +01:00
Frank Mulder
a51fada124
mp4: support the writer/composer tag
...
I tried to search for a certain composer in my collection, but only
non-mp4 files showed up. The source code reveals that this tag is not
read. This can be fixed by reading the 'Writer' tag field, in
mp4_plugin.c, in function mp4_load_tag.
I actually tried this, and after compiling with those lines added,
also mp4 (.m4a) files showed up when searching for a composer.
2008-12-29 11:29:01 +01:00
Max Kellermann
4b3a055ffe
mikmod: use Glib instead of utils.h/log.h
2008-12-28 19:48:53 +01:00
Max Kellermann
4ca02bfcfc
mikmod: convert mod_Data.audio_buffer to a static array
...
Don't do two allocations for the mod_Data structure.
2008-12-28 19:48:53 +01:00
Viliam Mateicka
d838a1ad24
decoder: new plugin using modplug library
2008-12-28 17:11:18 +01:00
Pauli Virtanen
65b18644e1
Add RVA2 tag support to MPD
...
This patch adds RVA2 (relative volume adjustment) tag
support to mpd, as a fallback if no replaygain tags are
found. The code is almost directly from madplay (GPL).
RVA2 tags are generated for example by the "normalize" utility.
Updated by: Avuton Olrich <avuton@gmail.com>
2008-12-28 13:02:34 +01:00
Max Kellermann
cc3b6c2f5b
audiofile: don't close onput stream in libaudiofile destroy()
...
The input_stream object should only be closed by the MPD core
(i.e. decoder_thread.c / decoder_run()). A decoder plugin which
attempts to close it will result in a segmentation fault.
2008-12-27 14:34:51 +01:00
Max Kellermann
9220e0edff
Merge branch 'experimental' of git://git.musicpd.org/metyl/mpd
...
Conflicts:
configure.ac
src/ls.h
src/output/shout_plugin.c
2008-12-27 13:34:51 +01:00
Max Kellermann
7f98ba24c7
ffmpeg: case AV_NOPTS_VALUE to int64_t
...
The old code casted it to a 32 bit integer, which cut off bits.
AVFormatContext.duration is a int64_t, so use this type.
2008-12-24 11:56:53 +01:00
Max Kellermann
82ef85a309
ffmpeg: don't assign "0" to pointer
...
Use NULL instead. Found by sparse.
2008-12-24 11:49:37 +01:00
Max Kellermann
fc723803a4
mp3: "tag" argument is unused when libid3tag is disabled
...
Add G_GNUC_UNUSED attributes.
2008-12-24 11:07:58 +01:00
Viliam Mateicka
88ab54d3d4
ffmpeg: fixing ffmpeg_send_packet to allow multipackets
2008-12-15 19:37:10 +01:00
Viliam Mateicka
8a412aaa27
ffmpeg: adding APE support
2008-12-15 19:34:58 +01:00
Max Kellermann
87f6f57bf6
mp3: declare variables as "enum mp3_action"
...
Variables which hold one of the DECODE_* values should be declared as
"enum mp3_action" instead of "int".
2008-12-08 16:49:19 +01:00
Viliam Mateicka
e61ba50ebd
decoder: audiofile plugin using input stream instead of file
2008-12-03 20:26:08 +01:00
Max Kellermann
910c000954
mp3: use GLib logging
...
Use GLib's g_warning(), ... instead of MPD's deprecated log.h.
2008-11-27 19:19:05 +01:00
Max Kellermann
14e121af90
flac, mpc, ogg, wavpack: include unistd.h for SEEK_SET
...
SEEK_SET is defined by unistd.h. Explicitly include it.
2008-11-24 10:33:08 +01:00
Laszlo Ashin
a493aafe02
wavpack: use assert_static()
2008-11-22 14:28:11 +01:00
Max Kellermann
976d5045c6
decoder: check audio_format_valid() in all decoders
...
Refuse to play audio formats which are not supported by MPD.
2008-11-21 20:27:30 +01:00
Max Kellermann
63c3ebee46
flac, oggflac: use GLib instead of utils.h/log.h
2008-11-21 20:15:50 +01:00
Max Kellermann
f15fc4e99a
ffmpeg: use GLib instead of log.h
2008-11-21 20:13:41 +01:00
Max Kellermann
4a3a621caf
audiofile: use GLib instead of log.h
2008-11-21 20:13:36 +01:00
Max Kellermann
7a2fe930b8
aac: use GLib instead of utils.h/log.h
...
Removed the superfluous my_usleep() call.
2008-11-21 20:13:26 +01:00
Max Kellermann
927bf45f84
ogg: moved the "errorStr" variable into the error handler
2008-11-20 20:11:00 +01:00
Laszlo Ashin
65a8822a0b
aac: get rid of gcc warnings
2008-11-20 19:20:25 +01:00
Max Kellermann
1f50146e29
ogg: check the ov_read() return value before the vorbis_info evaluation
...
The ov_info() return value may be corrupt when ov_read() did not
return a positive value. First check for success, then check
ov_info().
2008-11-20 12:45:17 +01:00
Laszlo Ashin
05f4629fa3
wavpack: redo using audio_format_frame_size()
...
Somehow we lost 600e1322
after renaming some variables in ed6f6046
.
2008-11-19 00:02:06 +01:00
Viliam Mateicka
33b5015469
ffmpeg: read tags from AVFormatContext
...
The ffmpeg library provides some of the song metadata in the
AVFormatContext struct. Pass it from there to MPD.
2008-11-18 20:03:00 +01:00
Viliam Mateicka
eac4ed2241
audiofile: fixed misplaced if
...
[mk: by definition, tag_new() cannot fail - removed check]
2008-11-18 19:54:42 +01:00
Max Kellermann
7591403566
input_stream: size==-1 means unknown size
...
Define the special value "-1" as "unknown size". Previously, there
was no indicator for streams with unknown size, which might confuse
some decoders.
2008-11-16 20:42:08 +01:00
Max Kellermann
8882f06200
ffmpeg: fixed AVSEEK_SIZE
...
With whence==AVSEEK_SIZE, the seek function should return the file
size, not the current offset. Check the return value of
input_stream_seek().
2008-11-16 20:25:31 +01:00
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
Laszlo Ashin
c368a2f91c
aac: fix compiler warnings on amd64
2008-11-15 11:54:22 +01:00
Laszlo Ashin
00da7db1e3
aac: don't try to free static buffer
...
In 432da18e
a dynamic buffer was replaced by a static one but some
frees were accidently left there which caused some segfaults.
2008-11-15 11:50:25 +01:00
László Áshin
440b1ea3ea
wavpack: be more robust if the underlying stream is not seekable
...
The wavpack open function gives us an option called OPEN_STREAMING. This
provides more robust and error tolerant playback, but it automatically
disables seeking. (More exactly the wavpack lib will not return the
length information.) So, if the stream is already not seekable we can
use this option safely.
2008-11-14 15:23:18 +01:00
László Áshin
c495c6f5af
wavpack: tolerate less decoded data than requested
...
Wavpack plugin doesn't stop decoding if a block couldn't be fully
decoded, rather it tries to go on.
2008-11-14 15:23:13 +01:00
László Áshin
ed6f60460d
wavpack: renamed variables and modified coding style slightly
2008-11-14 15:21:44 +01:00
Max Kellermann
7b7340f703
mp3: fix SEEK command check after mp3_synth_and_send()
...
mp3 seeking was broken, because the command==SEEK check was never
reached. Swap the command check order (==SEEK before !=NONE) to fix
that.
2008-11-13 14:43:19 +01:00
Max Kellermann
93f488f034
wavpack: remove commented debug messages
2008-11-12 21:25:08 +01:00
Max Kellermann
600e132280
wavpack: calculate outsamplesize with audio_format_frame_size()
2008-11-12 21:25:02 +01:00
Max Kellermann
ef80464c0c
ogg: revert "use ogg_fopen() instead of ogg_open()"
...
Unfortunately, ov_fopen() is not supported by libvorbis versions older
than 1.2.
2008-11-12 08:38:04 +01:00
Max Kellermann
b67a8e4d6e
aac: shift the input buffer before the full check
...
When the buffer was full, but everything was already consumed,
fillAacBuffer() would not attempt to flush and refill it.
2008-11-12 08:32:21 +01:00
Max Kellermann
432da18e44
aac: make the input buffer static
...
Allocate the input buffer within the AacBuffer struct.
2008-11-12 08:29:40 +01:00
Max Kellermann
487e05c67d
aac: reject SEEK commands
...
The aac plugin does not support seeking. Reject SEEK requests by
calling decoder_seek_error(). Quit the plugin's main loop only when
STOP is received.
2008-11-12 08:25:09 +01:00
Max Kellermann
a9723e661a
aac: get decoder command from decoder_data()
...
Removed a superfluous decoder_get_command() call.
2008-11-12 08:25:06 +01:00
Max Kellermann
35a4ca2421
aac: convert audio_format to temporary variable
...
The audio_format variable is only used and initialized for
decoder_initialized(). Move it into that block to save some bytes on
the stack.
2008-11-12 08:21:00 +01:00
Max Kellermann
39fa60769c
aac: removed method file_decode()
...
aac_stream_decode() was basically copy+pasted from aac_decode().
Since stream_decode() can also decode files, eliminate aac_decode().
2008-11-12 08:17:50 +01:00
Max Kellermann
e19b53f814
aac: check the buffer length in the ADIF parser
...
Check whether enough data has been read yet.
2008-11-12 08:16:54 +01:00
Max Kellermann
b30ec73099
aac: use unsigned integers and size_t where appropriate
2008-11-12 08:16:38 +01:00