Commit Graph

9094 Commits

Author SHA1 Message Date
Max Kellermann
554888318a net/StaticSocketAddress: use SocketAddress::size_type 2015-07-21 10:39:50 +02:00
Max Kellermann
49aaf98a7f net/StaticSocketAddress: include cleanup 2015-07-21 10:38:58 +02:00
Max Kellermann
6f7bfa71a9 lib/icu/Collate: remove GLib implementation
There is not much use in GLib: on Windows, we have a native API for
string collation, and the rest uses either libicu or the standard C
library calls.
2015-06-27 16:05:54 +02:00
Max Kellermann
fb3564fbe7 lib/icu/Collate: use LCMapStringEx() on Windows 2015-06-27 15:52:37 +02:00
Max Kellermann
3fa4dad418 lib/icu/Converter: remove GLib implementation
We don't need this anymore: Win32 doesn't use this library at all, and
everything else has either iconv() or libicu.
2015-06-26 16:51:18 +02:00
Max Kellermann
0756607e32 lib/icu/Converter: add iconv() implementation 2015-06-26 16:49:25 +02:00
Max Kellermann
a03be5a8a6 lib/icu/Converter: add missing <> 2015-06-26 16:49:25 +02:00
Max Kellermann
39c5bb95d2 CommandLine: show more compile-time features in --version 2015-06-26 16:42:06 +02:00
Max Kellermann
4d33b089da CommandLine: update copyright year 2015-06-26 16:32:52 +02:00
Max Kellermann
58996b841a config/Global: allow calling config_get_string() with one argument
default_value defaults to nullptr.
2015-06-26 08:06:40 +02:00
Max Kellermann
df03a7b3f8 config/Templates: mark http_proxy_* deprecated 2015-06-26 08:06:40 +02:00
Max Kellermann
ac03871174 Main: remove g_set_application_name() call
Since we are removing GLib, this call is useless.
2015-06-26 07:59:58 +02:00
Max Kellermann
2a086d20c6 fs/Glob: remove GLib implementation
I suppose there is no non-WIN32 operating system that doesn't have
fnmatch().  So let's remove the GLib implementation.
2015-06-26 07:56:34 +02:00
Max Kellermann
d5cfa6d4dc TagId3: remove the "id3v1_encoding" setting
Drop support for misencoded tags.  People should not be using ID3v1
anyway.
2015-06-26 00:15:24 +02:00
Max Kellermann
f415167e59 config/Templates: add attribute "deprecated" 2015-06-26 00:11:33 +02:00
Max Kellermann
9477db2363 config/Templates: add constructor with defaulted "repeat" parameter 2015-06-26 00:11:23 +02:00
Max Kellermann
8d11577ff2 lib/icu/{Converter,Collate}: return AllocatedString 2015-06-25 23:44:16 +02:00
Max Kellermann
037d1d9ad1 util/AllocatedString: add methods Duplicate(), Clone() 2015-06-25 23:44:16 +02:00
Max Kellermann
619ef2b341 util/AllocatedString: add method empty() 2015-06-25 23:44:16 +02:00
Max Kellermann
f06fe76d35 SongFilter: add assertion to StringMatch() 2015-06-25 23:29:07 +02:00
Max Kellermann
eb86fdfbea SongFilter: return "const char *" instead of std::string 2015-06-25 23:15:36 +02:00
Max Kellermann
c7712e2ef0 lib/icu/Collate: fall back to strxfrm() 2015-06-25 23:01:29 +02:00
Max Kellermann
61fa770644 lib/icu/Collate: fix indent 2015-06-25 22:55:57 +02:00
Max Kellermann
334bd73792 lib/icu/Collate: fall back to strcoll() instead of strcasecmp() 2015-06-23 13:26:45 +02:00
Max Kellermann
090ce262c4 lib/icu/Collate: use CompareStringEx() on Windows 2015-06-23 13:20:41 +02:00
Max Kellermann
d551d40886 fs/NarrowPath: use the WideCharToMultiByte() wrapper 2015-06-23 13:20:11 +02:00
Max Kellermann
aecfcaa8a2 lib/icu/Win32: wrappers for WideCharToMultiByte(), MultiByteToWideChar() 2015-06-23 13:20:11 +02:00
Max Kellermann
61a3028788 util/AllocatedString: remove bogus code from operator= 2015-06-23 13:20:11 +02:00
Max Kellermann
11d048b8e3 util/AllocatedString: new utility class 2015-06-23 12:48:21 +02:00
Max Kellermann
d814a01f2a fs/Path: include cleanup 2015-06-23 12:35:13 +02:00
Max Kellermann
4c0916df79 fs/Path: use base class StringPointer 2015-06-23 12:34:45 +02:00
Max Kellermann
e4844b9936 util/StringPointer: new utility class 2015-06-23 12:34:44 +02:00
Max Kellermann
60aa8c527b fs/Path: use method c_str() internally 2015-06-23 12:34:43 +02:00
Max Kellermann
9f7c3b8ea6 fs/Config: remove charset auto-detection via GLib
The default is always UTF-8.
2015-06-22 22:35:54 +02:00
Max Kellermann
9f4f1bab39 LogBackend: remove character set support
Always write UTF-8 to the log file.
2015-06-22 22:33:37 +02:00
Max Kellermann
73bd6af0f9 fs/Charset: hard-code Windows to ACP
Don't define HAVE_FS_CHARSET, and make GetFSCharset() return "ACP"
instead of "UTF-8".  Ignore the configuration setting, which had no
effect anyway.
2015-06-22 22:20:10 +02:00
Max Kellermann
2aa54c5365 fs/Glob: use PathMatchSpec() on Windows 2015-06-22 22:12:08 +02:00
Max Kellermann
bc8542503d fs/Glob: use fnmatch() if available 2015-06-22 22:12:08 +02:00
Max Kellermann
a6aea4ba58 fs/Glob: make constructor "explicit" 2015-06-22 22:12:08 +02:00
Max Kellermann
0b41faec89 db/update/ExcludeList: remove obsolete TODO comments 2015-06-22 22:12:08 +02:00
Max Kellermann
50eac9b49e db/update/ExcludeList: move class Pattern to fs/Glob.hxx 2015-06-22 22:12:08 +02:00
Max Kellermann
b4fc2e38ab pcm/Interleave: add stereo optimization 2015-06-22 17:27:29 +02:00
Max Kellermann
16639f9d71 pcm/Interleave: instantiate a 16 bit optimization 2015-06-22 17:20:37 +02:00
Max Kellermann
22f2605e25 pcm/Interleave: convert PcmInterleave32() to template 2015-06-22 17:19:42 +02:00
Max Kellermann
69476b4f21 pcm/Interleave: add optimization for 32 bit samples
Move code from the "vorbis" decoder.
2015-06-22 16:32:06 +02:00
Max Kellermann
fdf92c5f3b pcm/Interleave: add "restrict" keywords 2015-06-22 16:32:06 +02:00
Max Kellermann
eed1a3c239 decoder/ffmpeg: move code to pcm/Interleave.cxx 2015-06-22 14:42:19 +02:00
Max Kellermann
94c037821b decoder/ffmpeg: check for commands earlier
Improve initial seek by not reading/decoding the first frame before
checking for the seek command.
2015-06-22 14:42:19 +02:00
Max Kellermann
e38e8eb636 decoder/vorbis: check STOP before entering the loop 2015-06-22 14:40:51 +02:00
Max Kellermann
bef8c83388 OutputThread: move code to CloseOutput() 2015-06-22 13:02:13 +02:00
Max Kellermann
2e98324486 lib/ffmpeg/Buffer: add "malloc" attribute 2015-06-22 09:11:22 +02:00
Thomas Guillem
6e2d7445c5 InputStream: add ReadFull method
Convenient method that behave differently than Read, and that will be used by
tag scanners.

This method will return in case of error, if the whole data is read or is EOF
is reached.
2015-06-22 08:51:14 +02:00
Max Kellermann
90e7ace980 release v0.19.10
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVhsF2AAoJECNuiljG20US2OUQAIyDcaUCFgUa2CYa7MftCPGc
 dYJFwf+6Y2fJdSXcogYZmXNKNjFbPAZ4qqGdoNfI5a0rLxMarmL4DyjziAWi3ETB
 MOkZK65Y5ySyyw69e+i/XsOwOn8rm6jDuwHKpT7wVJNjvZ8nA8esvu5b1Ief5LBd
 UwEmn5DtKjA7dErHEYd2YvMK0xm+YmoKXuhmJKAn3sQdCEldgH4T5BCdOqmfrHWX
 BYmNxmP3PU9Tqi7XHTSFZJn6vWiXhOoWr4Cb7K54j49sRV2B4QMWX1CLyK4+Jwmk
 NZwD1IoGtoks5twfMTA9F9dBV/CPAWT69E0LIvaFJwCyoPCEnEi6k41bRAWK7P65
 QwKxdtY/GZnVFpiqXba+wkD6VBa5wmkjS10+cIBhz3CVCEE+N5YacubUw5JieYg3
 kOG2htSF1YP/Mo+IAObO9doQWHnDUavVhhpQ8UyqQ1bDMsmaEpfE16TRmlY/l5wx
 Aor2p6D3c0E0IGpEwjOl6T9pDql4dyTdrRLLXJ6oD9iYv2rDdahctBRdyFZ1mRwX
 oNUz8bfGDrshHVvwjQTr2b4O+w+yc+RSuJcyCGGcn5LakBuiM6vYNYuZzq3Yj/RK
 Wk7RErVsbtY4ZRH06Lf5MSM5TflnrfQmzkUB0rZ0XoDyweoHOHPyzKhvBaKhadNh
 UnEx4kCOvWdjFXUVWH3Q
 =MrVf
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.10'
2015-06-21 16:06:02 +02:00
Max Kellermann
06301e279c PlayerThread: start the decoder on PlayerCommand::QUEUE
Fixes missing SongBorder() call, which causes "single" mode breakage.
2015-06-21 15:38:48 +02:00
Max Kellermann
6d6f274648 DecoderAPI: discard unused song tag early
If there's a stream tag, don't let the song tag override it in the
next update_stream_tag() call.
2015-06-21 15:10:55 +02:00
Max Kellermann
9acefcb256 DecoderThread: set Decoder::song_tag only for local files
If the song tag comes from a stream, and MPD playback restarts, MPD
would believe the tag should override the newly received tag.  This
makes the previous tag appear stuck.  This change passes the song tag
only if it's authoritative - i.e. if it's a song file.
2015-06-21 15:02:14 +02:00
Max Kellermann
e4d0293a31 DecoderAPI: "move" the Tag object
Reduce runtime overhead.
2015-06-20 16:06:09 +02:00
Romain Rollet
ae77542a11 OutputControl: fix fail_timer check right after booting
Right after booting, the monotonic clock starts with a very small
value, and AudioOutput::LockUpdate() may believe that the fail_timer
has not recovered yet.
2015-06-20 15:37:19 +02:00
Max Kellermann
980187f856 system/PeriodClock: make IsDefined() "constexpr" 2015-06-20 15:33:17 +02:00
Max Kellermann
2b0a127fa5 pcm/soxr: fix recipe parser 2015-06-20 15:25:00 +02:00
Max Kellermann
327a8e6c59 decoder/ffmpeg: skip unwanted samples after seeking
When seeking to the beginning of a packet, skip the samples that come
before the desired time stamp.
2015-06-20 15:01:05 +02:00
Max Kellermann
d11e2724c4 decoder/ffmpeg: use AVSEEK_FLAG_BACKWARD for seeking
Ask FFmpeg to seek to the next packet boundary *before* the seek
position, so we don't miss audio data.  Now we get too much, but we'll
solve that in the next commit.
2015-06-20 14:29:42 +02:00
Max Kellermann
f768ca3a2d decoder/ffmpeg: move code to StreamRelativePts() 2015-06-19 18:56:29 +02:00
Max Kellermann
947e902288 input/curl: trigger the condition variable in RequestDone()
Fixes deadlock on small responses.
2015-06-19 16:45:38 +02:00
Thomas Guillem
3436a646b5 storage/nfs: fix deadlock when connecting
The Connect method can be called between Schedule and lock. In that case, when
locked, the state is already set to CONNECTING of READY and the condition won't
be signaled anymore.
2015-05-29 22:39:14 +02:00
jai
aed0af1e00 input/smbclient: fix DFF playback 2015-05-29 22:37:49 +02:00
Michal Nazarewicz
0d7ee2b014 OpusEncoderPlugin: initialise granulepos so we end up with sane values
Not initialising granulepos leads to it having arbitrary values in the
encoded stream including possibly negative values which are not valid
and confuse opusdec.  Explicitly initialise opus_encoder::granulepos
to avoid that problem.
2015-03-25 18:02:54 +01:00
Max Kellermann
cd1148c6aa db/update/ExcludeList: use the NarrowPath class 2015-03-25 17:32:17 +01:00
Max Kellermann
cfd26f53f0 fs/io/FileOutputStream: fix wrong #ifdef WIN32 2015-03-25 17:28:27 +01:00
Max Kellermann
69ad5671ed Playlist*: use the BufferedOutputStream API instead of FILE* 2015-03-24 22:03:20 +01:00
Max Kellermann
f9e0f0d257 PlaylistSave: return bool/Error instead of PlaylistResult 2015-03-24 22:03:17 +01:00
Max Kellermann
98f3135ad3 PlaylistFile: export spl_map_to_fs() and TranslatePlaylistError() 2015-03-24 22:03:17 +01:00
Max Kellermann
8c9c3a91e6 PlaylistFile: eliminate redundant spl_map() calls 2015-03-24 22:03:17 +01:00
Max Kellermann
7f3518333d Mapper: don't use C-style prototypes 2015-03-24 22:03:17 +01:00
Max Kellermann
f1f871f103 fs/io/FileOutputStream: add method Tell() 2015-03-24 22:00:10 +01:00
Max Kellermann
6387b52896 fs/io/FileOutputStream: seek end-of-file in AppendFileOutputStream ctor 2015-03-24 21:59:34 +01:00
Max Kellermann
077e95da85 system/FileDescriptor: add method Tell() 2015-03-24 21:59:34 +01:00
Max Kellermann
7f6e1fbc8d fs/io/FileOutputStream: add class AppendFileOutputStream 2015-03-23 22:51:33 +01:00
Max Kellermann
06827cfcf1 fs/io/FileOutputStream: move code to new class BaseFileOutputStream 2015-03-23 22:36:03 +01:00
Max Kellermann
6dc3097998 fs/io/FileOutputStream: make "path" const 2015-03-23 22:35:56 +01:00
Max Kellermann
cd35271698 fs/io/BufferedOutputStream: add code comments 2015-03-23 22:03:25 +01:00
Max Kellermann
7b575f61d0 Main: notify systemd when MPD is ready 2015-03-21 14:27:54 +01:00
Max Kellermann
b31d171ae8 *: doxygen fixups 2015-03-17 11:21:43 +01:00
Max Kellermann
65ff72cdf8 fs/Traits: enable _UNICODE on Windows
Use wchar_t for everything on Windows.  Solves a lot of filesystem
charset problems.
2015-03-05 10:15:10 +01:00
Max Kellermann
1da0956331 output/recorder: convert path to UTF-8 for logging 2015-03-05 10:15:10 +01:00
Max Kellermann
983078992d fs/NarrowPath: new utility class 2015-03-05 10:07:07 +01:00
Max Kellermann
81059f80d8 output/winmm: convert device name to filesystem charset 2015-03-05 10:07:07 +01:00
Max Kellermann
a261442279 output/winmm: eliminate "goto" 2015-03-05 10:07:07 +01:00
Max Kellermann
2f41eba100 fs/Path: reimplement GetSuffix() using GetBase() and StringFindLast() 2015-03-05 10:07:07 +01:00
Max Kellermann
91a6fb81c1 PlaylistStream: convert suffix to UTF-8 2015-03-05 10:07:07 +01:00
Max Kellermann
c95f0820bc TagFile: convert suffix to UTF-8 2015-03-05 10:07:07 +01:00
Max Kellermann
830a1bd130 fs/File{System,Info}: fix regular file check
Don't use FILE_ATTRIBUTE_NORMAL, it's a "magic" value for something
else.  To check if a file is a regular file, we need to check if it's
NOT a directory (or a device).
2015-03-05 10:07:07 +01:00
Max Kellermann
5c5ea8a254 fs/Path: use the "const_pointer" typedef 2015-03-05 10:07:07 +01:00
Max Kellermann
5222c684d3 event/ServerSocket: #ifdef out local socket support on Windows 2015-03-05 10:07:07 +01:00
Max Kellermann
5798faa13b util/StringUtil: add wchar_t overloads 2015-03-05 10:06:56 +01:00
Max Kellermann
a062693875 util/StringAPI: add wchar_t overloads 2015-03-05 08:58:04 +01:00
Max Kellermann
6887d5d347 fs/Traits: use TCHAR on Windows 2015-03-05 08:58:04 +01:00
Max Kellermann
39c9669445 fs/Traits: add macro PATH_LITERAL() 2015-03-05 08:58:04 +01:00
Max Kellermann
44565e22a0 fs/Traits: use string.h API wrappers 2015-03-05 08:58:04 +01:00
Max Kellermann
ddec10d494 input/Open: convert UTF-8 to filesystem charset for OpenLocalInputStream() 2015-03-05 08:51:01 +01:00
Max Kellermann
758e969cb6 input/Open: use PathTraitsUTF8 to check UTF-8 path 2015-03-05 08:40:34 +01:00
Max Kellermann
a9a6a5041b db/Configured: convert path to UTF-8 before injecting into configuration 2015-03-05 08:38:50 +01:00
Max Kellermann
59dd8ffbc6 PlaylistFile: use Path::ToUTF8() instead of PathToUTF8() 2015-03-05 08:37:00 +01:00
Max Kellermann
8f9fe1b11a PlaylistFile: don't insert "file://" before absolute paths
This prefix is deprecated.
2015-03-05 08:36:17 +01:00
Max Kellermann
9ed0152cf2 unix/PidFile: use the UTF-8 path for error message 2015-03-05 08:09:08 +01:00
Max Kellermann
250332a8d5 util/StringUtil: reorder functions 2015-03-04 20:22:05 +01:00
Max Kellermann
39825c6622 util/ASCII: strip include guard 2015-03-04 20:05:39 +01:00
Max Kellermann
cee3070ca4 output/winmm: use StringStartsWith() instead of strstr() 2015-03-04 08:58:59 +01:00
Max Kellermann
cd08e5c7da fs/io/FileOutputStream: use class FileDescriptor 2015-03-03 23:04:25 +01:00
Max Kellermann
dd4beea44c system/FileDescriptor: Close() returns bool 2015-03-03 23:04:25 +01:00
Max Kellermann
5b48d59769 system/FileDescriptor: add "mode" parameter to Open() 2015-03-03 22:29:09 +01:00
Max Kellermann
4dec12fcfc system/FileDescriptor: move O_NOCTTY|O_CLOEXEC to Open() 2015-03-03 22:20:51 +01:00
Max Kellermann
57ad3aca8e input/file: use class FileReader 2015-03-03 21:48:45 +01:00
Max Kellermann
f677f42be7 system/FileDescriptor: remove bogus assertions 2015-03-03 21:48:45 +01:00
Max Kellermann
a5760670ef fs/io/FileReader: add method GetFileInfo() 2015-03-03 21:41:11 +01:00
Max Kellermann
f04a3ec201 fs/io/FileReader: add move constructor 2015-03-03 21:41:10 +01:00
Max Kellermann
f402c5fe3c input/file: pass UTF-8 URI to InputStream ctor 2015-03-03 21:17:56 +01:00
Max Kellermann
9352e25392 input/file: add missing fcntl.h include for posix_fadvise() 2015-03-03 21:17:47 +01:00
Max Kellermann
1c90b0c19d *: change C-style prototypes, drop "(void)" 2015-03-03 20:05:08 +01:00
Max Kellermann
cd776ff1a8 system/FileDescriptor: fix WIN32 checks 2015-03-03 19:44:32 +01:00
Max Kellermann
40a587bbaf system/FileDescriptor: new wrapper class for a file descriptor 2015-03-03 17:14:30 +01:00
Max Kellermann
818d729d8b system/fd_util: remove unused functions 2015-03-03 17:07:52 +01:00
Max Kellermann
dd5daa0767 fs/io/FileReader: add method Seek() 2015-03-03 14:29:36 +01:00
Max Kellermann
ef5090c397 db/update/Container: convert vtrack name to FS charset 2015-03-03 13:20:43 +01:00
Max Kellermann
cf073de36c storage/local: convert mangled URI to FS charset 2015-03-03 13:18:15 +01:00
Max Kellermann
f16054639b storage/local: use PathTraitsFS typedefs 2015-03-03 13:12:54 +01:00
Max Kellermann
b0983e8708 fs/Traits: add Find() 2015-03-03 12:44:07 +01:00
Max Kellermann
0febb218ed FileCommands: use Path::HasNewline() 2015-03-03 12:42:27 +01:00
Max Kellermann
dfcfeeb550 fs/Traits: use std::char_traits 2015-03-03 12:28:47 +01:00
Max Kellermann
820debf45a util/StringUtil: add FindStringSuffix() 2015-03-03 11:29:31 +01:00
Max Kellermann
c19292c036 Util/StringUtil: use std::copy_n() 2015-03-02 22:35:59 +01:00
Max Kellermann
4ee81e6a3d PlaylistFile: limit variable scope 2015-03-02 22:19:47 +01:00
Max Kellermann
87a8a3e22f PlaylistFile: move memchr() call to class Path 2015-03-02 21:48:37 +01:00
Max Kellermann
e9125ef8e4 PlaylistFile: use PathTraitsFS typedefs 2015-03-02 21:47:33 +01:00
Max Kellermann
6ff394bcc9 StorageCommands: use PathTraitsUTF8 for protocol argument 2015-03-02 21:25:55 +01:00
Max Kellermann
7ce96585f5 fs/Path: add method GetSuffix()
Type-safe wrapper for uri_get_suffix().
2015-03-01 01:09:53 +01:00
Max Kellermann
41cc31c124 SongUpdate: use OpenArchiveInputStream() to open archive file
Don't pass Path::c_str() to tag_stream_scan() which requires a UTF-8
string.
2015-03-01 00:48:44 +01:00
Max Kellermann
605af61a0f db/simple: eliminate UpdateFileInArchive() if archive API is disabled
Reduce some unnecessary overhead.
2015-03-01 00:25:30 +01:00
Max Kellermann
77e163e5b8 Mapper: use Path::IsAbsolute() 2015-02-28 23:50:18 +01:00
Max Kellermann
0e00b9009d fs/Path: pass Path to Relative() 2015-02-28 23:45:16 +01:00
Max Kellermann
a6dd998d31 fs/AllocatedPath: use PathTraitsFS::Relative()
Eliminate duplicate code.
2015-02-28 23:30:53 +01:00
Max Kellermann
cdd0ccc67a fs/Path: rename RelativeFS() to Relative() 2015-02-28 23:19:34 +01:00
Max Kellermann
a918821868 fs/Traits: add missing dereference in RelativePathImpl() 2015-02-28 23:19:34 +01:00
Max Kellermann
c637b96f10 Win32Main: use TCHAR where appropriate 2015-02-28 23:15:46 +01:00
Max Kellermann
44b9197354 Mapper: use class Path 2015-02-28 23:00:27 +01:00
Max Kellermann
7a8f96b1dd FileCommands: use PathTraitsFS typedefs 2015-02-28 23:00:26 +01:00
Max Kellermann
f4f21f462d fs/CheckFile: convert path to UTF-8 for error message 2015-02-28 23:00:26 +01:00
Max Kellermann
d09b8b5bd7 fs/FileInfo: use GetFileAttributesEx() on WIN32 2015-02-28 23:00:26 +01:00
Max Kellermann
ee327db517 fs/FileSystem: remove unused WIN32 port of StatFile() 2015-02-28 23:00:26 +01:00
Max Kellermann
90a61b6bab fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann
00583bc4a8 FileCommands: skip special files completely
Previously, MPD printed the time stamp without printing the file
name.  That made no sense.
2015-02-28 23:00:26 +01:00
Max Kellermann
2d06a8e880 storage/FileInfo: rename to StorageFileInfo 2015-02-28 23:00:26 +01:00
Max Kellermann
e1a434edbc fs/Path: make IsAbsolute() const 2015-02-28 23:00:26 +01:00
Max Kellermann
6b3b1cbd99 fs/FileSystem: use GetFileAttributes() on WIN32 if possible 2015-02-27 19:15:31 +01:00
Max Kellermann
4dd861ee23 fs/FileSystem: merge CheckAccess() into PathExists()
PathExists() should better do what CheckAccess() does, and
CheckAccess() doesn't do what its name implies.
2015-02-27 19:13:46 +01:00
Max Kellermann
4f0f81a047 fs/DirectoryReader: use FindFirstFile(), FindNextFile() on WIN32 2015-02-26 18:11:02 +01:00
Max Kellermann
e3908c8de6 fs/Traits: add constant CURRENT_DIRECTORY 2015-02-25 19:53:35 +01:00
Max Kellermann
81c49fba03 fs/AllocatedPath: add nullptr_t constructor 2015-02-25 19:53:35 +01:00
Max Kellermann
eb174d5ba3 fs/{Allocated,}Path,Charset: use PathTraitsFS typedefs 2015-02-25 19:17:45 +01:00
Max Kellermann
4c899e9c5a fs/FileSystem: remove unused FOpenModes 2015-02-25 19:17:45 +01:00
Max Kellermann
00b0f6ad51 fs/io/File{Reader,OutputStream}: convert path to UTF-8 for error message 2015-02-25 19:10:51 +01:00
Max Kellermann
fe1e467a49 db/ExcludeList: use the TextFile class instead of stdio.h 2015-02-25 16:25:26 +01:00
Max Kellermann
64b9e7fd48 util/DynamicFifoBuffer: adjust include guard 2015-02-16 00:53:59 +01:00
Max Kellermann
12de22d3bb net/StaticSocketAdress: new class wrapping struct sockaddr_storage 2015-02-13 21:16:43 +01:00
Max Kellermann
821bc6d777 system/ByteOrder: use GCC built-ins if available 2015-02-12 11:05:02 +01:00
Max Kellermann
6e66a5b77b net/Resolver: relax size check in LocalAddressToString()
Handles abstract sockets on Linux.
2015-02-10 22:47:26 +01:00
Max Kellermann
cf5c10bbe6 net/Resolver: move code to LocalAddressToString() 2015-02-10 22:46:04 +01:00
Max Kellermann
4e30e74739 net/SocketAddress: light wrapper for struct sockaddr 2015-02-10 22:06:06 +01:00
Max Kellermann
42890b9acf system/{Resolver,Socket{Error,Util}}: move to new library libnet.a 2015-02-10 22:06:06 +01:00
Max Kellermann
33a27379f9 Listen: add "override" 2015-02-10 22:05:57 +01:00
Max Kellermann
0cf57cc7ca event/ServerSocket: remove obsolete macro DEFAULT_PORT 2015-02-10 20:27:45 +01:00
Max Kellermann
68fcbaf4c8 event/ServerSocket: remove obsolete typedef 2015-02-10 20:24:23 +01:00
Max Kellermann
9c83d3c78c fs/io/FileOutputStream: use CREATE_ALWAYS instead of TRUNCATE_EXISTING
Fixes yet another breakage of creating the database+state file on
Windows.
2015-02-10 13:41:09 +01:00
Max Kellermann
676dfabc91 command/{Queue,File}Commands: drop "file:///" prefix for absolute paths
Requiring this prefix makes the client's intention very clear, but it
was too hard to understand why this prefix was needed.  Initially, my
intention was to differentiate from broken clients which prefix relate
URIs with a slash; once MPD allowed that.  In the past few years
however, MPD has disallowed that, and there was no significant
breakage (except for the "add /" special case which some clients
apparently still do).  So I figure it's about time to define that an
URI that begins with a slash points to an arbitrary file on the file
system.
2015-02-09 07:55:06 +01:00
Max Kellermann
60e6d1d61b fs/Charset: convert #ifdef to regular "if" 2015-02-09 07:44:21 +01:00
Max Kellermann
975e275030 fs/Charset: change FixSeparators() API to use std::string&& 2015-02-08 17:52:01 +00:00
Max Kellermann
afcd5670e3 Listen: remove C-style "void" 2015-02-07 12:15:10 +00:00
Max Kellermann
ff2b427cc1 release v0.19.9
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJU1OdDAAoJECNuiljG20USazsQAKZuhjJJ8vjYCB7G/NGoi9tv
 dImBQnQDiQTdE57kxa46loknbPc5/cSAYnLbR4PjQfMBqArtE6sAkAk72LKlYNqt
 qMOEKPCBjv8ZjiGDbvL/X+WSKbrpm8iOf3Gu5BRIuWrMK/oXQMe5A028Ziyye//X
 XfMKdPWkZFL6h/qGO082eCnCiTJaSRLwP6HSNF2pqv+JuFF7hyLkZvTVXo/ms85E
 ezrx3Kjf8TuNX041uuso7qqUsD/sY2jZRZ26qfzJ1ODwJmgIfbXzat+ODFVNne55
 E1nh5zpwIUxZ2+d6eJEzwLR3+FpmltPc1YLo2mnetD6f59SzpXjAycPLo1VoOhbQ
 s4iXQEzNI2LwDebI3eiMXQaLIorHOGex3L6JYkO5LAqUkPrv/PBCJFJs8ixjCRbl
 KL27WmWYiV0xfdCz4TtAxEt48LGMMjDfaSK4Hzo3vN3vZtIEy2p/pS9MhXDdxC8I
 vql533N+A9fi2I+7bPauwX5ElOYvGTkDeKqKXDox/jR0zio55APst7IW9OIUCKxo
 an98430jeNPhs1CNqxVIJNciC8Q4REmafki7UQiKYDBQjHyq3r6Bp547lnDhUtii
 P9PNTyOoJXhV5yEP3upnWCxwH6Vy7IxBnwrEO7aEHs88Ea54iqlZ9XB8TzUw4G/1
 I7T7a8yOopRopb04vhr2
 =fd8f
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.9'
2015-02-06 17:15:31 +01:00
Max Kellermann
d38034bb5c fs/io/FileOutputStream: don't auto-delete file on WIN32
The file handle is never reset to INVALID_HANDLE_VALUE, and thus the
destructor will assume the operation shall be cancelled and will
delete the temporary file.

This was a major breakage for saving the database file and the state
file.
2015-02-06 14:36:55 +01:00
Max Kellermann
a62fe30546 SongPrint: let CPP concatenate string literals 2015-02-06 13:06:38 +01:00
Max Kellermann
b3fe3e8b3d TagBuilder: allow adding duplicate tag types in Complement()
Build a table of pre-existing tag types before adding new items.  The
old way would check HasType() each time, which would return true after
the first instance of that tag type had been added, preventing
duplicate tag types to be merged.

This broke duplicate tag types loaded from the state file, because
this code path uses TagBuilder::Complement().
2015-02-06 12:25:34 +01:00
Max Kellermann
25ebb427da tag/Rva2: convert pointers to references 2015-02-04 15:57:32 +01:00
Max Kellermann
c5bde10b4f tag/Rva2: rename struct rva2_data to CamelCase 2015-02-04 15:56:59 +01:00
Max Kellermann
e582e893cc tag/Rva2: make enum rva2_channel strictly-typed 2015-02-04 15:56:01 +01:00
Max Kellermann
833ec3d3cd lib/upnp/Discovery: remove locking from ExpireDevices() 2015-02-03 23:48:11 +01:00
Max Kellermann
3d446d3266 lib/upnp/Discovery: apply naming convention 2015-02-02 21:12:19 +00:00
Max Kellermann
e660229c40 output/sles: use AudioOutputWrapper::Create() 2015-02-01 22:24:19 +01:00
Max Kellermann
ee6e0e16cb DecoderThread: make variables more local 2015-01-31 22:20:38 +01:00
Max Kellermann
eb1733609a decoder/sndfile, ...: update API documentation 2015-01-31 22:17:15 +01:00
Max Kellermann
e2e66404d5 decoder/DsdLib: fix integer overflow in ID3 size calculation 2015-01-30 23:22:49 +01:00
Max Kellermann
3ecb19d0f1 decoder/DsdLib: check size before seeking 2015-01-30 23:19:26 +01:00
Max Kellermann
fd02c87fa2 decoder/DsdLib: don't use InputStream::GetOffset() after seeking
We already know the offset.
2015-01-30 23:00:22 +01:00
Max Kellermann
63ac81c8f5 decoder/DsdLib: pass offset_type t dsdlib_tag_id3() 2015-01-30 22:47:43 +01:00
Max Kellermann
557bee61d5 Merge branch 'v0.19.x' 2015-01-29 22:55:18 +01:00
Max Kellermann
3adca3c2fa db/update/Walk: use std::unique_ptr instead of std::auto_ptr
std::auto_ptr is deprecated, and std::unique_ptr is much better
anyway.
2015-01-29 08:37:23 +01:00
PHO
39abd3ecb4 Avoid integer overflow in MonotonicClock{S,MS,US}
This is Darwin specific: the previous implementation was causing an integer
overflow when base.numer is very large. On PPC Darwin, the timebase info is 1000000000/33330116 and this is too large for integer arithmetic.
2015-01-29 08:34:37 +01:00
Max Kellermann
7bf638b0de decoder/DsdLib: use new[] to allocate the ID3 buffer
Don't abort the process if there's not enough memory.  This buffer is
not important and can be large.
2015-01-29 08:24:34 +01:00
Max Kellermann
56662a703c decoder/DsdLib: free ID3 buffer right after id3_tag_parse()
Merge two free() calls.
2015-01-29 08:24:34 +01:00
Max Kellermann
8b5f47d3a3 decoder/DsdLib: raise ID3 tag limit to 1 MB
A bug report was submitted with a 600 kB ID3 tag that could not be
read by MPD.
2015-01-29 08:20:14 +01:00
Max Kellermann
8bfb88840b output/fifo: use template AudioOutputWrapper 2015-01-28 19:43:37 +01:00
Max Kellermann
593bb5a8a7 StickerDatabase: convert the struct name to upper case 2015-01-28 19:33:56 +01:00
Max Kellermann
ae7e1a22cb Merge branch 'v0.19.x' 2015-01-26 20:57:29 +01:00
Max Kellermann
a289dcb9ee Merge branch 'v0.18.x' into v0.19.x 2015-01-26 20:48:19 +01:00
PHO
023b9c1e7e Test the existence of strndup(3) before using it.
This can eliminate the ad-hoc "#ifdef WIN32" and can also support other platforms lacking it as well (including Darwin 9).
2015-01-26 20:39:49 +01:00
Max Kellermann
ad1b6ef0ac {playlist,input}/despotify: remove defunct plugin 2015-01-26 09:55:31 +01:00
Max Kellermann
16944b5397 pcm/SoxrResampler: move quality recipe names to table 2015-01-25 10:01:50 +01:00
Max Kellermann
ed5c6be2f1 util/list: disable gcc5 warning
This file has been removed in newer MPD versions, so don't care about
it now.
2015-01-23 16:50:31 +01:00
Max Kellermann
30cb082932 ClientProcess: cast enum to int before passing to printf()
Fixes gcc5 warning.
2015-01-23 16:50:31 +01:00
Max Kellermann
72e44d596f tag/Format: add %iso8601% 2015-01-22 19:10:15 +01:00
Max Kellermann
8f2ca8f085 ConfigFile: fix typo (parser breakage) 2015-01-22 19:08:09 +01:00
Max Kellermann
6725c2afa1 util/format: allow upper case, digits and underscore in names 2015-01-22 18:59:42 +01:00
Max Kellermann
e9d4b73cc3 util/format: move code to is_name_char() 2015-01-22 18:59:01 +01:00
Max Kellermann
929ec70512 queue/PlaylistState: remove unused macro 2015-01-22 18:44:30 +01:00
Max Kellermann
6cd5d73607 pcm/SoxrResampler: allow multi-threaded resampling 2015-01-22 11:37:18 +01:00
Max Kellermann
80a7e1ea7d pcm/SoxrResampler: add a global soxr_runtime_spec_t variable 2015-01-22 11:37:09 +01:00
Max Kellermann
0d3b26b3aa Config: add section "resampler" 2015-01-22 11:04:28 +01:00
Max Kellermann
e9b49a43e2 config/Block: add method IsEmpty() 2015-01-22 10:20:51 +01:00
Max Kellermann
4fa5538e2b config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
2015-01-21 23:56:33 +01:00
Max Kellermann
84e74173de config/File: move code to ReadConfigParam() 2015-01-21 23:51:04 +01:00
Max Kellermann
6cdb2a4896 fs/io/BufferedReader: count line numbers
Replaces the dirty code in config/ConfigFile.cxx.
2015-01-21 23:43:32 +01:00
Max Kellermann
d8bef3270d config/File: use FileReader/BufferedReader instead of stdio 2015-01-21 23:36:57 +01:00
Max Kellermann
a33db8fe6f config/Data: assign nullptr during iteration 2015-01-21 23:30:00 +01:00
Max Kellermann
1c3f5517fa config/Option: convert to strictly-typed enum 2015-01-21 23:30:00 +01:00
Max Kellermann
10972da060 input/curl: work around format warning on WIN32 2015-01-21 23:30:00 +01:00
Max Kellermann
a38f02541d config/Param: make "line" signed 2015-01-21 22:19:36 +01:00
Max Kellermann
fdba76ba47 ConfigFile: convert macros to constexpr 2015-01-21 22:12:16 +01:00
Max Kellermann
f900ab0121 config/Data: add method Clear()
Move code from config_global_finish().
2015-01-21 21:50:02 +01:00
Max Kellermann
f80ab6a7a2 ConfigData: rename header file 2015-01-21 21:49:09 +01:00
Max Kellermann
6ed209bbf3 config/Param: make constructor "explicit" 2015-01-21 21:32:26 +01:00
Max Kellermann
fe85fa3bea ConfigData: move struct config_param to Param.hxx 2015-01-21 21:23:02 +01:00
Max Kellermann
76b7882f33 ConfigData: rename struct block_param to BlockParam 2015-01-21 21:18:25 +01:00
Max Kellermann
bf0ab2d44c ConfigData: move struct block_param to Block.?xx 2015-01-21 20:45:34 +01:00
Max Kellermann
276a0d9500 thread/Name: include stdio.h if HAVE_PRCTL
Caused a build failure with uClibc because snprintf() was not
available.
2015-01-21 20:40:56 +01:00
Max Kellermann
bcbfa560e9 pcm/SoxrResampler: use a global soxr_quality_spec_t variable 2015-01-21 19:59:50 +01:00
Max Kellermann
8b366f0795 pcm/SoxrResampler: soxr_parse_converter() returns unsigned long 2015-01-21 19:56:57 +01:00
Max Kellermann
aa08f9692c pcm/SoxrResampler: add constant SOXR_DEFAULT_QUALITY 2015-01-21 19:56:36 +01:00
Max Kellermann
288ba84939 pcm/SoxrResampler: fix indent 2015-01-21 19:47:14 +01:00
Max Kellermann
4c74016b1a MixerAll: restore "null" mixer volume from state file 2015-01-16 19:48:26 +01:00
Joshua Wise
1d8544ef3b db/plugins/ProxyDatabasePlugin: add "keepalive" parameter 2015-01-15 14:44:55 -08:00
Max Kellermann
91a12f76cd util/CharUtil: minor API documentation fix 2015-01-15 19:34:02 +01:00
Max Kellermann
e8debd2e45 output/recorder: dynamic file name 2015-01-14 22:03:26 +01:00
Max Kellermann
bf59635280 output/recorder: move code to encoder/ToOutputStream.cxx 2015-01-14 20:11:00 +01:00
Max Kellermann
eaf0662b75 fs/io/FileOutputStream: add static method Create() 2015-01-14 19:44:28 +01:00
Max Kellermann
b043b2a761 fs/AllocatedPath: add operator== 2015-01-13 10:42:29 +01:00
Max Kellermann
ac7e0dfb77 DetachedSong: remove obsolete friend declaration 2015-01-12 20:56:07 +01:00
Max Kellermann
05d47bb09a output/null: convert struct to class 2015-01-09 19:30:22 +01:00
Max Kellermann
575a5bd0b8 output/null: move functions into the struct 2015-01-09 17:44:00 +01:00
Max Kellermann
ae4c189e19 encoder/Interface: move functions into the struct 2015-01-08 19:36:19 +01:00
Max Kellermann
362a6e6d46 encoder/Plugin: move struct Encoder to EncoderInterface.hxx 2015-01-08 19:31:57 +01:00
Max Kellermann
c76c7c68ff output/recorder: convert struct to class 2015-01-08 16:56:22 +01:00
Max Kellermann
59ac9d39d5 output/recorder: move encoder_finish() call to destructor 2015-01-08 16:56:13 +01:00
Max Kellermann
ec41caade4 output/wrapper: add method SendTag() 2015-01-07 19:20:09 +01:00
Max Kellermann
06ec06cdd7 output/recorder: remove unused variable "recorder_output_domain" 2015-01-07 19:17:07 +01:00
Max Kellermann
b7acf86408 output/recorder: use FileOutputStream 2015-01-07 19:14:23 +01:00
Max Kellermann
58c4db925b output/recorder: log commit errors 2015-01-07 19:13:55 +01:00
Max Kellermann
fe0c4ff3c2 output/recorder: move code to method Commit() 2015-01-07 19:11:04 +01:00
Max Kellermann
7a2af0fbf4 output/recorder: move more functions into the struct 2015-01-07 18:55:34 +01:00
Max Kellermann
d83127722f output/oss: use nullptr instead of NULL 2015-01-07 18:55:34 +01:00
Max Kellermann
dc03ad05be output/oss: add "const" attributes 2015-01-07 18:50:38 +01:00
Max Kellermann
a62df3cb8f output/oss: eliminate unnecessary tail code after "switch" 2015-01-07 18:49:29 +01:00
Max Kellermann
18e32abda9 output/oss: convert struct to class 2015-01-07 18:43:52 +01:00
Max Kellermann
15d29da43b output/oss: add "device" parameter to constructor 2015-01-07 18:43:45 +01:00
Max Kellermann
8b217d5313 fs/io/FileOutputStream: use O_TMPFILE if available
The Linux feature allows writing new files to an invisible file, and
then replace the old file.  This preserves the old file if we get
interrupted by some event.
2015-01-06 19:38:55 +01:00
Max Kellermann
c150fd9a1c output/oss: move functions into the struct 2015-01-06 16:24:33 +01:00
Max Kellermann
674d14879f Merge branch 'v0.19.x' 2015-01-06 12:54:46 +01:00
Max Kellermann
37e9010887 input/async: reset the "open" flag after seeking successfully
Fixes a problem with the "curl" input plugin: IsEOF() always returns
true because the "open" flag was cleared by
CurlInputStream::RequestDone() when end-of-stream was reached.  This
flag stays false even when seeking to another position has succeeded.

This patch resets the "open" flag to true after seeking successfully.
2015-01-06 12:46:28 +01:00
Max Kellermann
4bd2c75056 thread/Name: disable pthread_setname_np() on NetBSD
NetBSD's pthread_setname_np() prototype is incompatible with the rest
of the world, and it requires to pass the string argument as a
non-const pointer.  Instead of working around this misdesign, I hereby
disable the feature on NetBSD.
2015-01-06 12:08:36 +01:00
Max Kellermann
b9ed850b98 thread/Name: enable FormatThreadName() with prctl()
Add macro HAVE_THREAD_NAME which is set when any method to set the
thread name is available.  Use that macro in FormatThreadName()
instead of just checking for HAVE_PTHREAD_SETNAME_NP.
2015-01-06 12:04:30 +01:00
Max Kellermann
11cea17496 thread/Name: indent preprocessor commands 2015-01-06 12:04:15 +01:00
Max Kellermann
81df45a893 fs/io/File{Reader,OutputStream}: use OpenFile() 2015-01-05 23:13:35 +01:00
Max Kellermann
c1f0708a5d output/recorder: use config_param::GetBlockPath()
Supports "~/" expansion.  Forces us to switch from "const char *" to
AllocatedPath, which is a good thing.
2015-01-05 19:49:54 +01:00
Max Kellermann
153f5854e2 output/alsa: move functions into the struct 2015-01-04 19:53:56 +01:00
Max Kellermann
f532964fde output/pulse: add wrapper for pa_threaded_mainloop_signal() 2015-01-04 19:51:09 +01:00
Max Kellermann
efea609dc3 output/pulse: convert to class 2015-01-04 19:46:51 +01:00
Max Kellermann
f3a160038d output/pulse: move more code into the struct 2015-01-04 19:45:58 +01:00
Max Kellermann
f016eef48a output/pulse: use AudioOutputWrapper::Init() 2015-01-04 19:44:45 +01:00
Max Kellermann
f649514183 output/openal: convert macro to constexpr 2015-01-03 20:00:41 +01:00
Max Kellermann
afd31677dd output/openal: convert struct to class 2015-01-03 20:00:16 +01:00
Max Kellermann
b28710b08c output/openal: move functions into the class 2015-01-02 18:40:16 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
11fb5bc3d0 output/osx: use nullptr instead of NULL 2014-12-31 11:47:27 +01:00
Max Kellermann
2a5feb225b ConfigData: use nullptr instead of NULL 2014-12-30 23:26:54 +01:00
Max Kellermann
970e338847 output/pulse: move code into the struct 2014-12-30 00:03:07 +01:00
Max Kellermann
0b9f650fe2 output/Wrapper: new helper class 2014-12-29 23:45:14 +01:00
Max Kellermann
977834179a output/pulse: move initialization to constructor 2014-12-29 23:07:18 +01:00
Max Kellermann
b42732743d output/pulse: remove unnecessary initialization 2014-12-29 23:00:11 +01:00
Max Kellermann
99e6409a67 {mixer,output}/pulse: move code to LogPulseError() 2014-12-29 22:42:52 +01:00
Max Kellermann
6a0a5f9693 output/pulse: move SetError() to lib/pulse/Error.cxx 2014-12-29 22:34:32 +01:00
Max Kellermann
fe9db8b369 {mixer,output}/pulse: use a common Domain instance 2014-12-29 22:25:14 +01:00
Max Kellermann
ca035d0e8d mixer/pulse: remove redundant "virtual" keywords 2014-12-29 22:23:58 +01:00
Max Kellermann
84c9260dc4 output/fifo: make variables more local 2014-12-28 00:48:05 +01:00
Max Kellermann
987c02e946 output/pipe: convert to class 2014-12-27 18:57:18 +01:00
Max Kellermann
5c0bc612fe output/pipe: add static method Create() 2014-12-27 18:56:23 +01:00
Max Kellermann
0e28b53242 output/pipe: merge Initialize() and Configure() 2014-12-27 18:56:08 +01:00
Max Kellermann
5fc0ce80fc output/pipe: move functions into the struct 2014-12-27 18:42:31 +01:00
Max Kellermann
af9092df39 EncoderPlugin: pass Tag reference to method tag() 2014-12-26 22:30:54 +01:00
Max Kellermann
58a5da33c2 OutputPlugin: pass Tag reference to _send_tag() 2014-12-26 22:27:01 +01:00
Max Kellermann
b3435ae432 output/recorder: implement send_tag() 2014-12-26 15:03:22 +01:00
Max Kellermann
a31129333c output/recorder: move functions into the struct 2014-12-26 14:57:29 +01:00
Max Kellermann
2983c2a24f output/jack: fix implicit nullptr/bool conversion
Return false on error, not nullptr.
2014-12-26 14:44:47 +01:00
Max Kellermann
412bedb697 Merge branch 'v0.19.x' 2014-12-26 14:40:32 +01:00
Max Kellermann
163597ef69 db/simple: fix implicit nullptr/bool conversion
Return false on error, not nullptr.
2014-12-26 14:34:03 +01:00
Max Kellermann
95f84afd33 fs/Traits, ...: work around -Wtautological-pointer-compare
New in clang 3.6.
2014-12-26 14:34:03 +01:00
Max Kellermann
9f7fd1fbfb db/lazy, input/mms: add "override" keywords
Fixes -Winconsistent-missing-override (clang 3.6).
2014-12-26 14:29:29 +01:00
Max Kellermann
940cab8620 Merge branch 'v0.18.x' into v0.19.x 2014-12-26 14:28:52 +01:00
Max Kellermann
d37811f177 lib/ffmpeg/Buffer: always include libavutil/mem.h
Needed for av_free().
2014-12-26 14:09:45 +01:00
Max Kellermann
665031467a db/proxy, output/shout: fix implicit nullptr/bool conversion
Return false on error, not nullptr.
2014-12-26 13:50:54 +01:00
Max Kellermann
df33171107 db/{simple,proxy}, ...: add "override" keywords
Fixes -Winconsistent-missing-override (clang 3.6).
2014-12-26 13:47:04 +01:00
Max Kellermann
53f4044890 util/{ASCII,UriUtil}, ...: work around -Wtautological-pointer-compare
New in clang 3.6.
2014-12-26 13:43:32 +01:00
Max Kellermann
a5049136ff DatabaseGlue: convert nullptr check to assertion 2014-12-26 13:43:32 +01:00
Max Kellermann
705b3c6b63 util/ASCII: fix indent 2014-12-26 13:37:38 +01:00
Max Kellermann
6b4ac66962 Compiler.h: add macro CLANG_CHECK_VERSION() 2014-12-26 13:31:03 +01:00
Max Kellermann
0964b06240 Compiler.h: add macro GCC_OLDER_THAN() 2014-12-26 13:30:44 +01:00
Max Kellermann
92eeca3ba7 util/Manual: reimplement GCC_CHECK_VERSION() using GCC_MAKE_VERSION() 2014-12-26 13:30:22 +01:00
Max Kellermann
2a86554ac4 Compiler.h: add macro GCC_MAKE_VERSION() 2014-12-26 13:30:11 +01:00
Max Kellermann
d4ca853fd3 output/jack: move code to separate functions 2014-12-25 22:18:22 +01:00
Max Kellermann
5a8d2e8057 output/jack: cache AudioFormat::channels 2014-12-24 23:22:56 +01:00
Max Kellermann
687fc358fd output/jack: fix typo 2014-12-24 23:22:56 +01:00
Max Kellermann
c4c2da06b7 output/jack: use jack_ringbuffer_get_write_vector()
Reduce number of libjack calls.
2014-12-24 23:14:15 +01:00
Max Kellermann
8928cd53bf output/jack: move jack_ringbuffer_write_space() call to WriteSamples() 2014-12-24 23:08:39 +01:00
Max Kellermann
ca88fc4ed3 output/jack: cache AudioFormat::channels 2014-12-24 23:04:29 +01:00
Max Kellermann
b83a1d79b7 output/jack: pass float* to WriteSamples() 2014-12-24 23:02:19 +01:00
Max Kellermann
cec2a837cf output/jack: WriteSamples() returns size_t 2014-12-24 23:00:46 +01:00
Max Kellermann
cff47262da output/jack: pass size_t to WriteSamples() 2014-12-24 23:00:15 +01:00
Max Kellermann
da83eae754 output/jack: use SampleFormat::FLOAT
What JACK expects is already implemented in MPD, just not used.  The
sample format conversion code in the JACK plugin was redundant and
could reduce sound quality.
2014-12-24 22:40:00 +01:00
Max Kellermann
c5409d52f5 output/Internal: move enum AudioOutputCommand into the struct 2014-12-24 22:18:47 +01:00
Max Kellermann
54fc8f0e8c output/Internal: convert audio_output_command to strictly-typed enum 2014-12-24 22:13:50 +01:00
Max Kellermann
2ea633a2f7 output/jack: use std::fill() 2014-12-24 16:27:13 +01:00
Max Kellermann
9a52043fad output/jack: move functions into the struct 2014-12-24 16:10:27 +01:00
Max Kellermann
39a5be2df9 output/jack: merge two mpd_jack_available() calls 2014-12-24 16:10:27 +01:00
Max Kellermann
96560e317a output/jack: make variables more local 2014-12-24 15:21:23 +01:00
Max Kellermann
adb27903eb output/jack: convert const to constexpr 2014-12-24 15:14:51 +01:00
Max Kellermann
51150faa39 output/jack: convert enum to constexpr 2014-12-24 09:52:32 +01:00
Max Kellermann
a56949e9fa decoder/ffmpeg: support interleaved floating point 2014-12-23 20:51:08 +01:00
Max Kellermann
ea96919b80 Merge branch 'v0.19.x' 2014-12-23 20:43:15 +01:00
Max Kellermann
43da4c0eca input/mms: limit the mmsx_read() size 2014-12-23 20:34:45 +01:00
Max Kellermann
5835afb849 decoder/ffmpeg: fix indent 2014-12-23 10:21:34 +01:00
Max Kellermann
b9c7771830 decoder/DsdLib: add missing stdlib.h include 2014-12-23 10:08:46 +01:00
Jan Brittenson
35db88affe DSF ID3 tags hitting 4k size limit
Here's a change to dynamically allocate the DSD ID3 tag buffer.
Pretty much anything with cover art is going to exceed the existing,
static 4k limit...  Here's a change to dynamically allocate the buffer
and sanity check it at some upper limit.  I rather arbitrarily pulled
256k out of thin air just to keep a corrupt file from causing it to
trying to allocate a buffer larger than available memory.
2014-12-23 09:49:33 +01:00
Max Kellermann
7f3fecbdf5 decoder/ffmpeg: simplify mpd_ffmpeg_open_input() 2014-12-22 22:24:10 +01:00
Max Kellermann
a2c6d5e148 decoder/ffmpeg: move functions into the AvioStream struct 2014-12-22 21:58:25 +01:00
Max Kellermann
7afe63aa06 configure.ac: use MPD_ENABLE_AUTO_PKG_LIB for libgme 2014-12-22 10:28:15 +01:00
Max Kellermann
8fab855099 configure.ac: remove redundant declaration "HAVE_ISO9660" 2014-12-22 10:19:13 +01:00
Max Kellermann
fefe2df3ee input/ffmpeg: use FfmpegInit() instead of av_register_all()
Make sure that the log callback is installed.
2014-12-21 20:56:42 +01:00
Max Kellermann
90b91ead72 decoder/ffmpeg: move code to lib/ffmpeg/Init.cxx 2014-12-21 20:51:41 +01:00
Max Kellermann
1e98e41381 decoder/ffmpeg: move code to lib/ffmpeg/LogCallback.cxx 2014-12-20 18:46:29 +01:00
Max Kellermann
7030e8f050 decoder/ffmpeg: remove obsolete comment 2014-12-19 11:53:58 +01:00
Max Kellermann
74bb514a8c decoder/ffmpeg: convert enums to constexpr 2014-12-19 11:53:58 +01:00
Max Kellermann
46914e486c decoder/ffmpeg: move struct AvioStream to FfmpegIo.hxx 2014-12-19 10:35:10 +01:00
Max Kellermann
f9abc561fb decoder/ffmpeg: remove unnecessary nullptr check for av_free() 2014-12-19 10:33:17 +01:00
Max Kellermann
2e22ff2e36 decoder/ffmpeg: use AVStream::duration
Use the duration of the stream we're actually decoding - not the
"global" attribute AVFormatContext::duration which may differ.
2014-12-19 10:23:05 +01:00
Max Kellermann
8c3be4a5f0 decoder/ffmpeg: skip _scan_stream() if no audio stream was found 2014-12-19 10:21:51 +01:00
Max Kellermann
3fe2f7337c decoder/ffmpeg: remove redundant audio stream check 2014-12-19 10:20:45 +01:00
Max Kellermann
ec24eb1d8e decoder/ffmpeg: use more references 2014-12-19 10:19:19 +01:00
Max Kellermann
ffcaf85609 decoder/ffmpeg: merge avformat_close_input() calls 2014-12-19 09:57:29 +01:00
Max Kellermann
d0c481e44e lib/ffmpeg/Time: add API documentation 2014-12-19 09:49:29 +01:00
Max Kellermann
67e2d9f9e1 decoder/ffmpeg: move code to lib/ffmpeg/Time.hxx 2014-12-19 09:41:21 +01:00
Max Kellermann
dd5aa2b483 decoder/ffmpeg: use av_free() instead of av_freep() 2014-12-19 09:23:22 +01:00
Max Kellermann
806494a254 decoder/ffmpeg: add API documentation 2014-12-19 06:41:50 +01:00
Max Kellermann
5c3afd020a decoder/ffmpeg: copy_interleave_frame() returns ConstBuffer 2014-12-18 23:44:56 +01:00
Max Kellermann
190cdfc326 decoder/ffmpeg: copy_interleave_frame() returns Error 2014-12-18 23:39:56 +01:00
Max Kellermann
13b954c765 decoder/ffmpeg: pass AVPacket copy to ffmpeg_send_packet() 2014-12-18 23:24:11 +01:00
Max Kellermann
49f6b50ed3 decoder/ffmpeg: simplify ffmpeg_send_packet() 2014-12-18 23:21:48 +01:00
Max Kellermann
0f2a304d34 decoder/ffmpeg: pass references instead of pointers 2014-12-18 23:08:08 +01:00
Max Kellermann
a142f93dca decoder/ffmpeg: move code to class FfmpegBuffer 2014-12-18 22:24:28 +01:00
Max Kellermann
2dfe2fb22c decoder/ffmpeg: fix crash on out-of-memory
Fixes regression by commit 7c8038e
2014-12-18 22:24:02 +01:00
Max Kellermann
e8564b4c90 decoder/ffmpeg: log detailed error message 2014-12-18 22:07:38 +01:00
Max Kellermann
2fd81b4932 decoder/ffmpeg: remove obsolete comment 2014-12-18 20:19:40 +01:00
Max Kellermann
0cf4c6ffea decoder/ffmpeg: add "pure" attributes 2014-12-18 20:17:15 +01:00
Max Kellermann
25f89afbfb output/winmm: show detailed error messages 2014-12-17 19:43:14 +01:00
Max Kellermann
8400da9934 release v0.19.7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUkcmtAAoJECNuiljG20USLuwP/3MjssxpUkq6aN1beyNACWJ8
 Zgr/ibDjxYJY+UAHUOycnJQ8WNpgfXNSR4F5jQHznJdpemJCZCeBd2s5yelEdu0C
 SBjJ9FiKPeu8or5N34CPmRQDmDGHv0II4/ySmzlBhH4XRV5JF5li/j4KtAlOCqCT
 GNnlmgn05o+oX4Olpg/id6H7wvny+YDY3p33sJmi+djBnSbJyJNvk9NhAr9n4I7Q
 FfGHbTzRLSZKHa47zzXag30PBj2X8x7NOAcAX7/evQpw9Gud/8CwXKk21kp6L/fv
 RJnj4lLtkj8MRc+8vskZ9EXgYr3yC/cldP8Fw8qsY/t7d8UFUN8qFqpq9O8IPnga
 D4hNpq7VF9ZxMhQtxBiT3cRvjTXBp8J/B7p2YDuYHBhIZh8IPzjDCyF4CzlN/470
 3zTqq/aar93AeI/6MQlpQPBK1DGvrrHBVP3Mj7cCTbx61P7/1xEIxYntRIfJw449
 JRJDJKjdyOY4+Sqm3Agu3WiQlyOzZXmqM3E3FFeul4mUvcOKhfbZxjayYsGlfigA
 MHge1wif2aOe6IU334DUD5V0m61MMoefznEvWUdAZHtdvQox0ovDmwwFRizX2fGc
 rlUhoUOXWjjGbTI2VjXsBklzh8P+MxQ8OiJGw+V4DBI0XL+A2tpqISs9mpCVPwQ0
 T37uc6kdDB99noMuD2cw
 =+4Cz
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.7'
2014-12-17 19:27:59 +01:00
Max Kellermann
9c56c49e73 release v0.18.21
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUkcgMAAoJECNuiljG20UShwAP/3qGPv1feFJMOQbhHF+K8eL9
 4oeKJAblVR98+jsdu8Z7GidGGXrvIX8pxGWJPLLYSa2naR9/gtTxpiYZPEd2ex4G
 1jbFzI0GmU08I5x9sUPstX4GoDVfWnV3ICYzY7z1VVhlxYXlI+dHOPz61FxaLWYM
 i/H4WR7lvSwyOsYaFtfqZC9SD71XQ0V56yDqaDK6a/NbMg0WQQMghmH0swkEk/FK
 wN6nxEpFpTtOjBLjF51TyNC5JT1lxXDYwxYmrtd6rxkNqhN8duCRXq9IK7MEGync
 LNtHKGMrcXwLBSAPM6GTrY0StCch6fEBhOg0Tr7JQ81BSb/1XKzimbxCCULDwx/P
 /hN4lGr66tudXHFaRQX0GLxRpkpKtanp7+xtZ5AhGh4Wk7YQ62nb8RN3qCc5x2Oi
 cvnK6bewMi7rZoIejAhaXtbKNPho/H5TpE404C+ScnWyEAVtly45xgECNdzllhfk
 k4Kp4rW2CNmHTNbZRFh1Qre2g47a9rhZxoxXx4X0fi6YSruekQC3qjdloom5VN2I
 8d7NloQoJ+wjkYXuZ3EoxdBhbdViZBMg8CP99KFc7sYQTGmYtrKyjZ5EiOAVw3p5
 rHoTrGdZr8aKPMcKQPo4GaTkB9njE4a4l+uVq5SOiRSfpDeRqvhIqOrUz4EOf8Ic
 ryT0jwFGfKhSHG4tz+9K
 =WjqC
 -----END PGP SIGNATURE-----

Merge tag 'v0.18.21' into v0.19.x
2014-12-17 19:19:13 +01:00
Max Kellermann
c5720a15c7 LogBackend: force-flush stderr on WIN32
setvbuf() does not seem to have an effect on Windows.
2014-12-17 19:12:25 +01:00
Max Kellermann
90709b332a LogInit: make stderr line-buffered
Make sure everything gets logged right away.  No delays because
stdio's buffer is not yet full.
2014-12-17 19:12:01 +01:00
Max Kellermann
81f17d10c8 util/HugeAllocator: enable MEM_COMMIT on Windows
Without MEM_COMMIT, the reserved address space is not accessible, and
MPD crashes.
2014-12-17 19:10:58 +01:00
k44
773de38bd9 playlist/embcue: fix filename suffix detection
The definition of the playlist_plugin struct member of the embcue
plugin was incorrect.
2014-12-16 18:43:05 +01:00
Max Kellermann
adfc5db3d2 Merge branch 'v0.19.x' 2014-12-15 00:46:56 +01:00
Max Kellermann
a48704925d storage/nfs: add timeout 2014-12-15 00:45:13 +01:00
Max Kellermann
fa4beeee75 decoder/ffmpeg: detect and fix negative time stamps
Works around assertion failure due to something that appears to be a
(minor) FFmpeg bug.
2014-12-15 00:40:46 +01:00
Max Kellermann
68d1abdb85 storage/nfs: clear last_error in SetState()
Fixes bogus assertion failure.
2014-12-15 00:39:30 +01:00
Max Kellermann
7e8474a85a lib/nfs/Connection: unregister socket with SocketMonitor::Steal()
SocketMonitor::Cancel() does not actually unregister the socket; it
only disables the event.
2014-12-15 00:31:12 +01:00
Max Kellermann
82da364b8b lib/nfs/Connection: implement mount timeout 2014-12-15 00:05:53 +01:00
Max Kellermann
7fa91ec175 lib/nfs/Connection: add debug flag "in_destroy" 2014-12-15 00:03:30 +01:00
Max Kellermann
1d3a09d377 lib/nfs/Connection: add assertion 2014-12-14 22:51:37 +01:00
Max Kellermann
02563a35f0 lib/nfs/Connection: fix reconnect after mount failure
When mounting had not yet finished, SocketMonitor::IsDefined() was
always false, due to the workaround at the beginning of the function
that calls SocketMonitor::Steal().  This commit drops the IsDefined()
check because it was never necessary and breaks reconnect.
2014-12-14 22:49:16 +01:00
Max Kellermann
d653f35bb7 lib/nfs/Connection: fix typo in code comment 2014-12-14 22:49:09 +01:00
Max Kellermann
a543627abd lib/nfs/Connection: fix memory leak (and assertion failure)
nfs_destroy_context() will invoke all pending callbacks with
err==-EINTR.  In CancellableCallback::Callback(), this will invoke
NfsConnection::DeferClose(), which however is only designed to be
called from nfs_service().  In non-debug mode, this will leak memory
because nfs_close_async() is never called.

Workaround: before nfs_destroy_context(), invoke nfs_close_async() on
all pending file handles.
2014-12-14 16:02:47 +01:00
Max Kellermann
80f2ba7fca lib/nfs/Connection: move code to Service() 2014-12-14 15:45:10 +01:00
Max Kellermann
32bca64920 lib/nfs/Connection: add assertions 2014-12-14 15:40:29 +01:00
Max Kellermann
7fa1a84ec3 lib/nfs/Connection: move code to method InternalClose() 2014-12-14 15:38:09 +01:00
Max Kellermann
ab4bb26a0a lib/nfs/Connection: make in_service and in_event debug-only flags 2014-12-14 15:20:40 +01:00
Max Kellermann
4b8d258cff lib/nfs/Connection: fix crash while canceling a failing Open()
The method NfsConnection::CancellableCallback::Callback() will always
invoke NfsConnection::Close() on the file handle, even if the void
pointer is not a nfsfh.  This can happen if the Open() was not
successful, e.g. when the file does not exist.
2014-12-14 15:16:01 +01:00
Max Kellermann
3c29aa6271 event/Loop: read the "again" flag while holding mutex 2014-12-14 14:47:36 +01:00
Max Kellermann
51464b4317 lib/nfs/Connection: add assertions 2014-12-14 14:24:49 +01:00
Max Kellermann
3f32a6b607 input/nfs: include cleanup 2014-12-14 14:21:11 +01:00
Max Kellermann
21aa1631a4 input/async: add API documentation 2014-12-14 14:21:11 +01:00
Max Kellermann
49968541fd sticker/Match: add inequality operators 2014-12-12 22:26:04 +01:00
Max Kellermann
cc143105b8 sticker/Match: add operator "EQUALS"
Mapped to "=" in the MPD protocol.  This is the first operator,
initially supporting value matches in the MPD protocol.
2014-12-12 22:16:00 +01:00
Max Kellermann
fed44e95b3 sticker/Song: add enum StickerOperator to sticker_song_find() 2014-12-12 22:10:24 +01:00
Max Kellermann
71ece56470 sticker/Database: move code to BindFind() 2014-12-12 22:04:43 +01:00
Max Kellermann
204a1de3fd sticker/Database: use the Error library 2014-12-12 21:43:54 +01:00
Max Kellermann
80ddf4aecf sticker/Database: always invoke sqlite3_reset() and sqlite3_clear_bindings() 2014-12-12 21:43:54 +01:00
Max Kellermann
12b4a666bc lib/sqlite/Util: add ExecuteModified() 2014-12-12 21:43:54 +01:00
Max Kellermann
cfdbaf331e sticker/Database: add wrapper for sqlite3_step() 2014-12-12 21:43:54 +01:00
Max Kellermann
052d350b19 sticker/Database: move SQLite helpers to lib/sqlite/Util.hxx 2014-12-12 21:42:51 +01:00
Max Kellermann
2ca18a7ee5 lib/sqlite/Domain: add Domain instance for SQLite
Replaces the sticker_domain for Error::domain.
2014-12-12 20:49:00 +01:00
Max Kellermann
7dbe5f4640 sticker/Database: remove redundant sqlite3_reset() calls
Call sqlite3_reset() only after a sqlite3_stmt* has been used, not
before.  Assume it is already in reusable state.
2014-12-12 20:43:26 +01:00
Max Kellermann
432ecd1b6a sticker/Database: require SQLite 3.7.3
SQLite 3.7.3 is the version shipped in Debian Squeeze (oldstable);
should be old enough to be the required version.  Drop the
compatibility #ifdef.
2014-12-12 20:41:36 +01:00
Rasmus Steinke
7d9aa5b716 vorbiscomments: Remove support for non-standard "album artist" tags.
MPD used both "album artist" and "albumartist" tags and mapped them to one tag.
This could lead to issues, if a file had both tags, causing MPD to send
a list of albumartists instead of a single one.
Since "album artist" is not a standard tag anyway and even its originators
started to use the proper alternative, its time to say goodbye!
2014-12-12 18:28:11 +01:00
Max Kellermann
43267dc892 sticker/Database: make variables more local 2014-12-12 14:27:47 +01:00
Max Kellermann
3ec6c26e6c sticker/Database: add sqlite3_bind_text() wrapper 2014-12-12 14:13:35 +01:00
Max Kellermann
7de684668b sticker/Database: remove C-style (void) 2014-12-12 14:12:31 +01:00
Max Kellermann
2fec463542 util/HugeAllocator: disable MEM_LARGE_PAGES on Windows
MEM_LARGE_PAGES does not appear to work.  Instead, MEM_RESERVE appears
to be necessary.  Until I figure this out, this large pages are
disabled.
2014-12-12 13:20:58 +01:00
Max Kellermann
1affc641c4 input/Init: eliminate double colon from log message 2014-12-12 13:20:37 +01:00
Max Kellermann
4741d7bfe2 Merge branch 'v0.19.x' 2014-12-12 13:14:29 +01:00
Max Kellermann
aea99a1222 decoder/ffpmeg: make variables more local 2014-12-11 10:58:33 +01:00
Max Kellermann
7c8038e2da decoder/ffpmeg: simplify ffmpeg_send_packet() 2014-12-11 10:58:06 +01:00
Max Kellermann
673336297d decoder/ffmpeg: support stream tags 2014-12-11 10:52:40 +01:00
Max Kellermann
ee4b7042ce decoder/ffpmeg: move code to FfmpegScanMetadata() 2014-12-11 10:08:08 +01:00
Max Kellermann
fc1796f3e8 decoder/ffmpeg: support ReplayGain and MixRamp 2014-12-10 13:45:29 +01:00
Max Kellermann
d8926ea5eb decoder/ffpmeg: use forward declarations 2014-12-10 13:42:34 +01:00
Max Kellermann
0c1e428c7d decoder/ffpmeg: rename functions to CamelCase 2014-12-10 13:05:28 +01:00
Max Kellermann
bcd97f5887 decoder/ffmpeg: optimize ffmpeg_scan_dictionary()
Don't scan tag items if the handler doesn't implement the tag()
method.
2014-12-10 09:35:28 +01:00
Max Kellermann
0faf86c2b9 ReplayGainInfo: add method IsDefined() 2014-12-10 07:57:46 +01:00
Max Kellermann
b30957c89c ReplayGainInfo: make IsDefined() constexpr 2014-12-10 07:57:07 +01:00
Max Kellermann
dbbcbc3616 Util/Manual: cast via void* to avoid alignment warnings 2014-12-09 23:10:05 +01:00
Max Kellermann
1889150013 Util/Manual: use Get() in Destruct() 2014-12-09 23:08:53 +01:00
Max Kellermann
14f9cdde6b Util/Manual: add assertion to Get() 2014-12-09 23:08:22 +01:00
Max Kellermann
3ab0691eec Util/Manual: add method Get()
May be more clear than operators.
2014-12-09 23:07:43 +01:00
Max Kellermann
1e073a196f util/Manual: use gcc_alignas() 2014-12-09 23:05:47 +01:00
Max Kellermann
7b60e3916c DespotifyUtils: make string buffers temporary 2014-12-09 22:14:47 +01:00
Max Kellermann
c486c5bf5b DespotifyUtils: fix coding style 2014-12-09 22:10:17 +01:00
Max Kellermann
fc0b6d143a DespotifyUtils: use ARRAY_SIZE() 2014-12-09 22:06:22 +01:00
Max Kellermann
5f4252bcd2 ConfigTemplates: use ARRAY_SIZE() 2014-12-09 22:04:34 +01:00
Max Kellermann
a588aef921 output/oss: make the static arrays "constexpr" 2014-12-09 22:02:18 +01:00
Max Kellermann
b70df57f7b ls: make the static array "const" 2014-12-09 22:01:15 +01:00
Max Kellermann
e813c93e08 decoder/mad: convert "const" to "constexpr" 2014-12-09 21:59:11 +01:00
Max Kellermann
900c4977cc AllCommands: use ARRAY_SIZE() 2014-12-09 21:58:01 +01:00
Max Kellermann
bb39fffab9 ConfigParser: make the static arrays "const" 2014-12-09 21:57:07 +01:00
Max Kellermann
f52aefb341 decoder/ffmpeg: make the tag_table constexpr 2014-12-09 21:56:22 +01:00
Max Kellermann
aecb5630cb configure.ac: use MPD_ENABLE_AUTO_LIB for libfaad 2014-12-09 21:36:52 +01:00
Max Kellermann
0f0245625a configure.ac: add macro MPD_ENABLE_AUTO_LIB 2014-12-09 21:19:09 +01:00
Max Kellermann
1ecde309e4 src/win32: move resources to win32/ 2014-12-09 14:04:33 +01:00
Max Kellermann
d62a738460 Merge branch 'v0.19.x' 2014-12-09 14:04:11 +01:00
Max Kellermann
0cfd4fff62 playlist/Print: don't skip non-existent songs in "listplaylist"
Skipping those songs silently will confuse the client, because
commands specifying the song index within a playlist
(e.g. playlistdelete) will be out of sync.

This copies spl_print()'s behavior to playlist_file_print().
2014-12-09 13:36:48 +01:00
Max Kellermann
0f1b1bb44d configure.ac: add option to disable CUE 2014-12-08 22:33:50 +01:00
Max Kellermann
36f0bd432c CommandLine: merge printf() calls 2014-12-08 18:31:30 +01:00
Max Kellermann
457ab8b2ce CommandLine: use printf() instead of puts() 2014-12-08 18:25:03 +01:00
Thomas Guillem
31726737df ConfigGlobal: fix params not fully cleaned 2014-12-08 18:15:13 +01:00
Max Kellermann
de43bddc1a release v0.19.6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUhbH6AAoJECNuiljG20USe/4QAJdMAjnggHbcC/JO9pdJ/5B1
 vK+wJqqpNkTpjRaI1OGmxWJCUYKFLCDhoSoPjkyxZ7qmvEDdhQo105/iSod1DOb7
 4wAbtrCCfkHKwNZHI2Zf713urBTkT4AZNkSmqBnFRF+sJbiKlQ4Y1EXYG/cwsu63
 8RZx3mOURi52OCYuhzurZ2UDqLj0xJ4bFxRiqHV0LLeOAyGa7P6O2M4WwjNsDB9e
 9o2ckwis3Yl+0E8FYW57WkFiSkZ40xgNa6O6gOWOYsjpey45IQrxhB5ewy/svIwZ
 jeVVnd12mkFAXG3ZBQjwAe+/H8yG5NdqhL7llznuYaX6Ii9zeAPgccK/rZ+kYKe8
 gg126KqI9lvUFV45tfoxVqUFiJu5zB0etSto/hNsIdt6ngnuU86WJ3c/X0tDxhN/
 GoIKRQxPkJ5XjNdBuRx3ELWx4Jj1UM7CHgQBaqnr0bwfWfFa0IinBwnPw0HqYyBn
 p9HZqeVrD3/JDFxungZlWaDk52iScs4Jc4ovGP8UKQVfdkS66awxcWn1gXroXla6
 UOslSkB/Gu7WluGzgCkmvD43PY/8oZlOeiP3xmsDgoq5Dg+z4GAw3NCn7/i8Mt5I
 HTjNBhLhLLoTjFmcD9MwQtV5/E1UnY1VHTpoZa8dXueyxPgMFmh14BazY+bPnfpw
 lSNAo7p0Mh8MdWrRN2Vc
 =QvY3
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.6'
2014-12-08 15:22:44 +01:00
Max Kellermann
cbc1a58e93 release v0.18.20
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUha5vAAoJECNuiljG20USdLEP/0NCwdnvCPVdkZ7RwsdCRp53
 jv86eu92uFVQJrW5/NQahngOwqNRsjNRX1EiEalbEjqCzMxDjuKCBukdteXg0Q2A
 igwDDrDwpm9tvzilsTAdjEH3gRcuxDRWfF259bZXbnxksVMuwzo31YraU6dBUkSc
 qPpQtbS4Op0paFG0TieBAt07TZ8Wb4KkAM86vBu31JpXZkXGyT6B6N3qe4WtpAN8
 l5qAWstBRog5JM3Q99FNDnCFG/2n93CEZjwN8FlQgkFhyhhDKF5YOhZNQpqTEbh9
 nxdo5V3OC42cx92V1CxrzkPKhnBIrSTGLg+Yb9S+vF3nWX+cBPpalr/rw5xZTrdH
 3zER+hOHvkMZpEZDiyUx5bkF9Ay2BvJkdJCSFSTq9HmzksTnEJ+0r44cO2rwqOpx
 R6KZPLTmObjCjmnMM+kbd6e/T8WEkcEotuYoocf3lep45roGAYuHErWW3+B89+4Z
 f0Y8uwPQTWrOGSRKXh2liWcHeN114Uwvb0ZyO+/0Oe7v1Id/IW7zC2XfSpY58dok
 /yRXiElow1LVLISixBBUAnwkx0M+CyQJqCS/nQpedPArLos+g4Wo3R+QnQEnOu9C
 e1cRY3qa56lre6BnE+rQ3aMNVGgfjsU4t3mSjQlCp1PbU7izvlgMHJcyErt6d5aj
 nA8VwjS+1PCODS/HkCqc
 =APdC
 -----END PGP SIGNATURE-----

Merge tag 'v0.18.20' into v0.19.x
2014-12-08 15:03:09 +01:00
Max Kellermann
41b4a63f2b decoder/ffmpeg: support FFmpeg 2.5
Version 2.5 fixed an API oddity, however it broke API compatibility,
at least with C++.  Disable the workaround when a libavformat version
is detected that is recent enough.
2014-12-08 14:25:34 +01:00
Max Kellermann
d8fc2db910 thread/Id: drop "::" prefix before pthread function names
The "::" to explicitly refer to the global namespace appeared like a
good idea in C++, but it breaks with C libraries that implement
standard functions using macros (e.g. musl).
2014-12-08 14:17:17 +01:00
Max Kellermann
6edfc56c9d command: use ConstBuffer<const char *> for argument list 2014-12-08 13:30:35 +01:00
Max Kellermann
5837a63942 AllCommands: simplify the tokenizer loop 2014-12-08 13:25:41 +01:00
Max Kellermann
3a28f456b1 AllCommands: assign current_command early 2014-12-08 13:25:00 +01:00
Max Kellermann
4f6fc2675c AllCommands: remove redundant initializer 2014-12-08 13:09:12 +01:00
Max Kellermann
c7da1821c3 CommandLine: show id3tag support in --version 2014-12-07 17:14:19 +01:00
Max Kellermann
1a8c3271da AllCommands: make variables more local 2014-12-06 00:10:34 +01:00
Max Kellermann
bd49e8e76f AllCommands: make the commands array "constexpr" 2014-12-06 00:07:07 +01:00
Max Kellermann
533699abe7 playlist/soundcloud: drop support for libyajl1
Require the version 2 which has a more sane API.
2014-12-05 00:37:02 +01:00
Max Kellermann
267ccc98d3 Win32Main: make the service table "constexpr" 2014-12-05 00:26:48 +01:00
Max Kellermann
cd3c2fdb49 Win32Main: make variables more local 2014-12-05 00:25:48 +01:00
Max Kellermann
5cbc319e96 configure.ac: require GLib 2.32 (if enabled)
Since version 2.32, g_thread_init() is deprecated and a no-op.  Let's
upgrade that (optional) dependency so we can remove all those
g_thread_init() calls.
2014-12-05 00:21:48 +01:00
Max Kellermann
e5ab456df3 Win32Main: use FatalSystemError() 2014-12-05 00:21:48 +01:00
Max Kellermann
08bf4f74a9 system/FatalError: add FatalSystemError() overload with WIN32 error code 2014-12-05 00:19:07 +01:00
Max Kellermann
a838a03412 system/FatalError: use FormatMessage() instead of g_win32_error_message() 2014-12-05 00:15:30 +01:00
Max Kellermann
ad4e597f74 util/Error: use FormatMessage() instead of g_win32_error_message() 2014-12-05 00:10:44 +01:00
Max Kellermann
88b75b57d0 playlist, InotifySource, ...: update GLib comments 2014-12-04 23:33:08 +01:00
Max Kellermann
aa4c7055f8 playlist/pls: custom INI parser
Don't use GLib.
2014-12-04 23:10:50 +01:00
Max Kellermann
4b70f9d213 util/DivideString: add option "strip" 2014-12-04 23:05:44 +01:00
Max Kellermann
79d2d1c201 decoder/sidplay: pass SidTuneMod to get_song_length()
Eliminate duplicate SidTune construction.
2014-12-04 21:58:09 +01:00
Max Kellermann
406bda9b95 decoder/sidplay: simplify the SidDatabase::length() call 2014-12-04 21:53:45 +01:00
Max Kellermann
405f1dd027 decoder/sidplay: include cleanup 2014-12-04 21:53:45 +01:00
Max Kellermann
51f349d504 decoder/sidplay: use class SidDatabase
Remove our own songlength database parser.
2014-12-04 21:40:38 +01:00
Max Kellermann
4f201d1e85 decoder/sidplay: use config_param::GetBlockPath() 2014-12-04 21:30:59 +01:00
Max Kellermann
03cfef100f decoder/sidplay: make "songlength_file" local 2014-12-04 21:30:59 +01:00
Max Kellermann
ff89b491dd ConfigData: update API documentation 2014-12-04 21:30:59 +01:00
Max Kellermann
7552dff0e5 decoder/sidplay: pass parsed path to get_song_length()
Eliminates duplicate ParseContainerPath() call.
2014-12-04 21:21:49 +01:00
Max Kellermann
110589c0f3 decoder/sidplay: merge get_container_name() and get_song_num() 2014-12-04 21:11:33 +01:00
Max Kellermann
5c244e9a8c SongSticker: remove obsolete documentation 2014-12-04 20:53:48 +01:00
Max Kellermann
4e2f4e2091 util/StringUtil: add ToUpperASCII()
Replaces g_ascii_strup() and allows building the Vorbis encoder
without GLib.
2014-12-04 17:43:01 +01:00
Max Kellermann
e69bef3ce3 util/SplitString: new utility class
Replaces GLib's g_strsplit().
2014-12-04 09:14:28 +01:00
Max Kellermann
c1c0fc79bc output/jack: use usleep() instead of g_usleep() 2014-12-04 09:14:28 +01:00
Max Kellermann
050f0c3d8f util/SplitString: rename to DivideString 2014-12-03 21:38:06 +01:00
Max Kellermann
90e6c727da encoder/vorbis: convert pointers to references 2014-12-02 22:33:40 +01:00
Max Kellermann
d3d9a04e62 output/ao: use class SplitString instead of g_strsplit() 2014-12-02 22:29:41 +01:00
Max Kellermann
a66051216f TagId3: add "pure" attributes 2014-12-02 22:17:47 +01:00
Max Kellermann
0debba0f6e mixer/null: new mixer plugin 2014-12-02 18:20:44 +01:00
Max Kellermann
f2bd2c318c MixerType: convert to strictly-typed enum 2014-12-02 18:20:44 +01:00
Max Kellermann
21c42819c7 MixerType: rename to CamelCase 2014-12-02 18:19:31 +01:00
Max Kellermann
5899a272ef decoder/gme: simplify ParseContainerPath()
Use simple string and path parsing functions instead of GLib's
g_pattern_match(), which was used in a very clumsy way.
2014-12-02 07:11:11 +01:00
Max Kellermann
27b4c62bc1 decoder/gme: merge get_container_name() and get_song_num()
There is duplicate code in the two.
2014-12-02 06:53:33 +01:00
Max Kellermann
b227fddec7 fs/Path: add methods GetBase() and GetDirectoryName() 2014-12-02 06:45:57 +01:00
Max Kellermann
2c1f1de33c decoder/gme: get_song_num() returns unsigned 2014-12-01 23:28:21 +01:00
Max Kellermann
c26622cf8f decoder/gme: move code to ScanMusicEmu() 2014-12-01 23:01:58 +01:00
Max Kellermann
9e91873428 decoder/gme: move code to ScanGmeInfo() 2014-12-01 22:56:48 +01:00
Max Kellermann
7363d50a1e output/httpd/IcyMetaDataServer: use CopyString() instead of g_strlcpy() 2014-12-01 22:33:57 +01:00
Max Kellermann
15213a041d output/httpd/IcyMetaDataServer: don't use GLib types 2014-12-01 22:31:29 +01:00
Max Kellermann
fb70a34c80 output/httpd/IcyMetaDataServer: make variables more local 2014-12-01 22:28:14 +01:00
Max Kellermann
fbf76c6d21 input/cdio_paranoia: use CopyString() instead of g_strlcpy() 2014-12-01 22:22:29 +01:00
Nix
811af02f56 Output: start with a null mixer.
There are code paths (mostly error cases) in which it is possible to
initialize an AudioOutput and then kill it without ever calling
audio_output_new().  In such a case, its destructor will attempt to
free a mixer that was never initialized, leading to an attempt to
take out a lock on a mutex that was similarly never initialized,
which hangs forever.

Fix by always initializing the mixer appropriately.
2014-12-01 22:14:09 +01:00
Max Kellermann
bc00c38f9d lib/icu/Converter: add ICU-based backend 2014-12-01 21:56:48 +01:00
Max Kellermann
6eb1caa417 fs/Config: add HAVE_GLIB check 2014-11-30 20:35:26 +01:00
Max Kellermann
41efc1376e fs/Config: swap #if/#else 2014-11-30 20:34:32 +01:00
Max Kellermann
0f35016773 lib/icu/Converter: add TODO comment 2014-11-30 19:08:38 +01:00
Max Kellermann
c641ca90a9 lib/icu/Collate: move code to Util.cxx 2014-11-30 10:53:05 +01:00
Max Kellermann
87c88fcb27 fs/Charset: move code to wrapper class IcuConverter
Prepare for a ICU-based backend without GLib.
2014-11-30 00:31:13 +01:00
Max Kellermann
4f80a129f1 fs/Charset: return std::string from PathFromUTF8()
Don't expose pointer that requires the caller to invoke g_free(),
because that's GLib-only.
2014-11-30 00:28:27 +01:00
Max Kellermann
6987f2ba82 fs/Charset: use macro HAVE_FS_CHARSET internally 2014-11-30 00:27:58 +01:00
Max Kellermann
563db580ae fs/Charset: add DeinitFSCharset() 2014-11-29 23:47:48 +01:00
Max Kellermann
125daea16a fs/Charset: add macro HAVE_FS_CHARSET 2014-11-29 23:36:44 +01:00
Max Kellermann
fd2c6b8a4b fs/Charset: return Error on SetFSCharset() failure
Don't abort the process, let the caller decide instead.
2014-11-29 23:36:44 +01:00
Max Kellermann
5b1db917bc fs/Config: remove bogus WIN32 check 2014-11-29 23:36:44 +01:00
Max Kellermann
849b0563ce util/Alloc: add fallback for gcc 4.6 2014-11-28 19:44:32 +01:00
Max Kellermann
16a99ad515 Compiler.h: exclude clang from GCC_CHECK_VERSION() 2014-11-28 19:33:09 +01:00
Max Kellermann
d93172bee8 Compiler.h: add macro CLANG_OR_GCC_VERSION() 2014-11-28 19:09:56 +01:00
Max Kellermann
25429af122 Compiler.h: add macro GCC_OLDER_THAN() 2014-11-28 19:09:52 +01:00
Max Kellermann
4bfd104a23 util/Manual: reimplement GCC_CHECK_VERSION() using GCC_MAKE_VERSION() 2014-11-28 19:07:59 +01:00
Max Kellermann
7745067d99 Compiler.h: add macro GCC_MAKE_VERSION() 2014-11-28 19:00:26 +01:00
Max Kellermann
b19d3629b9 util/Manual: use GCC_CHECK_VERSION 2014-11-28 19:00:26 +01:00
Max Kellermann
84c519df09 util/Alloc: remove bogus "unused" attribute 2014-11-27 18:21:50 +01:00
Max Kellermann
737a56a030 release v0.19.5
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUdiYnAAoJECNuiljG20USDB4P/3RGHBV5XgdInmYKjGg89hex
 YRiy3BVvrBri53wkj+3YwOi05Cx0fp0pCuwQ9Nm7bmPCwfdC3ASF+UBlBBhnLdfc
 dlISXDHciuKDJwiTtTlBvaKCENoZhjAJQ1SOa5zceH7j/V/XbY0FauHCeE8Ek7ht
 KjimIt1ft0mdgsGNfyisdfbnh/3r4T9V9tBs/wnr7oDTYS/eUX8vCDr5qYIZipjx
 W6pug2m4nfDtHYtN5gv53WYCIm7MiXo9vh7hCjJHd3T3xqKwdWVuz5RRcZcgd9yT
 WWlzOKAI1cgmU7rZaV6Gu+tAq9g7MpNLOGoeN6mhH9E8V16rKqvCiLaXMK5wEGs9
 JWGsTBcbTnSCdG1iivJtP2kOGVHXvNthbSunzwmbowMATi6xIBm8AoqidSzCaW1F
 C7mss8VlhkHdCtHTvyK3XCE2wGEbx4OfsfsL3PWBonrs0DpNOR2AqWQYLsZUhbff
 RV7aeyphMVvgLP67cT9YnGswKGEPOqP2EO9Mh51AQ7wiUESZ+O5J9YHWCc0E3SML
 qs9A+lpA8fstj0QJewx/HNofiHXw5A2THjs/BVqs3vYkcHnTI94Nmdxps82r/rEA
 oy9d6nQqglkPJZF3JwHqJMj1VtBIhihaHBpnLeyegjtiajZV6mVNVg9ezt9EpEA6
 OjJFh2xzQJ7w5qL0gy2R
 =1kbY
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.5'
2014-11-26 20:19:17 +01:00
Max Kellermann
27ce80544f release v0.18.19
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUdiMjAAoJECNuiljG20USjnMP/jQl/aIEiUwbwqq1F8+0wlFh
 lX5xix5+7QuvTH2Lw5brNSRdVRsHGGeDqVcSi1zY4tgNXK/EBmS1mDVKWQO5qJd9
 v+ueDRr7xI3HFECe0J7h2Q5GGD/YkeSyjB2k7C7I7t1axukLOXbP+qVyz6/d1azZ
 SkUKKmIUD4KdJuDWy34JYYiltGl94JNyTBvC+jJV4Mbg2qd7XV6MSvJipiK6aM05
 UsEza9bF/jG2aHL/xtR+dEnNLAoFoZ/h1RqUoYw4DLEKxfip+E3MD4sEx6Sg8XSv
 v2rZQrMhl2LvJkwCjo57KrJ4YmHK0U3zg3ElDefqRsW4J10x5d3hhOINJPpHUpyZ
 T5RvoDCJ5BL+6wg0tA57338pNydSBQDV5+WjI9+vD8ahnZlFgjY+OoJDxkxtFlYz
 pLazEQbkUWlU62ZGW/dVpwgYInalNH9ZTrvelwXtGmwMfLhp01S4DHX3ipFgmMGd
 do3x/FoVRyOnFWQPotga3+ZoARqmXhfQ70DqESoajBHeLTzYBs9vh+fw6y1iVeGb
 rIBEIyMPlyuPt+2NrLflo6o0VMYB8MV3nh3P3DX8Ywavae3+k4WPGx2w/MEM34lF
 sWUDXfZeCwJ5rrXeyP/s2C9ZmJ+Bm6WlxQ0gUZXMtrfDShPBY8gHzGi4m3ooslde
 OZCIokCaATDa9Fp6CRD8
 =I9PV
 -----END PGP SIGNATURE-----

Merge tag 'v0.18.19' into v0.19.x
2014-11-26 20:02:57 +01:00
Max Kellermann
12b6959ea2 Playlist: reset song priority on playback
A priority should be a volatile thing: it should schedule a song for
playing back once, but it should not affect the next time the queue
gets played.
2014-11-26 08:54:16 +01:00
Max Kellermann
7519768cb1 Queue: add "reorder" parameter to SetPriority() 2014-11-26 08:50:58 +01:00
Max Kellermann
9af470c92d Playlist: add method SongStarted()
Empty currently, but code will be added song.
2014-11-26 08:49:19 +01:00
Max Kellermann
ac8c1d0a01 Playlist: move more functions into the class 2014-11-26 08:34:51 +01:00
Max Kellermann
921d01b59d Playlist: add another assertion 2014-11-26 08:25:48 +01:00
Max Kellermann
8aa4a66ba0 Playlist: move playlist_song_started() into the class 2014-11-26 08:24:25 +01:00
Max Kellermann
2e7153d8d6 DatabasePrint: cast int to unsigned before comparison
Fixes compiler warning.
2014-11-26 08:21:55 +01:00
Max Kellermann
70b5a81a29 {Tag,Song}Print, PlayerCommands: report song duration with milliseconds precision 2014-11-25 17:46:43 +01:00
Max Kellermann
83fd822e8b ApeTag: drop support for non-standard tag "album artist"
This was used by proprietary software.  MPD adopted it a few years
ago, which turns out to be a mistake, because it now creates problems
for some MPD users (http://bugs.musicpd.org/view.php?id=4168).
2014-11-25 17:07:08 +01:00
Max Kellermann
e72eef421b lib/nfs/FileReader: clean up on disconnect
Avoids crash because Close() invokes a call on a destructed
NfsConnection.
2014-11-25 14:02:15 +01:00
Max Kellermann
016063c810 lib/nfs/FileReader: move code to CancelOrClose() 2014-11-25 14:00:32 +01:00
Max Kellermann
38f19981b2 lib/nfs/FileReader: reset state in OnNfsConnectionFailed()
Avoid calling NfsConnection::RemoveLease(), because the lease has been
removed already.
2014-11-25 13:51:09 +01:00
Max Kellermann
40dd968f13 lib/nfs/FileReader: update "state" in OnNfsError()
Clean up the "state" to indicate that there is no longer any
asynchronous operation.  Fixes another NFS-related crash due to
cleanup of a non-existing asynchronous operation.
2014-11-25 13:39:42 +01:00
Max Kellermann
3cef348f30 lib/nfs/Manager: defer NfsConnection destruction
Avoids a crash that occurs when NfsConnection::OnSocketReady()
dereferences itself before returning.
2014-11-25 13:31:18 +01:00
Max Kellermann
b293b16007 lib/nfs/Connection: broadcast error before closing connection
During the NfsLease::OnNfsConnectionFailed() call, the old (defunct)
nfs_context may be used to close file handles.  Such code does not yet
exist, but will be added soon to fix other bugs.
2014-11-25 13:27:06 +01:00
Max Kellermann
f5f43db2da lib/nfs/Connection: cancel DeferredMonitor on disconnect
Fixes potential second mount attempt after the old connection to the
NFS server was shut down.
2014-11-25 13:22:25 +01:00
Max Kellermann
029555d192 lib/nfs/FileReader: include Compiler.h for "final" fallback 2014-11-25 13:18:22 +01:00
Max Kellermann
fa4d202e71 decoder/mp4v2: remove because of incompatible license
libmp4v2 is licensed under MPL 1.1, which is incompatible with GPLv2.
Unfortunately, this means that we must remove the plugin.

More information can be found in the Debian bug report:

 http://bugs.debian.org/767504
2014-11-25 13:10:52 +01:00
Max Kellermann
a8ebfd7a92 event/DeferredMonitor: include cleanup 2014-11-25 10:44:06 +01:00
Max Kellermann
a254f5a3a8 archive/zzip: fix inverted error handler
Set the Error when zzip_seek()==-1 and not on success.  Fixes a crash
after seeking.
2014-11-24 22:08:50 +01:00
Max Kellermann
bf15cac980 Merge branch 'v0.19.x' 2014-11-24 09:00:14 +01:00
Max Kellermann
951bad46e0 decoder/{dsdiff,dsf,opus}: fix deadlock while seeking 2014-11-24 08:54:30 +01:00
Max Kellermann
0709065f50 Java/File: fix include guard 2014-11-24 07:51:25 +01:00
Max Kellermann
c643b6ff16 configure.ac: add macro MPD_ENABLE_AUTO_PKG_LIB 2014-11-22 23:50:21 +01:00
Max Kellermann
b3f5b4932c configure.ac: add macro MPD_ENABLE_AUTO_PKG
Simplify the definition of many build options.
2014-11-21 22:19:57 +01:00
Max Kellermann
ed001e0cfb configure.ac: add option "--disable-daemon" 2014-11-20 20:38:37 +01:00