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