diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | NEWS | 10 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | doc/mpd.conf.5 | 131 | ||||
-rw-r--r-- | doc/user.xml | 97 | ||||
-rw-r--r-- | src/SongUpdate.cxx | 3 | ||||
-rw-r--r-- | src/TagFile.hxx | 3 | ||||
-rw-r--r-- | src/decoder/FfmpegDecoderPlugin.cxx | 7 | ||||
-rw-r--r-- | src/input/CdioParanoiaInputPlugin.cxx | 5 | ||||
-rw-r--r-- | src/mixer/AlsaMixerPlugin.cxx | 3 | ||||
-rw-r--r-- | src/output/OSXOutputPlugin.cxx | 6 | ||||
-rw-r--r-- | src/output/OpenALOutputPlugin.cxx | 2 |
12 files changed, 126 insertions, 143 deletions
diff --git a/.gitignore b/.gitignore index a520f12d0..3c8552099 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ libtool ltmain.sh missing mkinstalldirs +/test-driver mpd mpd.service stamp-h1 @@ -3,6 +3,16 @@ ver 0.19 (not yet released) - new commands "addtagid", "cleartagid" * new resampler option using libsoxr +ver 0.18.6 (not yet released) +* input + - cdio_paranoia: support libcdio-paranoia 0.90 +* output + - openal: fix build failure on Mac OS X + - osx: fix build failure +* mixer + - alsa: fix build failure with uClibc +* accept files without metadata + ver 0.18.5 (2013/11/23) * configuration - fix crash when db_file is configured without music_directory diff --git a/configure.ac b/configure.ac index c91e84404..1e3dfb098 100644 --- a/configure.ac +++ b/configure.ac @@ -827,6 +827,7 @@ MPD_AUTO_PKG(cdio_paranoia, CDIO_PARANOIA, [libcdio_paranoia], if test x$enable_cdio_paranoia = xyes; then AC_DEFINE([ENABLE_CDIO_PARANOIA], 1, [Define to enable libcdio_paranoia support]) + AC_CHECK_HEADERS(cdio/paranoia/paranoia.h) fi AM_CONDITIONAL(ENABLE_CDIO_PARANOIA, test x$enable_cdio_paranoia = xyes) diff --git a/doc/mpd.conf.5 b/doc/mpd.conf.5 index d92033179..6e3bae7b2 100644 --- a/doc/mpd.conf.5 +++ b/doc/mpd.conf.5 @@ -316,137 +316,6 @@ errors on bandwidth-limited devices. Some users have reported good results with this set to 50000, but not all devices support values this high. Most users do not need to change this. The default is 256000000 / sample_rate(kHz), or 5804 microseconds for CD-quality audio. -.SH OPTIONAL OSS OUTPUT PARAMETERS -.TP -.B device <dev> -This specifies the device to use for audio output. The default is "/dev/dsp". -.TP -.B mixer_device <mixer dev> -This specifies which mixer to use. The default is "/dev/mixer". -.TP -.B mixer_control <mixer ctrl> -This specifies which mixer control to use (sometimes referred to as the -"device"). The default is to use the main PCM mixer. An example is "Pcm". -.SH OPTIONAL PULSE OUTPUT PARAMETERS -.TP -.B server <server list> -A space separated list of servers to try to connect to. See -<\fBhttp://www.pulseaudio.org/wiki/ServerStrings\fP> for more details. The -default is to let PulseAudio choose a server. -If you specify more than one server name, MPD tries to connect to one -after another until it successfully establishes a connection. -.TP -.B sink <sink> -The sink to output to. The default is to let PulseAudio choose a sink. -.SH OPTIONAL JACK OUTPUT PARAMETERS -.TP -.B client_name <name> -The client name to use when connecting to JACK. The output ports <name>:left -and <name>:right will also be created for the left and right channels, -respectively. -.TP -.B ports <left_port,right_port> -This specifies the left and right ports to connect to for the left and right -channels, respectively. The default is to let JACK choose a pair of ports. -.TP -.B ringbuffer_size <size in bytes> -This specifies the size of the ringbuffer in bytes. The default is 32768. -.SH OPTIONAL AO OUTPUT PARAMETERS -.TP -.B driver <driver> -This specifies the libao driver to use for audio output. Possible values -depend on what libao drivers are available. See -<\fBhttp://www.xiph.org/ao/doc/drivers.html\fP> for information on some -commonly used drivers. Typical values for Linux include "oss" and "alsa09". -The default is "default", which causes libao to select an appropriate plugin. -.TP -.B options <opts> -This specifies the options to use for the selected libao driver. For oss, the -only option available is "dsp". For alsa09, the available options are: "dev", -"buf_size", and "periods". See <\fBhttp://www.xiph.org/ao/doc/drivers.html\fP> -for available options for some commonly used drivers. Options are assigned -using "=", and ";" is used to separate options. An example for oss: -"dsp=/dev/dsp". An example for alsa09: "dev=hw:0,0;buf_size=4096". The -default is "". -.TP -.B write_size <size in bytes> -This specifies how many bytes to write to the audio device at once. This -parameter is to work around a bug in older versions of libao on sound cards -with very small buffers. The default is 1024. -.SH REQUIRED FIFO OUTPUT PARAMETERS -.TP -.B path <path> -This specifies the path of the FIFO to output to. Must be an absolute path. -If the path does not exist it will be created when mpd is started, and removed -when mpd is stopped. The FIFO will be created with the same user and group as -mpd is running as. Default permissions can be modified by using the builtin -shell command "umask". If a FIFO already exists at the specified path it will -be reused, and will \fBnot\fP be removed when mpd is stopped. You can use the -"mkfifo" command to create this, and then you may modify the permissions to -your liking. -.SH REQUIRED SHOUT OUTPUT PARAMETERS -.TP -.B name <name> -This specifies not only the unique audio output name, but also the stream -title. -.TP -.B host <hostname> -This specifies the hostname of the icecast server to connect to. -.TP -.B port <port> -This specifies the port of the icecast server to connect to. -.TP -.B mount <mountpoint> -This specifies the icecast mountpoint to use. -.TP -.B password <password> -This specifies the password to use when logging in to the icecast server. -.TP -.B quality <quality> -This specifies the encoding quality to use. The value must be between 0 -and 10. Fractional values, such as 2.5, are permitted. Either the quality or -the bitrate parameter must be specified, but not both. For Ogg, a -higher quality number produces higher quality output. For MP3, it's -just the opposite, with lower numbers producing higher quality output. -.TP -.B bitrate <kbps> -This specifies the bitrate to use for encoding. Either the quality or the -bitrate parameter must be specified, but not both. -.TP -.B format <sample_rate:bits:channels> -This specifies the sample rate, bits per sample, and number of channels to use -for encoding. -.SH OPTIONAL SHOUT OUTPUT PARAMETERS -.TP -.B encoding <encoding> -This specifies which output encoding to use. Should be either "ogg" -or "mp3", "mp3" is needed for shoutcast streaming. The default is "ogg". -.TP -.B protocol <protocol> -This specifies the protocol that wil be used to connect to the -icecast/shoutcast server. The options are "shoutcast", "icecast1" and -"icecast2". The default is "icecast2". -.TP -.B user <username> -This specifies the username to use when logging in to the icecast server. The -default is "source". -.TP -.B public <yes or no> -This specifies whether to request that the stream be listed in all public -stream directories that the icecast server knows about. The default is no. -.TP -.B timeout <seconds> -This specifies the number of seconds to wait before giving up on trying to -connect to the icecast server. The default is 2 seconds. -.TP -.B description <description> -This specifies a description of the stream. -.TP -.B url <url> -This specifies a URL associated with the stream. -.TP -.B genre <genre> -This specifies the genre(s) of the stream. .SH FILES .TP .BI ~/.mpdconf diff --git a/doc/user.xml b/doc/user.xml index 05b9825d5..f07aba6c2 100644 --- a/doc/user.xml +++ b/doc/user.xml @@ -1555,6 +1555,59 @@ systemctl start mpd.socket</programlisting> The <varname>ao</varname> plugin uses the portable <filename>libao</filename> library. </para> + + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>Setting</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry> + <varname>driver</varname> + <parameter>D</parameter> + </entry> + <entry> + The <filename>libao</filename> driver to use for + audio output. Possible values depend on what libao + drivers are available. See <ulink + url="http://www.xiph.org/ao/doc/drivers.html">http://www.xiph.org/ao/doc/drivers.html</ulink> + for information on some commonly used drivers. + Typical values for Linux include "oss" and "alsa09". + The default is "default", which causes libao to + select an appropriate plugin. + </entry> + </row> + + <row> + <entry> + <varname>options</varname> + <parameter>O</parameter> + </entry> + <entry> + Options to pass to the selected + <filename>libao</filename> driver. + </entry> + </row> + + <row> + <entry> + <varname>write_size</varname> + <parameter>O</parameter> + </entry> + <entry> + This specifies how many bytes to write to the audio + device at once. This parameter is to work around a + bug in older versions of libao on sound cards with + very small buffers. The default is 1024. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </section> <section> @@ -1565,6 +1618,38 @@ systemctl start mpd.socket</programlisting> FIFO (First In, First Out) file. The data can be read by another program. </para> + + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>Setting</entry> + <entry>Description</entry> + </row> + </thead> + <tbody> + <row> + <entry> + <varname>path</varname> + <parameter>P</parameter> + </entry> + <entry> + This specifies the path of the FIFO to write to. + Must be an absolute path. If the path does not + exist, it will be created when MPD is started, and + removed when MPD is stopped. The FIFO will be + created with the same user and group as MPD is + running as. Default permissions can be modified by + using the builtin shell command "umask". If a FIFO + already exists at the specified path it will be + reused, and will not be removed when MPD is stopped. + You can use the "mkfifo" command to create this, and + then you may modify the permissions to your liking. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> </section> <section> @@ -2042,6 +2127,18 @@ systemctl start mpd.socket</programlisting> </row> <row> <entry> + <varname>protocol</varname> + <parameter>icecast2|icecast1|shoutcast</parameter> + </entry> + <entry> + Specifies the protocol that wil be used to connect + to the icecast/shoutcast server. The default + is "<parameter>icecast2</parameter>". + + </entry> + </row> + <row> + <entry> <varname>mount</varname> <parameter>URI</parameter> </entry> diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index b4a9edc1a..6e5e37a2b 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -89,8 +89,7 @@ Song::UpdateFile() TagBuilder tag_builder; if (!tag_file_scan(path_fs, - &full_tag_handler, &tag_builder) || - !tag_builder.IsDefined()) + &full_tag_handler, &tag_builder)) return false; if (tag_builder.IsEmpty()) diff --git a/src/TagFile.hxx b/src/TagFile.hxx index 90d21dc0f..d1dbb3e46 100644 --- a/src/TagFile.hxx +++ b/src/TagFile.hxx @@ -28,6 +28,9 @@ struct tag_handler; /** * Scan the tags of a song file. Invokes matching decoder plugins, * but does not invoke the special "APE" and "ID3" scanners. + * + * @return true if the file was recognized (even if no metadata was + * found) */ bool tag_file_scan(Path path, diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx index bef74e367..a14b04510 100644 --- a/src/decoder/FfmpegDecoderPlugin.cxx +++ b/src/decoder/FfmpegDecoderPlugin.cxx @@ -119,8 +119,7 @@ mpd_ffmpeg_stream_seek(void *opaque, int64_t pos, int whence) if (whence == AVSEEK_SIZE) return stream->input.size; - Error error; - if (!stream->input.LockSeek(pos, whence, error)) + if (!stream->input.LockSeek(pos, whence, IgnoreError())) return -1; return stream->input.offset; @@ -341,11 +340,9 @@ ffmpeg_probe(Decoder *decoder, InputStream &is) PADDING = 16, }; - Error error; - unsigned char buffer[BUFFER_SIZE]; size_t nbytes = decoder_read(decoder, is, buffer, BUFFER_SIZE); - if (nbytes <= PADDING || !is.LockRewind(error)) + if (nbytes <= PADDING || !is.LockRewind(IgnoreError())) return nullptr; /* some ffmpeg parsers (e.g. ac3_parser.c) read a few bytes diff --git a/src/input/CdioParanoiaInputPlugin.cxx b/src/input/CdioParanoiaInputPlugin.cxx index de699ea3a..73fb8acdd 100644 --- a/src/input/CdioParanoiaInputPlugin.cxx +++ b/src/input/CdioParanoiaInputPlugin.cxx @@ -42,7 +42,12 @@ #include <glib.h> #include <assert.h> +#ifdef HAVE_CDIO_PARANOIA_PARANOIA_H +#include <cdio/parannoia/paranoia.h> +#else #include <cdio/paranoia.h> +#endif + #include <cdio/cd_types.h> struct CdioParanoiaInputStream { diff --git a/src/mixer/AlsaMixerPlugin.cxx b/src/mixer/AlsaMixerPlugin.cxx index 7defdd7be..b81ca4246 100644 --- a/src/mixer/AlsaMixerPlugin.cxx +++ b/src/mixer/AlsaMixerPlugin.cxx @@ -24,6 +24,7 @@ #include "Main.hxx" #include "event/MultiSocketMonitor.hxx" #include "event/Loop.hxx" +#include "event/Call.hxx" #include "util/ASCII.hxx" #include "util/ReusableArray.hxx" #include "util/Error.hxx" @@ -46,7 +47,7 @@ class AlsaMixerMonitor final : private MultiSocketMonitor { public: AlsaMixerMonitor(EventLoop &_loop, snd_mixer_t *_mixer) :MultiSocketMonitor(_loop), mixer(_mixer) { - _loop.AddCall([this](){ InvalidateSockets(); }); + BlockingCall(_loop, [this](){ InvalidateSockets(); }); } private: diff --git a/src/output/OSXOutputPlugin.cxx b/src/output/OSXOutputPlugin.cxx index 7debe6ab2..97ebae056 100644 --- a/src/output/OSXOutputPlugin.cxx +++ b/src/output/OSXOutputPlugin.cxx @@ -363,9 +363,9 @@ osx_output_open(struct audio_output *ao, AudioFormat &audio_format, OSStatus status = AudioUnitInitialize(od->au); if (status != noErr) { - error.Set(osx_output_domain, status, - "Unable to initialize OS X audio unit: %s", - GetMacOSStatusCommentString(status)); + error.Format(osx_output_domain, status, + "Unable to initialize OS X audio unit: %s", + GetMacOSStatusCommentString(status)); return false; } diff --git a/src/output/OpenALOutputPlugin.cxx b/src/output/OpenALOutputPlugin.cxx index e753b206f..268cf17cc 100644 --- a/src/output/OpenALOutputPlugin.cxx +++ b/src/output/OpenALOutputPlugin.cxx @@ -25,7 +25,7 @@ #include <glib.h> -#ifndef HAVE_OSX +#ifndef __APPLE__ #include <AL/al.h> #include <AL/alc.h> #else |