Max Kellermann
7d98145ea8
net/AddressInfo: include Features.hxx instead of config.h
2019-08-26 20:26:40 +02:00
Max Kellermann
e7c5a59e39
util/Exception: support "const char *"
2019-08-26 20:24:22 +02:00
Max Kellermann
c9081a206a
client/New: fix assertion failure in Close()
...
Caused by a revert accident in commit
f2cdbeace6
Closes https://github.com/MusicPlayerDaemon/MPD/issues/631
2019-08-22 14:43:53 +02:00
Max Kellermann
f2cdbeace6
Revert "Client: eliminate SetExpired(), call Close() directly"
...
This reverts commit 58d7804d66
. It
caused a use-after-free bug when Client::OnSocketError() was called
due to a failed write, e.g. if the output buffer was full.
2019-08-22 09:52:19 +02:00
Max Kellermann
e6600b8562
release v0.21.14
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl1dBToQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEhlID/4gcrbaegKpTkftGPLBGlSUc4W0qwSHbdiJ
SuzK7sraSGUlLHHiBfqvFfE8tyEaLfsJarqiOdGgfiaW5QyapdwuU5s76nAN6jjY
onEo2QK6vSbv4J/B1+Jv+NGCgVM3ZkPy91GhfTz8MEtJMaBmztFhnpxK60r9jYPG
5EBsnVa6HhI7gniQAtOwE8SXYnn92Q4j72S8OuAbJ7Vwh0oqdIyXECqzcAE97Fk2
TNX/YSLST3I7Chv2OBDb3vOegh9nFUyr0qeSYdi8vk2BBYcgX2xYOOBQCC3ta/nr
NNeuSJOLgcF1XrFqVRRhDKZ8Y2inD6qVAXOH5WtChT1n3uXqYW7vdq0fW+/w3W/E
vouzgt5KvU5Me4Mk2M2dMjEWW+7Y8EUjvrwDnbDIkyP+Yi+BLTmTnyBgAW3cvRO9
UoCcWTBOEgyX2wAFl3r+NMPEneuMLbMCZUMju4/zveiRJdFExA0LC8wk0/iWqQbW
+WD8y6RTo7Z1jsP1vnBimgAkzkLAOuMlKLYNI15ETrxwKWgOjN6a7Q61GVdsaiqG
fKQeO0kZWWFcJ7HECgp3tpwWEi1+7/uqt0TwQgOKDdZHYL0Wb6Ur09KJS4b+eKIl
UzYwCrPgUx1pcYR+rTbMxCNpWn2kA+vp2UaPBN60c/J98d+6C/2nKtIvXfr5MrUA
CEb1epw/ew==
=mEFF
-----END PGP SIGNATURE-----
Merge tag 'v0.21.14'
release v0.21.14
2019-08-21 10:52:49 +02:00
Max Kellermann
b968e1b6de
output/Thread: add missing return
in exception handler
2019-08-21 10:20:17 +02:00
Max Kellermann
6c9f9c136b
command/all: don't create new Response instance in exception handler
...
The new Response instance in the `catch` block didn't have the
`command` attribute set, so the error response didn't indicate which
command had failed, which however is required in the MPD protocol.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/628
2019-08-20 20:31:36 +02:00
Max Kellermann
9bff5f9e36
client/Process, command/all: add noexcept
...
Clarify that those can't throw, preparing for the next commit.
2019-08-20 20:28:15 +02:00
Max Kellermann
2bf26a2ff8
command/all: remove obsolete prototype
2019-08-20 20:28:10 +02:00
Max Kellermann
e33b50d9c5
command/all: simplify return
from command_process()
2019-08-20 20:26:07 +02:00
Max Kellermann
21fa44c0d5
command/all: catch all exceptions
2019-08-20 20:23:54 +02:00
Max Kellermann
44444e1b89
decoder/Thread: on late SEEK, start decoder at seek position
...
Previously, a bogus value (whatever happened to be still in
`start_time`) was used.
2019-08-20 20:15:08 +02:00
Max Kellermann
ca450663d0
decoder/Control: work around crash after SEEK was too late
...
See code comment.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/629
2019-08-20 20:01:53 +02:00
Max Kellermann
04e2d08417
decoder/Control: inline WaitForDecoder()
2019-08-20 19:33:15 +02:00
Max Kellermann
af4ffa91fd
decoder/Control: remove attribute client_is_waiting
...
This optimization is useless because sane pthread_cond_signal()
implementations check the number of waiters and do not invoke a system
call if there are none.
2019-08-20 19:23:44 +02:00
Max Kellermann
f3ed2c0a82
time/ISO8601: support omitting seconds
2019-08-19 22:44:41 +02:00
Max Kellermann
2c35ea92bd
time/ISO8601: support time zone offset
2019-08-19 22:44:28 +02:00
Max Kellermann
26e0e1d25a
time/ISO8601: allow omitting the "Z" suffix
...
And allow "Z" suffix after date.
2019-08-19 22:42:39 +02:00
Max Kellermann
6412efb6e4
time/ISO8601: allow omitting the time of day
2019-08-19 22:42:06 +02:00
Max Kellermann
1a08bdf16f
time/ISO8601: ParseISO8601() returns precision
2019-08-19 22:41:49 +02:00
Max Kellermann
48b122f2ed
time/ISO8601: implement with strptime(), without ParseTimePoint()
...
Prepare for adding more flexible parsing.
2019-08-19 22:26:43 +02:00
Max Kellermann
06dac4783f
time/Convert: fallback TimeGm() implementation
...
Move code from Parser.cxx.
2019-08-19 22:22:07 +02:00
Max Kellermann
fdaadc19cb
time/Parser: use TimeGm()
2019-08-19 22:21:22 +02:00
Max Kellermann
2e53e9248a
time/Parser: explicitly initialize struct tm before strptime()
...
This is recommended by the strptime() manpage, because strptime() does
not initialize/set attributes which were not specified in the format
string.
2019-08-19 22:09:38 +02:00
Max Kellermann
b7abd5691c
lib/curl/Global: use auto
2019-08-19 22:00:25 +02:00
Max Kellermann
7a0957d713
lib/curl/Global: document ToRequest()
2019-08-19 22:00:06 +02:00
Max Kellermann
2934fc2507
lib/curl/Global: remove CURL* parameter from Add() and Remove()
2019-08-19 21:53:19 +02:00
Max Kellermann
0c8ff56a15
lib/curl/Easy: add constructor with URL parameter
2019-08-19 21:48:07 +02:00
Max Kellermann
07be44a50a
lib/curl/Easy: add getter functions
2019-08-19 21:47:11 +02:00
Max Kellermann
7a473729af
lib/curl/Easy: add method Unpause()
2019-08-19 21:46:21 +02:00
Max Kellermann
402f429b17
lib/curl/Easy: add setter functions
2019-08-19 21:38:55 +02:00
Max Kellermann
4c46ca6b59
lib/curl/Global: make ReadInfo() private
2019-08-19 21:38:09 +02:00
Max Kellermann
76a0bf68c7
lib/curl/Global: remove redundant API docs
2019-08-19 21:38:03 +02:00
Max Kellermann
9f02beaba9
lib/curl: fix coding style
2019-08-19 21:37:47 +02:00
Max Kellermann
a478af6759
util/PrintException, ...: update copyright
2019-08-19 19:11:59 +02:00
Max Kellermann
4c2434788f
system/FileDescriptor: add method IsRegularFile()
2019-08-19 19:11:53 +02:00
Max Kellermann
ca9daf5e19
playlist/flac: set song URI to an empty string
...
Simplify the plugin by using a trivial relative URI; later,
playlist_check_translate_song() will set the correct full URI.
2019-08-16 14:55:12 +02:00
Max Kellermann
e98ce710b8
util/WStringAPI: add wcsncmp() wrapper
2019-08-16 14:48:54 +02:00
Max Kellermann
79d1004544
util/StringView: add method Compare()
2019-08-16 13:32:00 +02:00
Max Kellermann
bb7f7bd3e5
util/StringAPI: add strncmp() wrapper
2019-08-16 13:31:58 +02:00
Max Kellermann
ad2b858933
util/ForeignFifoBuffer: add friend function swap()
2019-08-16 13:27:22 +02:00
Max Kellermann
d7aa4fa7d3
util/ForeignFifoBuffer: make Swap() lower case
2019-08-16 13:27:22 +02:00
Max Kellermann
57c5603122
util/ForeignFifoBuffer: import std::swap()
2019-08-16 13:27:22 +02:00
Max Kellermann
1550113506
util/DynamicFifoBuffer: add nullptr constructor overload
2019-08-16 13:21:28 +02:00
Max Kellermann
a82d61a5e4
util/DynamicFifoBuffer: add API documentation
2019-08-16 13:21:11 +02:00
Max Kellermann
0c4a7c8004
util/AllocatedString: update copyright
2019-08-16 13:20:23 +02:00
Max Kellermann
674ee9d19a
util/Exception: forward the exception in ThrowException()
...
Fixes -Wreturn-std-move (clang 8).
2019-08-16 13:19:34 +02:00
Max Kellermann
3344953db8
util/*FifoBuffer: use using
instead of typedef
2019-08-16 13:16:45 +02:00
Max Kellermann
f909615b14
include cleanups (powered by iwyu)
2019-08-15 17:57:20 +02:00
Max Kellermann
92c89f0c86
playlist/flac: allow reading from FLAC streams
2019-08-15 11:13:39 +02:00
Max Kellermann
34246eb7fd
playlist/flac: read the file only once using FLAC__Metadata_Chain
2019-08-15 10:40:48 +02:00
Max Kellermann
5894514ccb
playlist/flac: move code to ToSongEnumerator()
2019-08-15 10:40:37 +02:00
Max Kellermann
dcb07e6ed4
playlist/flac: use class MemorySongEnumerator
2019-08-15 09:45:03 +02:00
Max Kellermann
ccffff9870
playlist/flac: use the NarrowPath for FLAC__metadata_get_streaminfo()
2019-08-15 09:44:20 +02:00
Max Kellermann
e34672c9d8
lib/xiph/FlacMetadataIterator: add noexcept
2019-08-14 20:14:26 +02:00
Max Kellermann
a8f314190f
playlist/flac: add noexcept
2019-08-14 20:08:55 +02:00
Max Kellermann
545af857ba
lib/xiph/{FlacStreamMetadata,VorbisComments}: merge redundant code
2019-08-14 19:57:12 +02:00
Max Kellermann
01f86e1c25
lib/xiph/FlacStreamMetadata: pass StringView to flac_scan_comment()
2019-08-14 19:54:19 +02:00
Max Kellermann
7a89b1656c
lib/xiph/FlacStreamMetadata: properly convert entries to StringView
2019-08-14 19:44:14 +02:00
Max Kellermann
07fcf091a2
tag/MixRamp: pass StringView to ParseMixRampVorbis()
2019-08-14 19:42:48 +02:00
Max Kellermann
74a883dbf8
tag/MixRamp: add noexcept
2019-08-14 19:42:28 +02:00
Max Kellermann
5c550e8b33
lib/crypto/MD5: add option to use libavutil instead of libgcrypt
2019-08-14 18:56:10 +02:00
Max Kellermann
433e18b247
decoder/{opus,vorbis}: support embedded pictures (METADATA_BLOCK_PICTURE)
...
More for https://github.com/MusicPlayerDaemon/MPD/issues/42
2019-08-14 12:39:03 +02:00
Max Kellermann
2b837277c1
lib/crypto: add base64 wrapper using libavutil
2019-08-14 12:39:03 +02:00
Max Kellermann
d515a8e99a
lib/gcrypt/MD5: add wrapper in lib/crypto/
...
Prepare for using other crypto libraries, e.g. FFmpeg's libavutil.
2019-08-14 12:39:03 +02:00
Max Kellermann
2c2efaa91f
lib/xiph/VorbisComments: pass struct vorbis_comment instead of char**
...
Use the "comments" attribute instead of relying on the nullptr
terminator.
2019-08-14 12:28:52 +02:00
Max Kellermann
9ae9b2c18f
tag/VorbisComment: use struct StringView
2019-08-14 12:22:52 +02:00
Max Kellermann
8e0d810968
tag/MixRamp: use StringView in ParseMixRampTagTemplate()
2019-08-14 12:18:49 +02:00
Max Kellermann
0f1e13d9ff
util/StringView: add StartsWithIgnoreCase(), EndsWithIgnoreCase()
2019-08-14 11:36:21 +02:00
Max Kellermann
21b81dfb1d
lib/gcrypt/Hash: use the "algo" parameter instead of hard-coding MD5
2019-08-13 20:02:08 +02:00
Max Kellermann
f3d16f6d1b
output/Thread: fix typo in comment
2019-08-13 13:08:40 +02:00
Max Kellermann
6b51429203
decoder/opus: move comment size check to ScanOneOpusTag()
...
Prepare for parsing large binary comments (such as
METADATA_BLOCK_PICTURE).
2019-08-13 12:19:31 +02:00
Max Kellermann
e2da13b0d3
command/file: add command "readpicture"
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/42
2019-08-13 11:55:51 +02:00
Max Kellermann
54daa85ac2
decoder/flac: support embedded pictures (FLAC__METADATA_TYPE_PICTURE)
2019-08-13 11:55:51 +02:00
Max Kellermann
575ba51931
tag/Id3Scan: support embedded pictures (the "APIC" tag)
2019-08-12 20:31:43 +02:00
Max Kellermann
96a1c69c29
tag/Handler: add virtual method OnPicture()
...
Preparing for https://github.com/MusicPlayerDaemon/MPD/issues/42
2019-08-12 20:31:43 +02:00
Max Kellermann
3895d35a52
command/file: move code to TagScanAny()
2019-08-12 20:31:43 +02:00
Max Kellermann
4f61cd0b93
client/Response: add constant MAX_BINARY_SIZE
...
Use the same chunk size for all binary commands.
2019-08-12 20:23:46 +02:00
Max Kellermann
989790e7f1
client/Response: add method WriteBinary()
...
Move code from read_stream_art().
2019-08-12 14:17:35 +02:00
Max Kellermann
831bc711ca
decoder/mad: remove option "gapless", always do gapless
...
Why would anybody want to keep the silence inserted by the codec?
Other plugins/codecs (such as Vorbis) have this hard-coded as well.
2019-08-12 13:05:57 +02:00
Max Kellermann
828c614d57
decoder/sidplay: use StringFormat<>()
2019-08-10 12:31:31 +02:00
Max Kellermann
4964ad7800
decoder/sidplay: sidplay_load_songlength_db() throws on error
2019-08-10 12:28:53 +02:00
Max Kellermann
a7976cd0f2
decoder/sidplay: automatic memory management inside struct SidplayGlobal
2019-08-10 12:26:10 +02:00
Max Kellermann
bed8a0e040
decoder/sidplay: move global variables to struct SidplayGlobal
2019-08-10 12:16:09 +02:00
Max Kellermann
b8a64771c0
decoder/sidplay: add noexcept
2019-08-10 12:12:52 +02:00
Max Kellermann
f357f743a3
pcm/Volume: use transform_n()
2019-08-10 12:05:37 +02:00
Max Kellermann
91e565d92e
pcm/PcmFormat: use transform_n()
2019-08-10 12:05:35 +02:00
Max Kellermann
a189a9e478
util/TransformN: new library
2019-08-10 11:59:47 +02:00
Fredrik Noring
9654a33218
decoder/sidplay: Fix empty album names by using the SID name field
...
SID files are generally collections of tunes, so a SID name field makes
sense as an MPD album. The SID tune information list (STIL) has name
and title fields for individual tunes, when such are known, but MPD is
currently not using the STIL.
2019-08-10 11:01:15 +02:00
Max Kellermann
9bcd02d178
Merge branch 'v0.21.x'
2019-08-10 10:58:32 +02:00
Fredrik Noring
2d61e526de
decoder/sidplay: Fix date field to have year but not company or author
...
Field 2 is called <released>, formerly used as <copyright>[1][2]. It is
formatted <year><space><company or author or group>, where <year> may be
<YYYY>, <YYY?>, <YY??> or <YYYY-YY>, for example "1987", "199?", "19??"
or "1985-87". The <company or author or group> may be for example Rob
Hubbard. A full field may be for example "1987 Rob Hubbard".
This change splits the <released> field at the first <space>, to retain
the <year> part.
The 51823 SID files in High Voltage SID Collection (HVSC) version 71
have the following distribution of dates:
333 19?? 11 1990-92 6 1995-99 2 2006-08
827 198? 88 1990-93 2140 1996 530 2007
32 1982 69 1990-94 9 1996-97 15 2007-08
1 1982-83 49 1990-95 2 1996-98 2 2007-09
255 1983 3467 1991 5 1996-99 1 2007-10
677 1984 75 1991-92 1840 1997 430 2008
775 1985 65 1991-93 4 1997-98 23 2008-09
3 1985-86 10 1991-94 1276 1998 1 2008-12
10 1985-87 35 1991-97 4 1998-99 631 2009
943 1986 3320 1992 865 1999 1 2009-10
12 1986-87 26 1992-93 24 200? 645 2010
5 1986-89 59 1992-94 590 2000 1 2010-12
2083 1987 1 1992-96 4 2000-01 538 2011
31 1987-88 2996 1993 727 2001 1 2011-12
44 1987-89 42 1993-94 875 2002 651 2012
2510 1988 12 1993-95 2 2002-04 811 2013
129 1988-89 2 1993-97 844 2003 790 2014
91 1988-90 2737 1994 3 2003-05 740 2015
58 1988-91 16 1994-95 842 2004 792 2016
3466 1989 20 1994-96 2 2004-05 775 2017
95 1989-90 17 1994-97 707 2005 638 2018
150 1989-91 2271 1995 1 2005-06 284 2019
1077 199? 2 1995-96 2 2005-07
2834 1990 4 1995-97 785 2006
119 1990-91 2 1995-98 6 2006-07
References:
[1] https://www.hvsc.c64.org/download/C64Music/DOCUMENTS/SID_file_format.txt
[2] https://hvsc.c64.org/info
2019-08-10 10:50:51 +02:00
Fredrik Noring
7723c481db
decoder/sidplay: Fix windows-1252 to utf-8 string conversion
...
High Voltage SID Collection (HVSC) metadata fields are encoded in
windows-1252, as described in DOCUMENTS/SID_file_format.txt:
https://www.hvsc.c64.org/download/C64Music/DOCUMENTS/SID_file_format.txt
If utf-8 transcoding fails, or the ICU library is unavailable, fall
back to plain ASCII and replace other characters with '?'.
2019-08-10 10:45:02 +02:00
Max Kellermann
cf9ee33928
input/icy: support "charset" parameter in URI fragment
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/616
2019-08-10 10:07:13 +02:00
Max Kellermann
4a47bbd816
IcyMetadataParser: implement charset conversion
2019-08-10 10:07:13 +02:00
Max Kellermann
7654038d65
util/UriQueryParser: new library
2019-08-09 20:39:34 +02:00
Max Kellermann
e4612ecb66
util/UriExtract: add uri_get_fragment()
2019-08-09 20:39:23 +02:00
Max Kellermann
9c6850210d
util/UriExtract: uri_get_scheme() returns StringView
...
Reduce overhead by not duplicating the string.
2019-08-09 20:21:37 +02:00
Max Kellermann
40a2880857
util/UriUtil: split
2019-08-09 20:21:12 +02:00
Max Kellermann
ade712d711
util/UriUtil: relicense as BSD-2
2019-08-09 20:16:02 +02:00
Fredrik Noring
0ed10542cc
decoder/sidplay: Fix song length initialisation during container scan
...
The song length was previously undetermined.
2019-08-09 15:39:36 +02:00