Commit Graph

9094 Commits

Author SHA1 Message Date
Max Kellermann
ac1eaff6ec thread/Mutex: add class ScopeUnlock() 2015-12-31 12:30:53 +01:00
Max Kellermann
45f6129ae7 player/Control: don't stop playback in Play()
Instead of stopping playback completely, only CANCEL the queued song
if necessary, and use the SEEK command to play the selected song.
SEEK will take care for current playback state.
2015-12-29 13:49:15 +01:00
Max Kellermann
f3503e0026 fs/DirectoryReader: use C++ exceptions instead of class Error 2015-12-29 12:56:26 +01:00
Max Kellermann
826a654c95 fs/DirectoryReader: use C++11 initializer 2015-12-29 12:56:26 +01:00
Max Kellermann
08754e6ce7 system/Error: add IsAccessDenied() 2015-12-29 12:56:26 +01:00
Max Kellermann
3843972b05 command/Error: workaround for gcc 4.x rethrow_exception(exception_ptr) 2015-12-29 12:39:28 +01:00
Max Kellermann
37862f0f20 PlaylistFile: convert more APIs from Error to std::exception 2015-12-28 14:20:37 +01:00
Max Kellermann
1f184f4aec PlaylistFile: throw exception on spl_map_to_fs() failure 2015-12-28 14:20:37 +01:00
Max Kellermann
db5a691693 PlaylistFile: remove obsolete function TranslatePlaylistError() 2015-12-28 14:20:37 +01:00
Max Kellermann
48693250a4 command/Error: no std::exception_ptr forward declaration
This breaks on some standard library implementations.
2015-12-28 14:20:37 +01:00
Max Kellermann
570dcb6309 command/Error: support nested exceptions 2015-12-28 07:00:01 +01:00
Max Kellermann
19e43087a8 command/Error: move code to ToAck(std::exception_ptr) 2015-12-28 06:53:52 +01:00
Max Kellermann
fe0b6a1117 PlaylistFile: convert system_error::ENOENT to PlaylistResult::NO_SUCH_LIST 2015-12-28 06:44:01 +01:00
Max Kellermann
72851647ca PlaylistError: fix NoSuchSong() code 2015-12-28 06:44:01 +01:00
Max Kellermann
1c90400081 command/Error: pass std::exception_ptr to PrintError()
Necessary to preserve type information.  The try/catch sequence didn't
work previously.
2015-12-27 06:43:55 +01:00
Max Kellermann
672e18cac9 system/Error: fix duplicate strerror() call
Apparently, the std::system_error constructor appends strerror()
already.
2015-12-27 06:05:53 +01:00
Max Kellermann
e939d667d9 protocol/Ack: add exception class wrapping enum ack 2015-12-18 09:53:02 +01:00
Max Kellermann
8bb5a565cd PlaylistError: add exception class wrapping enum PlaylistResult 2015-12-18 09:21:11 +01:00
Max Kellermann
7562c5751c db/Configured: allocate ConfigBlock on the stack 2015-12-18 09:17:12 +01:00
Max Kellermann
e6e7d6dbd6 fs/io/Reader: use C++ exceptions instead of class Error 2015-12-18 01:08:16 +01:00
Max Kellermann
fe60c52c70 system/Error: add MakeErrno(), MakeLastError() 2015-12-18 01:08:16 +01:00
Max Kellermann
93f4590453 system/Error: add IsFileNotFound() 2015-12-18 00:54:23 +01:00
Max Kellermann
1098d271b8 util/Error: add bridge to std::exception 2015-12-18 00:24:43 +01:00
Max Kellermann
51168169e7 util/Tokenizer: use std::runtime_error on syntax error 2015-12-16 11:34:26 +01:00
Max Kellermann
d256a0e98f config/ConfigFile: use std::exception on syntax error 2015-12-16 11:13:16 +01:00
Max Kellermann
6717325c3f config/ConfigFile: use std::unique_ptr 2015-12-16 11:13:16 +01:00
Max Kellermann
c4a0571e7a config/ConfigFile: fix typo in format string 2015-12-16 11:13:16 +01:00
Max Kellermann
e4a06da14e fs/io/OutputStream: use C++ exceptions in Write() 2015-12-16 10:24:43 +01:00
Max Kellermann
36d6ead65c fs/io/GzipOutputStream: use C++ exceptions in constructor 2015-12-16 10:14:56 +01:00
Max Kellermann
7eae3bc8c5 fs/io/FileOutputStream: use C++ exceptions in Commit() 2015-12-16 00:33:33 +01:00
Max Kellermann
24b2198668 fs/io/FileOutputStream: use C++ exceptions in constructor 2015-12-16 00:33:30 +01:00
Max Kellermann
d29be0f460 db/simple: use std::unique_ptr<GzipOutputStream> 2015-12-16 00:33:10 +01:00
Max Kellermann
8f93c36466 command/AllCommands: catch and report std::exception 2015-12-16 00:07:51 +01:00
Max Kellermann
3092e5a8a5 system/Error: helper library for constructing std::system_error 2015-12-16 00:07:51 +01:00
Max Kellermann
55f95b3ac9 Log: C++ exception support 2015-12-16 00:07:51 +01:00
Max Kellermann
c11345c4d9 db/DatabaseLock: add class ScopeDatabaseUnlock 2015-12-16 00:07:51 +01:00
Max Kellermann
e31f0b8b0c db/simple: use class ScopeDatabaseLock 2015-12-16 00:07:51 +01:00
Max Kellermann
7dd3b72a8c db/DatabaseLock: add ScopeDatabaseLock::unlock() 2015-12-16 00:07:51 +01:00
Max Kellermann
9bc0fada5c release v0.19.12
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWcH4fAAoJECNuiljG20USbAcQAKX0G+V10HI2Bmf7JJ3pWW96
 GiOBpd66pEPioXdfpxOQNLglKS+rcproCWZnQf/VSoYN5d6pT6VLCQiMpdm3ZkNO
 ZLWGhJ0Md1PGj+xjfGrMw95g+cqV+wMo1PETOsE/MtINqN/nMyQNI7lFnZ8xYEAP
 DhJB1pXdchHvUVM3o+vpGSEOScn3XstL8+a/K5+Rvxptew4QDI/0ucyTLcLaaxkY
 r/bH8wTDSMSpez4M5Me9MQ9OJ9NUPgudvs8Ppzji26lMcQRnZGdcffGTj08Lv+1b
 gyx25t8sija6XVt6AEqn8KX+YAhe94c7ROq5PzdLeUszUf4YFIqaZ7O19PSYuuB6
 APfr25A7NBQtJ88Wjw6slco+mAwbLZwQewZtFZCq6Y8J3oRBG6bpaPhFWUyygqTL
 rIU735+o3FvqijKJUtKG0rAz+wfsPk6TMvIg4VMUaQXneS1LbzZe2Nz2FGxtonpd
 Ua/tBQ/LnX8Utueuhy0kH06qPqq1/eSCMZIH/yphfR+B5k90h719RN/BR5xPv9Fb
 vRdiSgPtfACAHvnadqcpVGjmmCQtXurC7gFceEc4Anign5kkSSGrDmo9OYhxwSkl
 8A2GeOmxNrs2aFkNelnH3C6BTOEcewbXEmPQhTiBoX9LDmDK31rfSoVI0SUt7rbR
 Sbt21m+7ThEqFfafZ8a/
 =hDes
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.12'

release v0.19.12
2015-12-15 22:05:21 +01:00
Benno Fünfstück
cae2811762 fix mpd crash on invalid utf8 stream title 2015-12-15 21:49:53 +01:00
Max Kellermann
28f9a0a900 command/other: re-allow "lsinfo /"
This compatibility hack was accidently broken by commit f072cbbb
2015-11-13 21:04:02 +01:00
Max Kellermann
a6bb3cf60a command/queue: use StringIsEqual() instead of memcmp()
memcmp() can overflow the buffer.
2015-11-13 21:02:33 +01:00
Max Kellermann
004da5d385 queue/Save: fix "Malformed playlist line in state file"
Regression by commit 738583e3
2015-11-13 20:45:50 +01:00
Max Kellermann
0368282486 player/Control: add code comments 2015-11-13 16:02:07 +01:00
Max Kellermann
4404f20cf4 player/Control: Seek*() returns Error information 2015-11-11 19:56:09 +01:00
Max Kellermann
faca8bc02a decoder/Control: Seek() returns Error information 2015-11-11 19:56:08 +01:00
Max Kellermann
5e93c05095 queue/Playlist: seek methods return bool/Error instead of PlaylistResult 2015-11-11 19:56:01 +01:00
Max Kellermann
0f4f04eaa4 command/CommandError: send verbose error message to client 2015-11-11 19:51:09 +01:00
Max Kellermann
2e55d561d3 PlaylistError: remove unused code "ERRNO" 2015-11-11 19:50:57 +01:00
Max Kellermann
76a9049739 decoder/Control: State::ERROR is illegal
The state ERROR can only be entered during decoder initialization, and
Seek() may only be called after initialization has been finished.
2015-11-11 17:46:06 +01:00
Max Kellermann
27bfcda20d decoder/Control: use switch/case in Seek() 2015-11-11 17:46:03 +01:00
Max Kellermann
c6d1d360a3 player/Control: use class ScopeLock 2015-11-11 17:43:56 +01:00
Max Kellermann
afc1236b06 player/Control: move code to ClearError() 2015-11-11 17:41:02 +01:00
Max Kellermann
bedd5f00f8 player/Control: move code to SeekLocked() 2015-11-11 16:56:24 +01:00
Max Kellermann
36239895bd player/Control: add Lock prefix to locking method names 2015-11-11 16:50:57 +01:00
Max Kellermann
738583e3d4 StateFile: use StringAfterPrefix() instead of StringStartsWith() 2015-11-11 15:34:36 +01:00
Max Kellermann
c513478c31 db/simple: use StringAfterPrefix() instead of StringStartsWith() 2015-11-11 15:27:56 +01:00
Max Kellermann
a944927b56 util/StringPointer: add method empty() 2015-11-11 15:13:46 +01:00
Michael Paquier
315f9d98f6 Main: fix build failure on non-Linux systems 2015-11-10 08:38:53 +01:00
Max Kellermann
b9a8b0d146 util/StringView: add method Literal() 2015-11-06 10:03:45 +01:00
Max Kellermann
4d15db0134 util/StringCompare: use StringView to simplify inline implementations 2015-11-06 10:03:14 +01:00
Max Kellermann
0d1a54262c playlist/soundcloud: make key_str "static const" 2015-11-06 09:52:35 +01:00
Max Kellermann
e7ef7f5159 db/update/InotifyQueue: use StringAfterPrefix() 2015-11-06 09:49:39 +01:00
Max Kellermann
3dc989bccb input/alsa: use StringAfterPrefix() 2015-11-06 09:49:22 +01:00
Max Kellermann
75d46efd23 util/UriUtil: use StringAfterPrefix() instead of memcmp() 2015-11-06 09:49:22 +01:00
Max Kellermann
b83392cb04 util/UriUtil: move code to SkipUriScheme() 2015-11-06 09:49:22 +01:00
Max Kellermann
7640d333f4 util/UriUtil: make variables more local 2015-11-06 09:49:22 +01:00
Max Kellermann
c880099deb util/StringCompare: add StringIsEmpty() 2015-11-06 09:37:07 +01:00
Max Kellermann
42f5ecd4a1 util/StringCompare: use strncmp() instead of memcmp() in StringStartsWith()
Some optimized implementations of memcmp() may not start from the
beginning of the string, and may thus segfault.
2015-11-06 09:24:18 +01:00
Max Kellermann
733989a284 util/StringUtil: move comparison functions to StringCompare.cxx 2015-11-06 09:20:18 +01:00
Max Kellermann
493f74d94d tag/id3: convert path from "wchar_t*" to "char*" for error message 2015-11-06 09:20:18 +01:00
Max Kellermann
3b71e2abef player/Thread: call DecoderCommand::SEEK only on existing decoder
If the decoder was just started, it already seeks to the desired
position.
2015-11-05 00:41:54 +01:00
Max Kellermann
30cad0c5f1 player/Thread: move code to WaitDecoderStartup() 2015-11-05 00:39:30 +01:00
Max Kellermann
3a387643b3 player/Thread: move player_command_finished() to PlayerControl 2015-11-05 00:38:09 +01:00
Max Kellermann
e6b37703da player/Thread: copy pc.seek_time in ActivateDecoder()
If this gets called while seeking, do the right thing.  This moves the
elapsed_time setter from method Run(), which is now redundant.
2015-11-05 00:30:04 +01:00
Max Kellermann
990f473bb3 player/Control: initialize seek_time in EnqueueSongLocked()
Allows removing a few special cases in the player thread.
2015-11-05 00:29:03 +01:00
Max Kellermann
cf1de78205 player/Thread: remove decoder error check from ActivateDecoder()
It is futile to check for decoder errors before the decoder has
finished startup.  At this time, it's unlikely that the decoder has
already failed.
2015-10-28 18:24:42 +01:00
Max Kellermann
ccea6dd74b player/Thread: rename WaitForDecoder() to ActivateDecoder()
.. and fix its API documentation.
2015-10-28 18:20:48 +01:00
Max Kellermann
166b490eed player/Thread: move code to ForwardDecoderError() 2015-10-27 23:28:13 +01:00
Max Kellermann
efd871ad2f player/Thread: clear pc.next_song earlier in WaitForDecoder() 2015-10-27 23:25:50 +01:00
Max Kellermann
b78896d64e player/Control: use CANCEL to clear next_song in Seek()
Assigning nullptr to next_song may disrupt the player thread and
render undefined behavior.
2015-10-27 23:09:03 +01:00
Max Kellermann
e753c924ef player/Thread: merge the cross_fading flag into enum CrossFadeState 2015-10-27 22:43:46 +01:00
Max Kellermann
9dc7b5a6d9 player/Thread: move ResetCrossFade() calls to where pipes are set
Move ResetCrossFade() to where cross-fading would actually break, to
make the cross-fading state more reliable.
2015-10-27 22:11:56 +01:00
Max Kellermann
f5d21c9cdb player/Thread: add method ResetCrossFade() 2015-10-27 22:05:41 +01:00
Max Kellermann
6ce13646da player/Thread: more CrossFadeState documentation 2015-10-27 21:12:20 +01:00
Max Kellermann
151653dd98 player/Thread: automatic CrossFadeState enum values 2015-10-27 21:05:10 +01:00
Max Kellermann
619cfe6a1c player/Thread: move enum CrossFadeState into the Player class 2015-10-27 20:48:14 +01:00
Max Kellermann
8acf996d90 command/queue: add range parameter to plchanges and plchangesposid 2015-10-27 20:35:40 +01:00
Max Kellermann
15e432204e pcm/Order: new library to convert from FLAC to ALSA channel order
This new library is integrated in the PcmExport class and (if enabled)
converts MPD's channel order (= FLAC channel order) to ALSA channel
order.

This fixes:
 http://bugs.musicpd.org/view.php?id=3147
and
 http://bugs.musicpd.org/view.php?id=3255
2015-10-27 11:44:23 +01:00
Max Kellermann
4b1630e1ec AudioFormat: define that channel order follows the FLAC convention
Basic definition to solve http://bugs.musicpd.org/view.php?id=3147 and
http://bugs.musicpd.org/view.php?id=3255
2015-10-27 11:44:23 +01:00
Max Kellermann
94f850a588 release v0.19.11
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWL0cEAAoJECNuiljG20USkHkP/0m3kFEEgqauAIbI1t0TkKOp
 2ii5iHZeMAlsxGEc5SX5fFoXM6STbXq/3+OXBf+OnABh9b03o744QAAwh1ei9tiQ
 kMysbN2fbpHkuchx1JfrOU1ad3qfWXQri8csTtx5eRYpgyqF7Mfl1SoY1nkpherd
 j4MVq7MVqBhwCqpAfJvTFTSOlNrJ4bBcvIgGslhFYhRxMRM83KgFS//lHvbXWnOg
 fjYEO34nz0rjCfz6x2r7ZQBLeQVr9n6h24iYhSTnU7Xq9o2ezWlVRIm9YVhxoZKf
 /MRJuAzaHhGID8IvX7dPxdQJ+feUhQXSv8HSjOJBO6R2dqIScE3D6EIBHy8Cj9Bk
 O2D1SgmR+2NnjNz2GUjCIKHm9c9jTgv+rnZ2l8hweS2oUQOPHbCtOoCNAfwyP+/Y
 ms1CavNl7bUuvWrM1ipM2ZK6QfW9P4F1dtmwqtJCsqdGFyQyfACcxqmlkfxhB2vI
 NyvKAOn/TlWWQscF9id3r90sEir/J9e7IJ6oZh+uvyIfOtt8wR/Jm5/H1MA7j3iX
 XmNbe1GY3WHjCH2lRr3tIRKAE8I3HAtBzwhvq/miSESrkEnJ06VMatkoMRQT63gy
 62yaCg+ZWiBRp07ygiedYuGL19pDOhqRjY3U/b/0EHMb9ux083nuUTssqgzzO2OP
 9OPao5CPs4M4QvmiG/wF
 =RdQt
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.11'
2015-10-27 11:05:47 +01:00
Max Kellermann
5719207dfa gme: don't loop forever, fall back to GME's default play length
Fixes http://bugs.musicpd.org/view.php?id=4432
2015-10-26 17:16:20 +01:00
Max Kellermann
a84fbbe327 decoder/gme: free the gme_info_t as early as possible 2015-10-26 17:15:24 +01:00
Max Kellermann
3882c11450 decoder/gme: log the emulator type 2015-10-26 17:00:27 +01:00
Max Kellermann
08f77c2b60 decoder/gme: add option "accuracy" 2015-10-26 16:56:55 +01:00
Max Kellermann
93c97972b9 decoder/gme: call decoder_seek_error() on seek error 2015-10-26 16:32:39 +01:00
Max Kellermann
ac61d43720 output/Command: flush the mixer cache when enabling/disabling output
Fixes mixer lag (http://bugs.musicpd.org/view.php?id=4425).
2015-10-26 16:29:07 +01:00
Max Kellermann
22ebe0e58f playlist/flac: re-add the plugin
This reverts commit d7d9dbd2c2 by
reimplementing it with the current MPD API.

3 years ago, I was wrong about the "embcue" plugin being able to
replace this one, because "embcue" reads a tag named "CUESHEET", while
this plugin reads the "CUESHEET" FLAC metablock.  There's an important
difference between those two!
2015-10-26 13:16:01 +01:00
Max Kellermann
1958f78cc1 decoder/ffmpeg: fix crash due to wrong avio_alloc_context() call
Allocate the buffer dynamically using av_malloc(), and free
AVIOContext.buffer in the destructor, as mandated by the libavformat
documentation.

Fixes http://bugs.musicpd.org/view.php?id=4446
2015-10-26 13:06:29 +01:00
Max Kellermann
f072cbbba7 LocateUri: new library to classify URIs in a standard way 2015-10-22 09:39:28 +02:00
Max Kellermann
1a5b66b78d SongLoader: move code to LoadFromDatabase()
Avoids the recursion in LoadFile().
2015-10-22 09:34:13 +02:00
Andreas Mair
bea5973e0c Filter out this extra data and leading zeroes in "track" and "disc" tags. 2015-10-21 08:30:33 +02:00
Max Kellermann
0366dcf604 PlaylistPrint: fix -Wunused #ifndef ENABLE_DATABASE 2015-10-20 13:50:00 +02:00
Max Kellermann
8211d4a1c2 DetachedSong: check AllocatedPath::FromUTF8() result 2015-10-20 12:16:25 +02:00
Max Kellermann
fc2154ee92 DetachedSong: move code from Update() to LoadFile()
Avoid duplicate AllocatedPath::FromUTF8() invocations in two callers.
2015-10-20 12:10:42 +02:00
Max Kellermann
76f85e6f7b command/DatabaseCommands: pass URI to handle_lsinfo2() 2015-10-20 12:07:18 +02:00
Max Kellermann
81ce684b35 command/FileCommands: fix access to absolute paths in "readcomments" 2015-10-20 11:25:46 +02:00
Max Kellermann
42bd888946 input/InputStream: remove obsolete method OverrideMimeType() 2015-10-20 11:18:35 +02:00
Max Kellermann
6bea346c41 output/httpd: use boost::intrusive::list instead of std::forward_list 2015-10-19 16:00:26 +02:00
Max Kellermann
8d23706354 util/DeleteDisposer: new utility class 2015-10-19 15:57:30 +02:00
Max Kellermann
62bfb1a273 decoder/mad: reduce memory usage while scanning tags
Allocate the frame pointers only when actually decoding the file.
2015-10-19 13:12:36 +02:00
Max Kellermann
38e86af75c fs/Traits: use StringAfterPrefix() in Relative() 2015-10-19 10:56:13 +02:00
Max Kellermann
607c2c5ba2 util/StringUtil: add StringAfterPrefix() 2015-10-16 19:18:04 +02:00
Max Kellermann
85f58eb082 util/WStringUtil: fix indent 2015-10-16 19:17:54 +02:00
Max Kellermann
a7ee64a25b decoder/mpcdec: use SampleTraits<SampleFormat::S24_P32>
Eliminates some duplicate code, and as a side effect, this works
around clang 3.8 compiler warning because a negative value was
shifted.
2015-10-16 18:12:32 +02:00
Max Kellermann
2a58f22649 decoder/mpcdec: use Clamp() 2015-10-16 18:11:42 +02:00
Max Kellermann
f066bb7716 unix/Daemon, playlist/...: remove unused Domain variables 2015-10-16 18:08:59 +02:00
Max Kellermann
4e3d182189 encoder/flac: fix crash with 32 bit playback
Copy to encoder->audio_format *after* adjusting the sample format to
S24_P32.

Fixes http://bugs.musicpd.org/view.php?id=4433
2015-10-16 18:05:34 +02:00
Max Kellermann
205fba74cf tag/ApeLoader: fix buffer overflow after unterminated key 2015-10-16 14:55:40 +02:00
Max Kellermann
438b7b7bd0 util/ConstBuffer: add method MoveFront() 2015-10-16 09:00:36 +02:00
Max Kellermann
27a40a9843 util/StringView: add methods StripLeft(), StripRight() 2015-10-16 08:59:47 +02:00
Max Kellermann
c7b0e9b05b lib/expat/Parser: delete the copy constructor/operator 2015-10-02 18:06:32 +02:00
Max Kellermann
356c829b76 util/StringView: new utility class 2015-09-30 22:21:46 +02:00
Anthony DeRossi
6b6c7b0920 update: apply .mpdignore matches to subdirectories
Wildcard matches are directly applied to all filenames in
subdirectories without any attempt at matching relative paths.

This change is based on the following feature request:

  http://bugs.musicpd.org/view.php?id=3729
2015-09-30 21:50:34 +02:00
Anthony DeRossi
de332a16d1 event/ServerSocket: fix AF_UNIX address in use error
bind fails with an "address already in use" error if the socket path
already exists.

This was broken by cbb595ba.
2015-09-30 21:50:34 +02:00
Anthony DeRossi
84ab3ee3af unix/PidFile: fix empty PID file
This was broken by 4f29034f.
2015-09-30 21:49:18 +02:00
Max Kellermann
ce0d896492 unix/Daemon, playlist/pls, ...: remove unused Domain variables 2015-09-17 23:15:54 +02:00
Max Kellermann
eae9cb4afe Main: use config_domain for inotify error 2015-09-17 23:15:54 +02:00
Max Kellermann
459a812a54 notify: use "constexpr" only with glibc
The Mutex and Cond constructors are only "constexpr" with glibc, and
this is what this #ifdef is about.
2015-09-17 22:56:35 +02:00
François Revol
7743647460 output: add native Haiku audio output and mixer support
Also uses the notification system to display tags.
2015-09-17 22:46:46 +02:00
François Revol
1943b158fe Haiku: add resources: application signature and flags
Since we do not handle B_QUIT_REQUESTED because the BApplication
does not Run(), use the background flag to avoid showing up in Deskbar.
2015-09-17 22:46:46 +02:00
François Revol
a36eeb5261 Haiku: add icon as resource definition file 2015-09-17 22:46:46 +02:00
François Revol
a8b00faba1 Haiku: add an HVIF icon
3D version reinterpreted from the official 2D design,
reusing existing Haiku icons.

Icon-O-Matic source file.
Same as data/artwork/icons/App_MusicPD in the Haiku tree as of hrev47609.
2015-09-17 22:46:46 +02:00
François Revol
bf73d0f905 notify: Don't use constexpr on Haiku 2015-09-17 22:46:46 +02:00
François Revol
193ffa06d9 system/SocketUtil: guard usage of SO_PASSCRED
Haiku has struct ucred but no SO_PASSCRED (yet).
2015-09-17 22:46:46 +02:00
François Revol
9d176e35d4 unix/Daemon: define WCOREDUMP() for platforms that don't support it
Haiku does not dump core, it just starts the debugger.
2015-09-17 22:46:46 +02:00
Will Tiffany
8461d71b52 CueParser.cxx: Append pregap to previous track
Only ignore indexes after first nonzero, preserving pregaps but
appending them to the previous track instead of prepending to the
current. The first index of the first track is used for the start time
regardless of its number. Unneeded bool last_updated removed.
2015-09-17 22:44:47 +02:00
Max Kellermann
e31cdf0df9 util/AllocatedString: fix off-by-one bug in Duplicate() 2015-09-01 23:33:19 +02:00
Max Kellermann
6f41791ea6 util/StringAPI: add UnsafeCopyStringP() 2015-09-01 21:16:22 +02:00
Max Kellermann
0bacbcd04e util/StringAPI: fix include guard name 2015-09-01 21:12:16 +02:00
Max Kellermann
ffe689363f util/AllocatedString: add constant "SENTINEL" 2015-09-01 21:11:22 +02:00
Max Kellermann
48d7fedbc0 thread/{Mutex,Cond}: remove obsolete comments 2015-08-25 12:52:13 +02:00
Max Kellermann
75dff64450 thread/Posix{Mutex,Cond}: use "constexpr" only with glibc
Apparently all other C libraries are not compatible with "constexpr".
Those which are not will get a performance penalty, but at least they
work at all.
2015-08-25 12:46:12 +02:00
Max Kellermann
f0b58c6f24 db/UniqueTags, tag/Set, ...: use typedef tag_mask_t 2015-08-24 11:53:30 +02:00
Max Kellermann
f3661b19c0 tag/Settings: move typedef tag_mask_t to Mask.hxx 2015-08-24 11:40:25 +02:00
Max Kellermann
2f5106c97f tag/Settings: convert to C++ 2015-08-24 11:20:45 +02:00
Max Kellermann
0c19418e84 tag/Settings: convert to bit mask 2015-08-24 11:20:45 +02:00
Max Kellermann
60c077c790 tag/Settings: add function IsTagEnabled() wrapping access to ignore_tag_items[] 2015-08-24 11:20:45 +02:00
Max Kellermann
7aaa4dda22 TagPrint: use unsigned integer 2015-08-24 11:20:45 +02:00
Max Kellermann
109b3700b5 Tag: include cleanup 2015-08-24 11:20:45 +02:00
Max Kellermann
71fecf4d1f unix/PidFile: add missing include stdlib.h for strtoul() 2015-08-24 10:40:05 +02:00
Will Tiffany
0f75c79665 CueParser.cxx: ignore INDEX after first per track
Use the first INDEX in each TRACK section, instead of the last, for the
start time. This preserves the original CD layout (including gaps
between tracks), and avoids skipping sections of songs in more exotic
cuesheets (eg musical suite tracks).

Fixes 0004355 and 0003359
2015-08-23 15:49:50 +02:00
Max Kellermann
4f29034f11 unix/PidFile: use raw file descriptor instead of stdio 2015-08-15 16:42:07 +02:00
Max Kellermann
567bf445bf unix/Daemon: move code to ReadPidFile() 2015-08-15 16:41:22 +02:00
Max Kellermann
28a0c46ca7 unix/Daemon: eliminate local variable "ret" 2015-08-15 16:41:21 +02:00
Max Kellermann
5fba8d773c PlayerThread, ...: move to src/player/ 2015-08-15 15:55:46 +02:00
Max Kellermann
36cd73df51 client, command: use StringIsEqual() 2015-08-14 19:48:30 +02:00
Max Kellermann
6f20889f00 command/CommandListBuilder: postpone "size" initialization 2015-08-14 19:42:11 +02:00
Max Kellermann
8e408725e9 protocol/Result: move current_command to class Response 2015-08-14 19:04:00 +02:00
Max Kellermann
d053797340 protocol/Result: move command_list_num to class Response 2015-08-14 19:00:02 +02:00
Max Kellermann
c8d0f947d2 protocol/Result: move error code to class Response 2015-08-14 18:57:44 +02:00
Max Kellermann
86e036c393 command: pass Response object to command callbacks 2015-08-13 12:48:31 +02:00
Max Kellermann
7652a2986b client/Response: new Client wrapper class for writing responses 2015-08-12 08:41:05 +02:00
Max Kellermann
b1480167be command/Request: add parser methods
Wrapper for protocol/ArgParser.cxx.
2015-08-11 23:02:34 +02:00
Max Kellermann
e118e958f7 protocol/ArgParser: add overload with max_value parameter 2015-08-11 22:58:04 +02:00
Max Kellermann
ee61dfe087 protocol/ArgParser: use std::numeric_limits
Using unsigned(-1) renders undefined behavior.
2015-08-11 22:57:47 +02:00
Max Kellermann
9231f420c1 protocol/ArgParser: overload as ParseCommandArg(), pass references 2015-08-11 22:43:10 +02:00
Max Kellermann
0f92d021a1 command/Request: new struct wrapping ConstBuffer<const char *> 2015-08-11 22:43:10 +02:00
Max Kellermann
cbdc3194cc protocol/ArgParser: add struct RangeArg 2015-08-11 22:43:10 +02:00
Max Kellermann
993df0fd28 command/{Queue,Other}: eliminate local "bool" variable 2015-08-11 21:54:29 +02:00
Max Kellermann
84e09aa8dd Partition: add method GetDatabase() 2015-08-06 12:45:45 +02:00
Max Kellermann
6cce3d2996 ClientWrite: merge client_write() into Client::Write() 2015-08-06 10:36:24 +02:00
Max Kellermann
77b34fa961 Client: include cleanup 2015-08-06 10:32:18 +02:00
Max Kellermann
024d978ae5 output/fifo: smaller Cancel() buffer 2015-08-06 10:15:19 +02:00
Max Kellermann
e0f55b9295 output/fifo: move the buffer into the loop 2015-08-06 10:14:53 +02:00
Max Kellermann
ccd83748f7 output/fifo: use ssize_t for the read() result 2015-08-06 10:14:35 +02:00
Max Kellermann
291ee9f86a output/fifo: simplify the Cancel() loop 2015-08-06 10:13:21 +02:00
Max Kellermann
59e4d7f0f5 output/fifo: convert struct to class 2015-08-06 09:51:03 +02:00
Max Kellermann
4647448399 output/fifo: use AudioOutputWrapper::Open(),Close() 2015-08-06 09:50:02 +02:00
Max Kellermann
7dfe841876 output/fifo: rename Open(), Close() to OpenFifo(), CloseFifo() 2015-08-06 09:49:00 +02:00
xent
34db35c36d playlist/embcue: fix last track 2015-08-05 23:37:57 +02:00
Max Kellermann
3e9738dc66 decoder/mpcdec: read the bit rate
This was lost in commit 8ead8f7ea, because this was never implemented
for the new API.
2015-08-05 23:33:11 +02:00
Max Kellermann
2ecf57cdd9 decoder/mpcdec: use SampleTraits<SampleFormat::S24_P32> 2015-08-05 23:24:30 +02:00
Max Kellermann
c8b602038e decoder/mpcdec: use Clamp() 2015-08-05 23:24:30 +02:00
Max Kellermann
e384fa226e decoder/mpcdec: make buffer more local
Allow the compiler to invalidate buffer contents.
2015-08-05 23:10:39 +02:00
Max Kellermann
cbb595ba83 event/ServerSocket: use AllocatedSocketAddress to build local socket address 2015-07-22 11:05:48 +02:00
Max Kellermann
fdeec0307e event/ServerSocket: use AllocatedSocketAddress for OneServerSocket::address
Manages memory automatically.
2015-07-22 11:05:08 +02:00
Max Kellermann
f084bbbf35 net/AllocatedSocketAddress: new sockaddr wrapper class 2015-07-22 10:56:35 +02:00
Max Kellermann
20d69b957f Net/StaticSocketAddress: add equality operator with SocketAddress 2015-07-22 10:56:32 +02:00
Max Kellermann
7de0a621e3 net/StaticSocketAddress: replace cast operator with GetAddress()
The implicit cast operator can be very dangerous.
2015-07-22 10:55:57 +02:00
Max Kellermann
3441ea9844 net/ToString: relicense to BSD-2 2015-07-22 10:26:18 +02:00
Max Kellermann
83752e9349 net/ToString: rename sockaddr_to_string() to ToString() 2015-07-22 10:26:18 +02:00
Max Kellermann
8fdfe85b5f net/ToString: move V4 mapping code to functions 2015-07-22 10:26:18 +02:00
Max Kellermann
d4d9a85ad8 net/ToString: make variables more local 2015-07-22 10:26:18 +02:00
Max Kellermann
6f22452b54 net/Resolver: move sockaddr_to_string() to ToString.cxx 2015-07-22 10:03:36 +02:00
Max Kellermann
a4a37d7a19 net/StaticSocketAddress: remove unused method SetLocal() 2015-07-21 14:42:46 +02:00
Max Kellermann
d1b1a8e490 net/StaticSocketAddress: include cleanup 2015-07-21 13:56:21 +02:00
Max Kellermann
104fe124df net/StaticSocketAddress: disable SetLocal() on Android
Fixes build failure because Bionic doesn't provide SUN_LEN().
2015-07-21 12:08:25 +02:00
Max Kellermann
5bdbd74d59 net: add header Features.hxx
For improved portability of the net library to projects without
autoconf.
2015-07-21 11:57:53 +02:00
Max Kellermann
e621c24270 net/StaticSocketAddress: include config.h 2015-07-21 11:57:53 +02:00
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