Commit Graph

5079 Commits

Author SHA1 Message Date
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
a3645984cd command: "update" checks if the path is malformed
This is a very basic check, which only ensures that the path does not
begin with a slash, doesn't have double slashes and the special names
"." and ".." are forbidden.
2010-02-27 19:01:17 +01:00
Max Kellermann
43cf4e97b9 uri: allow leading dots, but explicitly exclude "." and ".."
Dots at the beginning of an URI segment are ok, as long as the special
names "." and ".." are not used.
2010-02-27 18:56:47 +01:00
Max Kellermann
795578ef95 update: log start/finish of the update thread 2010-02-27 16:41:54 +01:00
Max Kellermann
96493e0333 replay_gain: optionally use hardware mixer to apply replay gain
Add an option for each audio output which enables the use of the
hardware mixer, instead of the software volume code.

This is hardware specific, and assumes linear volume control.  This is
not the case for hardware mixers which were tested, making this patch
somewhat useless, but we will use it to experiment with the settings,
to find a good solution.
2010-02-17 08:14:07 +01:00
Max Kellermann
48b49e2303 replay_gain: fall back to track gain if album gain is unavailable 2010-02-17 08:13:34 +01:00
Max Kellermann
752dfb3d95 replay_gain: reimplement as a filter plugin
Apply the replay gain in the output thread.  This means a new setting
will be active instantly, without going through the whole music pipe.
And we might have different replay gain settings for each audio output
device.
2010-02-17 07:23:13 +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
Max Kellermann
c05e6a1275 replay_gain_info: use INFINITY to mark undefined values
The previous patch not only moved code, it also changed the check.
Negative gain values seem to be valid after all, there just was the
"magic" value 0.0 which means "not available".  This patch changes the
"magic" value to "INFINITY", and uses the C99 function isinf() to
check.  It might have been a better idea to use "NAN", but the "NAN"
macro is a GNU extension.
2010-02-17 07:07:00 +01:00
Max Kellermann
b21e4d9a58 replay_gain_state: moved code to replay_gain_tuple_scale()
Moved (and renamed) the function calc_replay_gain_scale() to
replay_gain_info.c.
2010-02-15 21:23:24 +01:00
Max Kellermann
eeef501ed8 replay_gain: added function defined()
This function determines whether replay gain data is available.
2010-02-15 19:09:24 +01:00
Max Kellermann
f4e9275f7c filter/volume: assign dest_size_r early, eliminate one 2010-02-15 19:09:09 +01:00
Max Kellermann
f672657388 Makefile.am: remove sticker.xml 2010-02-08 11:55:03 +01:00
Max Kellermann
32441175f4 doc: deleted sticker specification proposal
This document has been unmaintained for more than a year now (since
the day it was submitted).
2010-02-08 11:39:16 +01:00
Max Kellermann
059d1dc7f2 command: "listplaylist" dumps playlist files
Same for "listplaylistinfo".
2010-02-08 11:11:43 +01:00
Max Kellermann
7fbb856eee playlist_queue: moved code to playlist_mapper.c 2010-02-08 10:56:28 +01:00
Max Kellermann
bb2aa70ec6 playlist_queue: moved check_translate_song() to playlist_song.c 2010-02-08 10:28:12 +01:00
Max Kellermann
8e34c59c82 song_print: song_print() returns void
The only "return" statement always returns 0.
2010-02-08 10:21:15 +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
7a24e496d5 configure.ac: new libwrap autoconf test
Use MPD_AUTO_RESULT().  Don't force libwrap by default.
2010-01-20 21:42:43 +01:00
Davide Camurri
7a62818ffd client: optionally use libwrap 2010-01-20 21:04:07 +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
9cb7760c5e input_stream: added attribute "uri" 2010-01-18 10:18:41 +01:00
Max Kellermann
fb9bd53328 input_stream: added function input_stream_deinit()
All close() implementations must call this method.
2010-01-18 09:57:53 +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
Avuton Olrich
760569fc66 mpd version 0.15.8 2010-01-18 07:41:08 +01:00
Max Kellermann
9d4b7ab113 decoder_thread: don't fall back to "mad" unless no plugin matches
When all plugins have failed, MPD used to fall back to the "mad"
decoder plugin, to handle those radio streams without a Content-Type
response header.  This however leads to unexpected results (garbage
being played) when the stream isn't really mp3.  Since we care little
about "bad" streams, we shouldn't have hacks which have bad side
effects.

Let's get rid of this hack now!  Only try to "mad" plugin if there was
no match at all (Content-Type, path suffix) and no other plugin has
been tried.
2010-01-17 17:09:10 +01:00
Max Kellermann
8ac776c58b decoder_thread: don't try a plugin twice (MIME type & suffix)
Manage a linked list of plugins which were already tried.
2010-01-17 16:47:04 +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
006f4be71c fd_util: include ws2tcpip.h for socklen_t 2010-01-17 14:48:52 +01:00
Max Kellermann
163e05f5a0 fd_util: fixed WIN32 versions of pipe()
Use the correct parameter name.
2010-01-17 14:43:15 +01:00
Max Kellermann
02526eda86 text_file: don't strip trailing whitespace
Only delete the newline characters (\n and optionally \r).  This
allows the database file to store file names with trailing whitespace.
2010-01-17 12:52:11 +01:00
Max Kellermann
828a5f552f output/pulse: clear the "mainloop" attribute on error
When enabling the pulse device fails, clear po->mainloop after
pa_threaded_mainloop_free() has finished.  This is important for the
assertions.

Two wrong g_free() calls were also removed.
2010-01-17 12:03:22 +01:00
Max Kellermann
a7664b98ba Makefile.am: link test/run_decoder and test/read_tags with timer.c
Needed for the fluidsynth decoder plugin.
2010-01-17 11:21:35 +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
e43bf52cbb configure.ac: disable -Wdeclaration-after-statement
Allow declaration after statement.
2010-01-17 02:36:03 +01:00
Max Kellermann
26841b6058 output/alsa: support packed 24 bit samples 2010-01-17 00:43:24 +01:00
Max Kellermann
1abfcc56af audio_format: support packed 24 bit samples 2010-01-16 23:44:54 +01:00
Max Kellermann
da47afe7d1 output/alsa: probe all sample formats in a loop
More code simplification.  Probe all formats, no matter which input
format.
2010-01-16 23:44:52 +01:00
Max Kellermann
96546c1a8a output/alsa: merged code into alsa_output_try_format()
Remove the debug log messages, because they are duplicate (see
ao_open() in output_thread.c).
2010-01-16 23:44:50 +01:00
Max Kellermann
579a8a96ea output/alsa: pass sample_format to get_bitformat() 2010-01-16 23:44:48 +01:00
Max Kellermann
79848e3414 output/alsa: moved code to alsa_output_setup_format() 2010-01-16 23:44:42 +01:00