Max Kellermann
0126276e2f
FileCommands: log irregular errors while looking for cover art
2019-01-21 22:21:11 +01:00
Max Kellermann
58d6ddab9e
FileCommands: catch all exceptions
2019-01-21 22:19:32 +01:00
Max Kellermann
05db6934eb
FileCommands: fix deadlock in "albumart" command
...
Must lock the mutex before calling any of the unprotected InputStream methods.
Closes #462
2019-01-21 22:16:46 +01:00
Max Kellermann
02c68c5cdb
net/HostParser: add noexcept
2019-01-21 21:20:43 +01:00
Max Kellermann
b02fee7309
util/PrintException: support "const char *"
2019-01-21 21:19:35 +01:00
Max Kellermann
424f75c9e1
util/OffsetPointer: remove redundant inline
keywords from constexpr
functions
2019-01-21 21:19:09 +01:00
Max Kellermann
f6e1176f97
util/CharUtil: remove redundant inline
keywords from constexpr
functions
2019-01-21 21:18:23 +01:00
Max Kellermann
e4700c0a27
util/Cast: remove redundant inline
keywords from constexpr
functions
2019-01-21 21:17:58 +01:00
Max Kellermann
cf23fd8774
fs/io/FileOutputStream: add constructor with directory fd
2019-01-21 21:10:02 +01:00
Max Kellermann
dee8872395
fs/io/FileOutputStream: move code to Open()
2019-01-21 21:09:34 +01:00
Max Kellermann
4ba9357a9c
input/CdioParanoia: C++ wrappers for libcdio types
2019-01-21 20:20:20 +01:00
Max Kellermann
754f4048a8
output/shout: evaluate tls
option only if TLS is enabled in libshout
...
Fixes build failure after commit
0cea67ee70
2019-01-21 14:36:43 +01:00
Max Kellermann
037bb07d08
db/VHelper: include DetachedSong.hxx to fix GCC 9 build failure
...
GCC 9's libstdc++ is unable to use forward-declared types as
std::vector item because the compiler wants to resolve `noexcept()` on
the item destructor.
2019-01-21 14:34:12 +01:00
Max Kellermann
87635c5268
input/CdioParanoia: use the new function names
2019-01-21 14:18:55 +01:00
Max Kellermann
528b4338f4
input/CdioParanoia: use cdio_cddap_free_messages() on recent library versions
2019-01-21 14:16:51 +01:00
Max Kellermann
c780b8bba9
input/CdioParanoia: remove useless cdda_messages() call
2019-01-21 12:36:59 +01:00
Max Kellermann
ca34f3250b
input/CdioParanoia: detect libcdio version at compile time
...
libcdio_paranoia was split from libcdio in version 90, and at the same
time, the header was moved from cdio/paranoia.h to
cdio/paranoia/paranoia.h. We can easily detect this version at
compile time which is faster than configure time.
2019-01-21 12:14:13 +01:00
Max Kellermann
008383f24a
python/build/libs.py: upgrade CURL to 7.63.0
2019-01-21 10:11:50 +01:00
Jörg Krause
4f7d52dbf2
meson: add fixed-point Vorbis (Tremor) decoder support
...
Re-add build support for the fixed-point Vorbis (Tremor) decoder, which
was dropped when switching from Autotools to Meson.
Note, that it is not possible to build both, the Vorbis and the Tremor
decoder.
Closes : #405
2019-01-21 08:35:17 +01:00
Max Kellermann
c7848da8f2
input/CdioParanoia: add const
to pointer
2019-01-20 22:03:49 +01:00
Max Kellermann
10a6c5c57d
input/CdioParanoia: make variables more local
2019-01-20 21:59:57 +01:00
Max Kellermann
701fd1d939
net/IPv4Address: fix comment typo
2019-01-20 21:05:12 +01:00
Max Kellermann
d1bdea8edb
Merge branch 'shout_tls' of git://github.com/JakobOvrum/MPD
2019-01-20 21:03:42 +01:00
Jakob Ovrum
0cea67ee70
shout output plugin: add support for TLS
2019-01-19 17:36:14 +01:00
Thomas Klausner
3a0480a482
Add missing include of stdlib.h.
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/456
2019-01-15 16:52:40 +01:00
Max Kellermann
1fa99da3c2
net/IPv[46]Address: make the initializers even more portable
...
Similar to 5a5229b499
: use more C++14
constexpr.
2019-01-14 19:21:07 +01:00
James D. Smith
22d669da18
Add APE mapping for album artist.
...
"De-facto" field mappings are available at http://wiki.hydrogenaud.io/index.php?title=Tag_Mapping .
2019-01-14 19:15:42 +01:00
Thomas Zander
772681f23d
Fix link_args for mDNSResponder on non-darwin platforms
2019-01-13 14:09:14 +01:00
Max Kellermann
7ec887eea2
Merge branch 'add-meson-dependencies' of git://github.com/jacobvosmaer/MPD
2019-01-04 19:06:49 +01:00
Max Kellermann
1477b64d4f
Merge branch 'patch-2' of git://github.com/HyShai/MPD
...
Closes #343
2019-01-04 19:04:52 +01:00
Zoltán Mizsei
f546e76490
Build fix. This struct is the same on Haiku and on Linux, still gcc
...
fails on it. This fixes.
2019-01-04 19:01:27 +01:00
Max Kellermann
7104ac963b
util/AllocatedArray: import std::swap
2018-12-28 17:18:41 +01:00
Max Kellermann
2cb36590b2
util/AllocatedArray: add noexcept
2018-12-28 17:17:28 +01:00
Max Kellermann
af7b928d7c
output/httpd/Page: remove obsolete API documentation
2018-12-28 17:16:12 +01:00
Max Kellermann
c0d8a9b07a
output/httpd/Page: add noexcept
2018-12-28 17:15:28 +01:00
Max Kellermann
5b0d23d553
output/httpd/IcyMetaDataServer: add noexcept
2018-12-28 17:14:27 +01:00
Max Kellermann
ab30695bd1
output/httpd: add noexcept
2018-12-28 17:06:01 +01:00
Max Kellermann
53a4de35c4
util/DynamicFifoBuffer: add noexcept
2018-12-28 17:06:01 +01:00
Max Kellermann
22e6d95c4b
remove libwrap support
...
libwrap is an obscure artefact from a past long ago, when source IP
address meant something.
And its API is "interesting"; it requires the application to expose
two global variables `allow_severity` and `deny_severity`. This led
to bug #437 . I don't want to declare those variables; instead, I'd
like to remove libwrap support.
Closes #437
2018-12-28 14:16:02 +01:00
Max Kellermann
1c7bd7d5c4
db/update/InotifyQueue: check for ACK_ERROR_UPDATE_ALREADY
...
Since commit cc64c715a2
, UpdateService::Enqueue() throws
ProtocolError(ACK_ERROR_UPDATE_ALREADY) instead of returning 0.
2018-12-28 14:02:41 +01:00
Max Kellermann
3c4ed9cbe3
db/update/InotifyQueue: catch UpdateService::Enqueue() exceptions
2018-12-28 14:00:58 +01:00
Max Kellermann
2677b90244
db/update/InotifyQueue: add noexcept
2018-12-28 14:00:55 +01:00
Max Kellermann
1b20fa441d
db/update/InotifyQueue: update code comment
2018-12-28 14:00:10 +01:00
HyShai
18c042d4cf
remove non-block call
...
This is similar to b177bffa6a
, in that it fixes the Windows issue of connecting to the open socket. Also, the listen_socket is set to AcceptNonBlock after the connection anyways.
2018-12-18 15:23:40 -05:00
HyShai
76268773b5
change HTTP Version to a valid version
2018-12-14 01:51:54 -05:00
Jacob Vosmaer
87542e3080
Add missing pcre_dep in src/song/meson.build
2018-12-09 17:21:38 +01:00
Jacob Vosmaer
66f5b0fed7
Add boost_dep in subdir meson.build files
2018-12-09 17:20:47 +01:00
Max Kellermann
5cb603983e
alsa/NonBlock: throw on snd_pcm_poll_descriptors_revents() error
...
This function is sparsely documented and a look at the bluez-alsa
source code shows that implementations make undocumented assumptions
on the `struct pollfd` array parameter which can lead to strange
effects.
2018-12-04 18:00:52 +01:00
Max Kellermann
4b7078297d
db/upnp: use the generic ::CollectUniqueTags() function
...
This function implements the "group" feature on top of the
Database::Visit() method.
2018-11-19 20:08:10 +01:00
Max Kellermann
841694ccf2
db/Interface: document CollectUniqueTags()
2018-11-19 19:40:00 +01:00
Max Kellermann
12f4a8255a
Main: use DatabasePlugin::RequireStorage()
2018-11-19 19:39:37 +01:00
Max Kellermann
bda77ffc5b
db/Interface: remove IsPlugin(), use dynamic_cast
instead
2018-11-19 19:38:20 +01:00
Max Kellermann
ed9ece5ea3
db/Interface: make the constructor protected
2018-11-19 19:38:20 +01:00
Max Kellermann
ce49d99c2f
check.h: remove obsolete header
...
Since we switched from autotools to Meson in commit
94592c1406
, we don't need to include
`config.h` early to properly enable large file support. Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.
This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann
2e450bbf95
src/thread/meson.build: detect pthread_setname_np()
...
This compile-time check got lost during the Meson transition.
2018-11-19 16:33:14 +01:00
Max Kellermann
303b3071e4
db/UniqueTags: remove pure
attribute because function may throw
2018-11-19 11:32:53 +01:00
Max Kellermann
eb6d5f34fc
db/UniqueTags: include cleanup
2018-11-19 11:11:45 +01:00
Max Kellermann
4cdcaa8630
output/alsa: don't call snd_pcm_drain() if nothing was written
...
Works around a problem where MPD goes into a busy loop because
snd_pcm_drain() always returns `-EAGAIN` without making any progress
(fixes #425 ).
This problem was triggered by snd_pcm_drain() after snd_pcm_cancel()
and snd_pcm_prepare(), but without submitting any data with
snd_pcm_writei().
I believe this is a kernel bug: in non-blocking mode, the kernel's
snd_pcm_drain() function returns early. In this mode, it only checks
whether snd_pcm_drain_done() has been called already, but
snd_pcm_drain_done() is never called if no data was submitted.
In blocking mode, the following `for` loop detects this condition, so
snd_pcm_drain_done() is not necessary, but without this extra check,
we get `-EAGAIN` forever.
2018-11-16 12:49:37 +01:00
Max Kellermann
436ba3c96c
output/alsa: drain the whole ring_buffer
, not just one period
...
This fixes a problem which caused a failure with snd_pcm_writei()
because snd_pcm_drain() had already been called in the previous
iteration. This commit makes sure that snd_pcm_drain() is only called
after the final snd_pcm_writei() call.
This fixes discarded samples at the end of playback.
2018-11-14 13:35:17 +01:00
Max Kellermann
5d12f52873
output/alsa: clear error after reopening device
...
When a playback error has occurred, MPD would never recover until one
restarts MPD.
2018-11-14 13:20:54 +01:00
Max Kellermann
a8bf8ede01
event/Thread: reduce the RTIO timer slack to 10us
...
MPD's default is 100ms, which is too long for the real-time I/O
thread. The OutputThread has 100us, but the real-time I/O thread
might have tighter deadlines.
This change has currently no effect (I believe), because nobody uses
timers on the RTIO thread.
2018-11-14 12:11:57 +01:00
Max Kellermann
8682183bc3
LogInit: default to journal if MPD was started as systemd service
2018-11-14 12:07:22 +01:00
Max Kellermann
b477f86c92
output/alsa: don't lock the mutex in CancelInternal()
...
CancelInternal() doesn't need to be protected because it is called
synchronously from Cancel().
2018-11-14 11:50:51 +01:00
Max Kellermann
020371f145
output/alsa: wake up the client thread after generating silence
...
Fixes a theoretical race condition which could occur in Drain() (but
was extremely unlikely).
2018-11-14 11:48:55 +01:00
Max Kellermann
ccafe3f3cf
output/alsa: don't generate silence if ALSA-PCM buffer has enough data
...
If our `ring_buffer` is smaller than the ALSA-PCM buffer (if the
latter has more than the 4 periods we allocate), it can happen that
the start threshold is crossed and ALSA switches to
`SND_PCM_STATE_RUNNING`, but the `ring_buffer` is empty. In this
case, MPDD will generate silence, even though the ALSA-PCM buffer has
enough data. This causes stuttering (#420 ).
This commit amends an older workaround for a similar problem (commit
e08598e7e2
) by adding a snd_pcm_avail()
check, and only generate silence if there is less than one period of
data in the ALSA-PCM buffer.
Fixes #420
2018-11-14 11:17:59 +01:00
Max Kellermann
3830748de5
output/alsa: clear the period_buffer
in LockCaughtError()
...
The method Cancel() assumes that the `period_buffer` must be empty
when `active==false`, but that is not the case when Play() fails.
Of course the assertion in Cancel() is not 100% correct, but I decided
to rather fix this in LockCaughtError() because the `period_buffer`
should only be accessed from within the RTIO thread, and this is the
only code path where `active` can be set to `false` with a non-empty
`period_buffer`.
Fixes #423
2018-11-14 10:24:08 +01:00
Max Kellermann
1a43f5145d
output/alsa: throw on snd_pcm_writei() error while draining
...
This implements real error handling, and avoids calling
CancelInternal() from this code path.
2018-11-14 10:08:29 +01:00
Max Kellermann
7f143a83c1
output/alsa: fix wrong use of errno
...
alsa-lib doesn't set errno, it returns errors as negative integers.
2018-11-14 10:07:23 +01:00
Max Kellermann
6ccc254179
output/alsa: throw after snd_pcm_drain() error
2018-11-14 10:04:10 +01:00
Max Kellermann
7db2450447
output/alsa: refactor the drain EAGAIN workaround
2018-11-14 10:00:50 +01:00
Max Kellermann
6c2a6a65e0
output/alsa: remove snd_pcm_state() check from DrainInternal()
...
This check was added 9 years ago in commit
4dc25d3908
to work around a dmix bug
which I assume has been fixed long ago.
Removing this fixes another corner case: if draining is requested
before the start threshold is reached, the PCM is still in
SND_PCM_STATE_PREPARED but not yet SND_PCM_STATE_RUNNING, which means
the submitted data will never be played. This corner case is
realistic when playing songs shorter than the ALSA buffer (if the
buffer is very large).
2018-11-14 09:48:24 +01:00
Max Kellermann
4247a757b3
output/alsa: call snd_pcm_prepare() if draining is requested early
...
This fixes a corner case which has probably never occurred and
probably never will: if Cancel() is called, and then Play() followed
by Drain(), the plugin should really play that data. However
currently, this never happens, because snd_pcm_prepare() is never
called.
2018-11-14 09:43:14 +01:00
Max Kellermann
060908d5c4
song/Filter: add operator "contains"
...
Closes #410
2018-11-12 12:49:01 +01:00
Max Kellermann
228bf7eb09
output/thread: cancel the AudioOutputSource() instead of closing it
...
This fixes the assertion failure due to calling
AudioOutputSource::Close() twice.
2018-11-12 12:24:25 +01:00
Max Kellermann
5eaf2b8fc3
output/control: always close the AudioOutputSource
in RELEASE
...
Fixes a crash bug with `always_on` outputs which occurs because the
`AudioOutputSource` still has a pointer to an outdated `MusicChunk`.
Fixes #415
2018-11-12 12:21:59 +01:00
Max Kellermann
e097fef79e
output/control: add command RELEASE
...
With the new command, the decision to pause or close the output moves
into the output thread.
2018-11-12 12:09:37 +01:00
Max Kellermann
9a813cd3b1
output/Thread: update comment
2018-11-12 12:09:02 +01:00
Max Kellermann
1c60c8e014
output/Filtered: catch Drain() exceptions in CloseOutput()
2018-11-12 12:05:54 +01:00
Max Kellermann
eddda95900
output/interface: document that Drain() may throw
2018-11-12 12:04:42 +01:00
Max Kellermann
72184dccfc
song/StringFilter: support regular expressions with "=~" and "!~"
...
This feature requires `libpcre`.
2018-11-11 12:55:35 +01:00
Max Kellermann
fee75dc766
{output,mixer}/alsa: use snd_pcm_poll_descriptors_revents()
...
This call was missing, causing very high CPU usage when the ALSA
output plugin was used with dmix.
Closes #391
2018-11-11 12:37:29 +01:00
Max Kellermann
ba5c856f15
events/MultiSocketMonitor: add method ForEachResult()
2018-11-11 12:37:28 +01:00
Max Kellermann
12308a0f55
lib/alsa/NonBlock: move the functions into a class managing the state
2018-11-11 12:37:25 +01:00
Max Kellermann
a958abde2f
Merge branch 'fix_362' of git://github.com/miccoli/MPD
2018-11-11 12:37:13 +01:00
Max Kellermann
583208db7e
output/httpd: fix nullptr dereference crash bug
...
When `metadata_sent` is `false`, the plugin assumes there is metadata
which must be sent, even if no metadata page was passed to the plugin.
Initializing it to `true` avoids dereferencing this `nullptr`.
Fixes #412
2018-11-08 09:37:18 +01:00
Max Kellermann
7b5ba15170
song/Filter: move code to ParseStringFilter()
2018-11-08 00:02:10 +01:00
Max Kellermann
d5e0d49f86
song/{Tag,Uri}SongFilter: pass StringFilter&&
to constructor
2018-11-07 23:57:42 +01:00
Max Kellermann
73b22d82aa
song/StringFilter: move negated
flag from containing class
2018-11-07 23:47:31 +01:00
Max Kellermann
db51cc4e02
lib/zlib/meson.build: add zlib_dep to declare_dependency
...
Fixes potential compiler error when zlib is installed in a
non-standard directory.
2018-11-07 23:32:23 +01:00
Max Kellermann
ad597a8ff0
lib/zlib/meson.build: define ENABLE_ZLIB
...
Fixes #414
2018-11-07 23:24:58 +01:00
Max Kellermann
b1fe105904
output/Source: reset current_chunk in Open()
...
If the output is already open, the `current_chunk` pointer may be
bogus and out of sync with `SharedPipeConsumer::chunk`, leading to an
assertion failure in `SharedPipeConsumer::Consume()`.
Fixes #411
2018-11-07 00:17:48 +01:00
Max Kellermann
451b142e3a
player/Thread: finish decoder startup before checking the buffer
...
This fixes a valgrind warning because `buffer_before_play`
initialization needs to know the audio format from the decoder.
2018-11-06 23:52:26 +01:00
Max Kellermann
98985c03b0
check.h: remove obsolete ENABLE_LARGEFILE check
...
Meson always enables large file support on the compiler command line,
thus config.h doesn't need to be included anymore. We'll remove the
whole `check.h` header soon.
Closes #409
2018-11-05 21:25:59 +01:00
Max Kellermann
793fd8c479
decoder/ffmpeg: eliminate GetSampleFormat()
2018-11-04 22:36:17 +01:00
Max Kellermann
6c602811df
decoder/ffmepg: fill AudioFormat from AVCodecContext, not AVCodecParameters
...
`AVCodecParameters` contains values from the codec detected by
avformat_find_stream_info(), but after avcodec_open2(), a different
codec might be selected with a different `AVSampleFormat`. This leads
to misinterpretation of data returned from FFmpeg, leading to random
noise or silence.
This was observed with FFmpeg 4.0.2 and a TS container file containing
MP2. A mp3-float codec was detected returning `AV_SAMPLE_FMT_FLTP`,
but finally the `mpegaudiodec_fixed.c` was used, returning
`AV_SAMPLE_FMT_S16`.
By using the audio format from `AVCodecContext`, we ensure that MPD
and FFmpeg always agree on the actual audio format in the buffer.
This removes the FFmpeg bug workaround from commit e1b032cbad
which I
assume is obsolete after 7 years.
Fixes #380
2018-11-04 22:30:50 +01:00
Stefano Miccoli
6d48a5684a
clamp 'set_normalized_volume' to valid values also for ALSA softvol
...
ensure that valid mixer values are set also when the ALSA driver
does not report a valid dB range ('set_raw' fallback)
correct a bug in which volume is assumed to lie in [0..100]
instead of [0..1]
2018-11-04 22:21:56 +01:00
Max Kellermann
bd115a4008
decoder/ffmpeg: use AtScopeExit() to call av_packet_unref()
2018-11-04 22:01:33 +01:00
Max Kellermann
08272cdee2
decoder/ffmpeg: require FFmpeg 3.1 or later
...
Drop some compatibility code.
2018-11-04 21:55:06 +01:00
Max Kellermann
ac0852b4e3
song/Filter: operator "==" never searches substrings in filter expressions
...
The protocol documentation says that the difference between `find` and
`search` is that `search` is case insensitive, but that's only half
the truth: `search` also searches for sub strings instead of matching
the whole string. This part is undocumented and unfortunate, but at
this point, we can't change it.
However leaking this surprising behavior to the new filter expressions
was a bad idea; the "==" operator should never match substrings. For
people who need that, we should add a new operator.
2018-11-04 13:57:34 +01:00
Max Kellermann
6fe43ed969
song/StringFilter: add flag substring
...
Prepare to stop using substrings for filter expressions.
2018-11-04 13:49:47 +01:00
Max Kellermann
b34bc06624
song/StringFilter: use std::string::operator==
2018-11-04 13:49:38 +01:00
Max Kellermann
86f1074905
lib/xiph/meson.build: the Vorbis encoder requires the Vorbis decoder
...
Without the Vorbis decoder, `libvorbis` is never detected, leading to
linker failures when attempting to build the Vorbis encoder.
2018-11-04 12:21:23 +01:00
Max Kellermann
6f242836e6
lib/xiph/meson.build: fix typo, replace and
with or
...
Fixes linker failure when building without FLAC support.
Closes #400
2018-11-04 11:36:28 +01:00
Max Kellermann
f2c926f3b6
zeroconf/glue: add fallback value for HOST_NAME_MAX
...
`HOST_NAME_MAX` is not a portable macro; it is undefined on some
systems.
Closes #402
2018-11-04 11:12:03 +01:00
Max Kellermann
528f5b9cb9
song/Filter: allow escaping quotes in filter expressions
...
Closes #397
2018-11-02 19:15:08 +01:00
Max Kellermann
5a5229b499
net/IPv[46]Address: make the initializers more portable
...
Thanks to C++14, we can declare and fill variables inside `constexpr`
functions. This means me can stop make assumptions on the `struct`
layouts without losing `constexpr`.
Closes #393
2018-11-02 17:47:43 +01:00
Max Kellermann
bba22c9c8c
system/FileDescriptor: check __linux__
instead of __linux
...
`__linux` is the deprecated non-standard macros which appears to be
not present at all on PowerPC.
Closes #398
2018-11-02 16:50:38 +01:00
Max Kellermann
2a926063b2
src/lib/ffmpeg/meson.build: copy dependencies into ffmpeg_dep
...
Apparently, Meson propagates the linker flags but not the compiler
flags from a `static_library`'s dependencies list.
Closes #392
2018-11-01 19:14:00 +01:00
Max Kellermann
657ef48518
zeroconf/glue: use strstr() and std::string::replace() instead of std::regex_replace()
...
std::regex_replace() is heavily bloated and overkill for this feature.
2018-10-31 19:26:37 +01:00
Max Kellermann
8a492c8f39
Merge branch 'bug516974' of git://github.com/fschlich/MPD
2018-10-31 19:20:41 +01:00
Max Kellermann
901a48c9a4
command/sticker: return ACK_ERROR_NO_EXIST for "no such sticker"
...
Closes #389
2018-10-31 19:19:07 +01:00
Max Kellermann
f5c9071494
*: copyright year 2018
2018-10-31 17:54:59 +01:00
Florian Schlichting
d1f85240a2
include hostname in zeroconf_name ( fixes #387 )
...
expand %h to the system hostname and default to a zeroconf string that
contains %h
2018-10-31 17:54:45 +01:00
Max Kellermann
2148d4bb31
fs/io/FileOutputStream: fix -Wcomment
2018-10-31 17:18:44 +01:00
Max Kellermann
e79d06d595
fs/io/FileOutputStream: don't use O_TMPFILE on Android
...
Fixes writing to Context.getCacheDir().
2018-10-31 17:12:21 +01:00
Max Kellermann
c60cf944f5
fs/io/FileOutputStream: add macro HAVE_O_TMPFILE
2018-10-31 17:10:52 +01:00
Max Kellermann
06ca08ce55
output/roar: remove
...
Bugs in libroar which broke the MPD build have been annoying me for
quite some time, and the newest bug has now hit my main build machine:
https://github.com/MusicPlayerDaemon/MPD/issues/377
Problem is the usage of the typedef `_IO_off64_t` in libroar's
`vio_stdio.h`:
int roar_vio_to_stdio_lseek (void *__cookie, _IO_off64_t *__pos, int __w);
This `_IO_off64_t` is an internal implementation detail of glibc and
was removed in version 2.28. Nobody must ever use it. Why the ****
did the RoarAudio developers use it? Not using internal typedefs
isn't exactly rocket science.
This annoys me enough to finally remove the plugin. Anyway, I've
never heard of anybody using RoarAudio, so my best guess is that
nobody will notice.
2018-10-31 15:03:28 +01:00
Max Kellermann
9fc00a817b
Listen: use fs/XDG.hxx
...
This keeps one central place for the XDG switch. Specifically, this
disables the XDG listener on Apple, where XDG is not supported.
2018-10-31 14:30:34 +01:00
Max Kellermann
f47696f5f8
fs/StandardDirectory: move USE_XDG to XDG.hxx
2018-10-31 13:39:20 +01:00
Florian Schlichting
db21d7de0b
fix compilation errors on Debian GNU/Hurd
...
Apparently on hurd-i386 __GLIBC__ is defined, but the pthread
implementation is special and cannot be used with constexpr. Hence
exclude __gnu_hurd__.
2018-10-31 12:24:34 +01:00
Max Kellermann
56112a237c
Listen: listen on $XDG_RUNTIME_DIR/mpd/socket by default
2018-10-30 22:14:54 +01:00
Max Kellermann
64da9399ca
event/ServerSocket: allow mixing AddFD() with other Add*() methods
2018-10-30 22:14:53 +01:00
Max Kellermann
0ec31b4aa4
Listen: eliminate listen_add_config_param()
2018-10-30 21:14:39 +01:00
Max Kellermann
a943f4063c
event/ServerSocket: add AddFD() overload with AllocatedSocketAddress&&
2018-10-30 20:44:56 +01:00
Max Kellermann
ce9f09c69a
event/ServerSocket: make AddAddress() a template
2018-10-30 20:43:52 +01:00
Max Kellermann
3ddc7a5353
event/ServerSocket: include cleanup
2018-10-30 20:19:07 +01:00
Max Kellermann
e575392b94
event/ServerSocket: use class IPv6Address
2018-10-30 20:19:04 +01:00
Max Kellermann
c6f61a699c
event/ServerSocket: make OneServerSocket an inner class
2018-10-30 20:16:26 +01:00
Max Kellermann
0307b49f43
event/ServerSocket: make OnAccept() noexcept
2018-10-30 20:13:07 +01:00
Max Kellermann
413ab80295
event/ServerSocket: use C++11 initializer
2018-10-30 20:11:58 +01:00
Max Kellermann
daffefdb10
event/ServerSocket: pass UniqueSocketDescriptor to AddFD()
2018-10-30 20:05:57 +01:00
Max Kellermann
5fb21fbdb1
event/ServerSocket: add noexcept
2018-10-30 19:57:39 +01:00
Max Kellermann
f5857c4689
net/SocketUtil: update API documentation
2018-10-30 19:56:10 +01:00
Max Kellermann
c97469283c
pcm: build dsd2pcm only if -Dtest=true
2018-10-30 13:31:43 +01:00
Max Kellermann
9b1f44e758
LogInit: work around two Android compiler warnings
2018-10-30 13:23:10 +01:00
Max Kellermann
804ccddf7e
pcm/Clamp: convert to constexpr
2018-10-30 00:08:25 +01:00
Max Kellermann
bb5918932b
pcm/PcmUtils: rename to Clamp.hxx
2018-10-30 00:05:58 +01:00
Max Kellermann
aa77bc323f
pcm/FloatConvert: make IntegerToFloatSampleConvert::Convert() constexpr
2018-10-29 23:52:25 +01:00
Max Kellermann
9b6a2589e5
Merge branch 'v0.20.x'
2018-10-29 23:06:32 +01:00
Max Kellermann
cc5fab28af
pcm/FloatConvert: fix compile-time integer overflow for S32
...
The compile-time calculation for `factor` overflows because `1<<31`
cannot be represented by `int`. By casting to `uintmax_t` first, we
can avoid this overflow.
Closes #380
2018-10-29 22:50:54 +01:00
Max Kellermann
a3f7127e72
pcm/FloatConvert: use FloatToIntegerSampleConvert::factor for IntegerToFloatSampleConvert::factor
2018-10-29 22:50:06 +01:00
Max Kellermann
b0a6a569df
pcm/FloatConvert: add static_assert
on the factor
...
This assertion currently fails for S32 due to integer overflow (#380 ).
2018-10-29 22:38:32 +01:00
Max Kellermann
92523f8cf2
input/CdioParanoia: parse_cdio_uri() returns CdioUri
...
The `bool` return value isn't used anymore, so we can just return the
parsed object instead of passing it as an output parameter.
2018-10-29 14:34:33 +01:00
Max Kellermann
e33c08357a
input/CdioParanoia: rename struct cdio_uri to CdioUri
2018-10-29 14:34:30 +01:00
Max Kellermann
2dc5648e57
input/CdioParanoia: use StringAfterPrefixIgnoreCase()
2018-10-29 14:34:30 +01:00
Max Kellermann
d0349880da
util/StringCompare: add StringAfterPrefixIgnoreCase()
2018-10-29 14:34:29 +01:00
Max Kellermann
7aa1dceef6
player/Control: move IDLE_PLAYER to Player::SeekDecoder()
...
This emits the event even if PlayerControl::Play() is used to replay
the current song, which emits the missing "player" idle event.
Closes #381
2018-10-29 12:01:48 +01:00
Max Kellermann
f76544be4c
db/update: catch all exceptions
2018-10-29 11:05:50 +01:00
Max Kellermann
1e6c445320
configure.ac: add -funwind-tables
to work around clang bug
...
Replaces the workaround from commit
751fff07fb
which fixed only one of many
crash locations.
See:
https://github.com/MusicPlayerDaemon/MPD/issues/373
https://github.com/android-ndk/ndk/issues/831
https://bugs.llvm.org/show_bug.cgi?id=32611
2018-10-29 11:05:35 +01:00
Max Kellermann
eeae9a04d3
input/Registry: add missing include
2018-10-25 09:21:13 +02:00
Max Kellermann
8bb35e7bb6
decoder/Thread: reimplement HasRemoteTagScanner() using the InputPlugin list
2018-10-25 09:09:21 +02:00
Max Kellermann
3e78c9ab48
input/Plugin: add attribute prefixes
2018-10-24 20:25:32 +02:00
Max Kellermann
9ec86acb9c
decoder/Thread: enable output tags for Tidal and Qobuz
...
Fixes formatted paths in the `recorder` output, closing #345 .
2018-10-24 16:38:26 +02:00
Max Kellermann
426bde3f75
decoder/Thread: move check to SongHasVolatileTags()
2018-10-24 16:32:41 +02:00
Max Kellermann
30e22b753b
tag/Chromaprint: OO wrapper for a ChromaprintContext
2018-10-24 10:52:45 +02:00
Max Kellermann
f7141c9201
decoder/Control: convert to class, make various attributes private
2018-10-24 10:47:34 +02:00
Max Kellermann
c2a2573aa5
release v0.20.22
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlvPX+UQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFElO8EACgPMaiN3m/x1hzJ3QTLzCXgeqSG1vuv1tC
F+sFISLPx/IoVjTpvd9H8jMt7lD+SYB620pAfNyLIGZpWcTxu1wmaviOghqCqnGP
sql0vtS9CrRGhsKDi5earox3zecylWJ3PRPXpy/4NjFuFUxE2ij/wbXzDb9UbtMg
1WnVL++fAlFj54CnPR35XHglYU+X7/bMWApkVUfsKBgyX9aghqLYUIm0jaUjj3Bs
xB/2Nemd1A88yrc4kqyzbFsN96S/W2eXhDYfPlDwFdplfoRJ8nrEMdwrsn0nabIF
7x+OsAGAfrz3e00TZdiDSaIy7VU4EFV9ctZVonoCGUluBHL0iG7G7bj2cnd+hVnZ
ecidfHMUqVO99elmUtWsUQwzbhL/TxM6Fzn2qDwqdwcCWDgHcn4fpXfsY0MRt6NK
cUhCyspMTuhqS3ohLO6RfiWDActm6QL2IHiDty/WAe1Td0VjOiRQMq7CADHlgn/D
IalN8kGyWHK5ew+3Iiw5zRoYjNXG4ALZN8cEqVh2R7i2uxh8+qm46HkhticAjfDM
4mETs3oAZdpOGCgv6Q0eY7tQDKB13DD/303NJaVFb6Iew2TZCWDbFz5HjqYShCZi
PgnPosdRg0LoQbMah4Uhsj6frs6LEBMpg6c7nScJN/1MoRaOyVNDg03X+rBmPe5z
XULvdsZ8Sw==
=8OQx
-----END PGP SIGNATURE-----
Merge tag 'v0.20.22'
release v0.20.22
2018-10-23 20:10:57 +02:00
Max Kellermann
751fff07fb
input/Error: work around clang bug leading to crash
...
Closes #373
2018-10-23 19:52:22 +02:00
Max Kellermann
005e691339
decoder/fluidsynth: adapt to API change in version 2.0
...
Closes #360
2018-10-23 18:44:28 +02:00
Max Kellermann
c26703b7e6
SongFilter: check value.empty() after checking tag fallbacks
...
In this new order, a filter 'AlbumArtist ""' matches only on songs
which neither have `AlbumArtist` nor `Artist`.
2018-10-22 18:34:47 +02:00
Max Kellermann
66ab2de578
Merge branch 'v0.20.x'
2018-10-22 18:20:29 +02:00
Max Kellermann
db27bb76e2
db: fix broken command "list ... group"
...
Grouping in the "list" command was completely broken from the start,
unlike "count group". I have no idea what I have been thinking when I
wrote commit ae178c77bd
, but it didn't
make any sense.
This commit is a rewrite of the feature.
For clients to be able to detect this feature, this commit also
increments the protocol version.
2018-10-22 13:08:24 +02:00
Max Kellermann
7cfe929c36
db/Count: print empty group if song without grouped tag exists
...
Be consistent with "list" responses.
2018-10-22 12:42:18 +02:00
Max Kellermann
6c06244e83
db/Count: move code to tag/VisitCallback.hxx
2018-10-22 11:50:51 +02:00
Max Kellermann
53448e4633
tag/Fallback: add tag fallbacks for AlbumArtistSort, ArtistSort
...
Just like AlbumArtist falls back to Artist, AlbumArtistSort should
fall back tom AlbumArtist, ArtistSort and finally Artist.
Closes #355
2018-10-22 10:52:42 +02:00
Max Kellermann
21adc78713
SongFilter: use ApplyTagFallback()
2018-10-22 10:46:26 +02:00
Max Kellermann
0340b01392
db/Count: use ApplyTagFallback()
2018-10-22 10:46:26 +02:00
Max Kellermann
94aed92e9a
tag/Set: move code to ApplyTagWithFallback()
2018-10-22 10:10:43 +02:00
Max Kellermann
6b9966e969
tag/Set: include cleanup
2018-10-22 10:09:56 +02:00
Max Kellermann
4bc5333995
tag/Set: use TagBuilder::AddItemUnchecked()
...
This improves the workaround from commit
b5ba94f1de
and actually gives a useful
result for "list" with a disabled tag.
2018-10-22 10:06:04 +02:00
Max Kellermann
ff58b8d255
tag/Builder: move code to AddItemUnchecked()
2018-10-22 10:03:47 +02:00
Max Kellermann
e28d1e0f65
decoder/mad: convert Tag**
parameter to just Tag*
2018-10-22 09:44:54 +02:00
Max Kellermann
a491d8ae24
decoder/mad: use class UniqueId3Tag
2018-10-22 09:44:50 +02:00
Max Kellermann
3cd5dd15f8
decoder/mad: don't initialize xing::frames
2018-10-22 09:44:48 +02:00
Max Kellermann
562ae44d38
decoder/mad: remove unused attribute from xing::magic
2018-10-22 09:44:46 +02:00
Max Kellermann
92541dedc0
Merge branch 'master' of git://github.com/skidoo23/MPD
2018-10-22 09:44:36 +02:00
Max Kellermann
650a67dc38
decoder/mad: use mad_bit_skip() where appropriate
2018-10-19 20:24:16 +02:00
Max Kellermann
c63f24e58e
decoder/audiofile: larger stack buffer to reduce overhead
2018-10-19 20:04:28 +02:00
Max Kellermann
3be8b02cc2
decoder/sndfile: make vio
constexpr
...
Use `const_cast` to be able to pass it to sf_open_virtual() which has
a wrong parameter declaration.
2018-10-19 19:51:17 +02:00
Max Kellermann
bdfaea0c25
decoder/mad: move parse_id3_mixramp() to src/tag/Id3ReplayGain.cxx
2018-10-19 19:45:32 +02:00
Max Kellermann
ed5c0d6546
tag/Id3Scan: make struct id3_tag pointers const
2018-10-19 19:43:03 +02:00
Max Kellermann
86dc621086
tag/Rva2: make struct id3_tag pointers const
2018-10-19 19:41:59 +02:00
skidoo23
fbea965c70
tag: new tag Label
2018-10-17 20:33:03 +02:00
Max Kellermann
eefc0f5d80
input/Error: add noexcept
2018-10-16 21:26:04 +02:00
skidoo23
69749eb591
decoder/sidplay: fix typo to avoid linker error with meson (libsidplayfp)
2018-10-16 14:56:40 +02:00
Max Kellermann
94592c1406
build with Meson instead of autotools
...
So long, autotools! This is my last MPD related project to migrate
away from it. It has its strengths, but also very obvious weaknesses
and weirdnesses. Today, many of its quirks are not needed anymore,
and are cumbersome and slow. Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
skidoo23
f80ebf68b0
decoder/wavpack: fix warning 'unused variable is_dsd' when compiled with --enable-dsd=no
2018-10-12 01:02:34 +02:00
Max Kellermann
1155a29096
Merge branch 'cdda_set_cdspeed' of git://github.com/andrewbasterfield/MPD
2018-10-08 21:16:52 +02:00
Max Kellermann
030e603940
decoder/gme: fix include
...
Broken since commit 08f77c2b60
2018-10-07 22:33:52 +02:00
Andrew Basterfield
9c1bf9ac5f
Remove some extraneous leftover debugging
2018-10-07 19:21:38 +01:00
Andrew Basterfield
2f07b8f482
Set cdrive speed hint for cdparanoia
2018-10-06 20:18:19 +01:00
Max Kellermann
6c40a27809
db/update/ExcludeList: fix variable name in #else block
2018-10-01 08:40:53 +02:00
Max Kellermann
8736a3533b
db/update/ExcludeList: add missing #ifdef
2018-10-01 08:40:15 +02:00
Max Kellermann
608d232373
util/SliceBuffer: re-add line which got lost in the last commit
2018-09-23 19:33:34 +02:00
Max Kellermann
1702e98fdf
util/SliceBuffer: move code to DiscardMemory()
2018-09-23 19:15:28 +02:00
Max Kellermann
2ec94c0497
player/Control: start thread on demand
...
Keep MPD's footprint small until playback is requested.
2018-09-23 17:32:34 +02:00
Max Kellermann
bf372e3e1f
player/Control: move public methods up
2018-09-23 17:28:41 +02:00
Max Kellermann
0d971963fd
player/Control: make several methods private
2018-09-23 17:27:42 +02:00
Max Kellermann
287cff40b9
player/Control: remove Lock(), Unlock()
2018-09-23 17:27:42 +02:00
Max Kellermann
0e0bc7976f
player/Control: add LockGetSyncInfo()
2018-09-23 17:17:57 +02:00
Max Kellermann
8c638c50a3
player/Thread: remove obsolete buffered_before_play
attribute
2018-09-23 16:50:04 +02:00
Max Kellermann
5b2374b949
player/Thread: calculate buffered_before_play
based on a fixed duration
...
Previously, there was the setting `buffered_before_play` which
specified a percentage of the audio buffer, defaulting to `10%`. That
was working well enough for quite some time, until high-quality audio
formats became common.
At 44.1 kHz, 16 bit stereo, MPD collected 2.3 seconds worth of data in
the buffer before starting playback. With the same default settings
and 192 kHz, 24 bit stereo, that was only 0.27 seconds.
Making this depend on the byte size only leads to high latency at low
quality, and too little data at high quality. The natural choice
would be to use a duration instead of a byte size, which should give
the same good experience with all audio formats.
Since the `buffered_before_play` configuration setting was not
understood well by users and caused more harm than good, this commit
deprecates it. It has now no effect.
2018-09-23 15:46:29 +02:00
Max Kellermann
c1600bcf3d
player/Thread: copy buffered_before_play
2018-09-23 15:46:27 +02:00
Max Kellermann
a82d864c91
config/File: print warning about deprecated options
2018-09-23 15:43:38 +02:00
Max Kellermann
dcac32a6c4
AudioFormat: add implicit cast to duration::rep
...
Fixes integer truncation bugs (closes #359 ).
2018-09-23 15:15:53 +02:00
Max Kellermann
5286477f73
Chrono: remove unnecessary typedef rep
...
It is already inherited by the base class, and we don't need to import
it explicitly.
2018-09-23 15:15:18 +02:00
Max Kellermann
2f3845ef51
player/Thread: remove buffered_before_play
from decoder_wakeup_threshold
formula
...
Simplify the formula, and I guess this makes the formula more
reliable. Imagine somebody configured `buffered_before_play` larger
than 25%; then the decoder would be woken up all the time. This
doesn't seem logical. On the other hand, it's easy to understand that
the decoder should be woken up below 75% buffer fill.
2018-09-23 15:00:47 +02:00
Max Kellermann
1191025bbf
player/Thread: add attribute decoder_wakeup_threshold
...
Calculate the value only once.
2018-09-22 19:56:00 +02:00
Max Kellermann
bfd261929e
AudioFormat: remove obsolete method GetTimeToSize()
2018-09-22 19:39:20 +02:00
Max Kellermann
84de88841b
player/CrossFade: use AudioFormat::SizeToTime() instead of GetTimeToSize()
2018-09-22 19:37:45 +02:00
Max Kellermann
224400074c
player/CrossFade: use std::chrono::duration
2018-09-22 19:37:02 +02:00
Max Kellermann
863722545f
player/CrossFade, ...: use lround()
2018-09-22 19:08:03 +02:00
Max Kellermann
d3d1d37782
AudioFormat: add TimeToSize(), SizeToTime()
2018-09-21 20:51:08 +02:00
Max Kellermann
1a2012a97e
player/Control: convert total_play_time
to FloatDuration
2018-09-21 20:50:15 +02:00
Max Kellermann
90f4e97751
decoder/Client: use std::chrono::duration<double> instead of raw double
2018-09-21 20:42:34 +02:00
Max Kellermann
d1bcd98f79
Chrono: add FloatDuration
2018-09-21 20:42:30 +02:00
Max Kellermann
39542de69d
Chrono: add static method Cast()
2018-09-21 20:41:23 +02:00
Max Kellermann
1d00d55d53
player/Thread: stop buffering if buffer is full
...
Shouldn't ever happen, but who knows...
2018-09-21 19:05:25 +02:00
Max Kellermann
a190db0873
player/Thread: simplify loop condition
2018-09-21 18:58:38 +02:00
Max Kellermann
e3142312bb
player/Control: convert to class
2018-09-21 18:12:28 +02:00
Max Kellermann
e5d1ac0bd0
player/Thread: move functions into PlayerControl
2018-09-21 18:09:14 +02:00
Max Kellermann
c0411fa412
decoder/Thread: add noexcept
2018-09-21 17:58:34 +02:00
Max Kellermann
781e690012
player/Thread: catch and log initialization errors
2018-09-21 17:35:32 +02:00
Max Kellermann
9a2d71341e
player/Control: apply CamelCase to struct player_status
2018-09-21 17:22:35 +02:00
Max Kellermann
6db6d3c50c
player/Thread: move StartPlayerThread() into PlayerControl
2018-09-21 17:14:19 +02:00
Max Kellermann
0e2c597884
MusicBuffer: remove noexcept
from constructor
...
The `SliceBuffer` constructor can throw.
2018-09-21 17:11:52 +02:00
Max Kellermann
debdf9bb96
decoder/{Thread,Control,...}: rename source files, drop prefix
2018-09-21 17:01:24 +02:00
Max Kellermann
218d9383d7
decoder/Thread: move decoder_thread_start() into DecoderControl
2018-09-21 16:57:54 +02:00
Max Kellermann
af64bd5088
Thread/Thread: disallow copying
2018-09-21 16:55:09 +02:00
Max Kellermann
050f81c4fe
Thread/Thread: document Start() exception
2018-09-21 16:53:52 +02:00
Max Kellermann
ab678787f4
java/Ref: API doc line breaks
2018-09-06 20:04:46 +02:00
Max Kellermann
23556585ca
java/Ref: add LocalRef::GetEnv()
2018-09-06 20:04:40 +02:00
Max Kellermann
728e4e9a38
util/StringCompare: add StringEndsWithIgnoreCase(), StringStartsWithIgnoreCase()
2018-09-06 19:52:43 +02:00
Max Kellermann
2d6f9f9a9c
Util/WStringAPI: non-Windows implementation of _wcs*cmp()
2018-09-06 19:49:45 +02:00
Max Kellermann
c2e2e5543e
util/WStringAPI: add wcscoll() wrapper
2018-09-06 19:39:28 +02:00
Max Kellermann
349d8eb248
util/WStringCompare: add "noexcept"
2018-09-06 19:35:09 +02:00
Max Kellermann
94b96bde9b
util/WStringCompare: wcpcpy() and wcsdup() are available on Android
2018-09-06 19:33:50 +02:00
Max Kellermann
45ffc864c5
util/StringCompare: add more function attributes
2018-09-06 19:23:13 +02:00
Max Kellermann
19d9ce260a
fs/io/FileOutputStream: disallow copying
2018-09-03 14:36:01 +02:00
Max Kellermann
0701333ec1
db/proxy: forward filter as expression to server
...
This adds support for the full set of MPD 0.21 filter types.
2018-09-02 22:39:45 +02:00
Max Kellermann
a8e70f0901
db/proxy: forward sort
and window
to server
2018-09-02 17:51:30 +02:00
Max Kellermann
c7c32a3ce9
db/Print: move sort/window emulation code to class DatabaseVisitorHelper
...
That way, each plugin can decide to implement it better.
2018-09-02 17:37:02 +02:00
Max Kellermann
94694e0f33
db/simple: pass DatabaseSelection to WalkMount()
...
This passes the new `sort` and `window` attributes to the mounted
database.
2018-09-02 17:13:35 +02:00
Max Kellermann
a73176a1e9
db/Helpers: fix include guard
2018-09-02 12:32:33 +02:00
Max Kellermann
e6a974a93e
db/Selection: add sort
and window
...
Remove them as parameters from `db_selection_print()`.
2018-09-02 11:10:04 +02:00
Max Kellermann
9894967fcb
db/Selection: move bool
attribute to the end
...
May allow a better memory layout.
2018-09-02 11:10:04 +02:00
Max Kellermann
92da483ecd
db/Selection: add noexcept
2018-09-02 11:10:04 +02:00
Max Kellermann
9cc960ac5e
db/proxy: require MPD 0.19
2018-09-02 11:07:32 +02:00
Max Kellermann
18dd082f1e
db/proxy: use ~0 instead of -1
...
No undefined behavior.
2018-09-02 11:06:08 +02:00
Max Kellermann
81b734be10
db/Interface: add "noexcept"
2018-09-02 10:20:48 +02:00
Max Kellermann
c59be7ced3
db/Interface: add more documentation about exceptions
2018-09-02 10:19:10 +02:00
Max Kellermann
c5c4d4a57e
db/proxy: forward the audio format
...
Requires libmpdclient 2.15.
2018-09-02 08:38:23 +02:00
Max Kellermann
2d0b429b6a
db/proxy: require libmpdclient 2.9
2018-09-02 08:21:11 +02:00
Max Kellermann
60620d9af5
db/Print: move variable i
2018-09-02 08:17:22 +02:00
Max Kellermann
15b2a4862e
protocol/RangeArg: add Contains()
2018-09-02 08:17:22 +02:00
Max Kellermann
2915d2dd0f
protocol/RangeArg: add IsAll()
2018-09-02 08:17:22 +02:00
Max Kellermann
590687fdea
protocol/RangeArg: eliminate SetAll()
2018-09-02 08:17:22 +02:00
Max Kellermann
993f8d6a5e
db/Print: pass RangeArg to db_selection_print()
2018-09-02 08:17:22 +02:00
Max Kellermann
68f824a186
protocol/ArgParser: move struct RangeArg to separate header
2018-09-02 08:17:22 +02:00
Max Kellermann
b9cca49e14
lib/dbus/ReadIter: switch off -Wshadow on GCC<8
...
GCC 6.3.0 emits bogus warnings like this:
In file included from src/lib/dbus/UDisks2.cxx:22:0:
src/lib/dbus/ReadIter.hxx: In instantiation of 'ODBus::ReadMessageIter::ForEachProperty(F&&)::<lambda(auto:2&&)> [with auto:2 = ODBus::ReadMessageIter; F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]':
src/lib/dbus/ReadIter.hxx:102:6: required from 'ODBus::ReadMessageIter::ForEachRecurse(int, F&&)::<lambda(auto:1&&)> [with auto:1 = ODBus::ReadMessageIter&; F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]'
src/lib/dbus/ReadIter.hxx:92:5: required from 'void ODBus::ReadMessageIter::ForEach(int, F&&) [with F = ODBus::ReadMessageIter::ForEachRecurse(int, F&&) [with F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]::<lambda(auto:1&&)>]'
src/lib/dbus/ReadIter.hxx:101:3: required from 'void ODBus::ReadMessageIter::ForEachRecurse(int, F&&) [with F = ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]::<lambda(auto:2&&)>]'
src/lib/dbus/ReadIter.hxx:114:3: required from 'void ODBus::ReadMessageIter::ForEachProperty(F&&) [with F = std::_Bind<void (*(std::reference_wrapper<UDisks2::Object>, std::_Placeholder<1>, std::_Placeholder<2>))(UDisks2::Object&, const char*, ODBus::ReadMessageIter&&) noexcept>]'
src/lib/dbus/UDisks2.cxx:71:30: required from here
src/lib/dbus/ReadIter.hxx:114:53: error: declaration of 'ODBus::ReadMessageIter&& i' shadows a parameter [-Werror=shadow]
ForEachRecurse(DBUS_TYPE_DICT_ENTRY, [&f](auto &&i){
^
src/lib/dbus/ReadIter.hxx:101:33: note: shadowed declaration is here
ForEach(arg_type, [&f](auto &&i){
^
2018-09-02 08:17:21 +02:00
Max Kellermann
931b571e3d
neighbor/udisks: add this->
to work around GCC 6 bug
...
Since `this` was captured, it does not need to be specified, but GCC 6
can't do it. Since we want to support the standard compiler from
Debian Stretch (stable), we need to work around this problem:
src/neighbor/plugins/UdisksNeighborPlugin.cxx:239:12: error: cannot call member function 'void UdisksNeighborExplorer::Insert(UDisks2::Object&&)' without object
Insert(std::move(o));
~~~~~~^~~~~~~~~~~~~~
This fixes #300 which I previously thought was a different bug.
2018-09-02 08:12:51 +02:00
Max Kellermann
35eca08d48
java/*: add noexcept
2018-08-28 13:27:28 +02:00
Max Kellermann
7137ca375a
Merge branch 'v0.20.x'
2018-08-28 13:27:04 +02:00
Max Kellermann
282859a62a
java/String: include cleanup
2018-08-28 13:07:28 +02:00
Max Kellermann
fbeb5eefdc
java/Class: drop unnecessary namespace spec
2018-08-28 13:01:01 +02:00
Max Kellermann
85bada0505
java/Class: use DiscardException() in FindOptional()
...
Sometimes, the JVM returns a non-nullptr value with an exception
pending (seen on Android 1.6, maybe a Dalvik bug?). Let's catch all
such cases.
2018-08-28 13:00:08 +02:00
Max Kellermann
fe2f7a3e5a
configure.ac: add automake conditional "LINUX"
2018-08-22 16:09:40 +02:00
Max Kellermann
98eed1f5ab
system/EpollFD: use class UniqueFileDescriptor
2018-08-22 16:09:40 +02:00
Max Kellermann
5d0a463f09
system/{Epoll,Event,Signal}FD: relicense to BSD-2
2018-08-22 15:40:45 +02:00
Max Kellermann
dd461400fb
system/EPollFD: rename to EpollFD
2018-08-22 15:40:45 +02:00
Max Kellermann
b1390ec27f
system/UniqueFileDescriptor: make the "int" constructor public
2018-08-22 15:40:45 +02:00
Max Kellermann
dda5516eec
net/IPv6Address: pass reference to Cast()
2018-08-21 20:21:41 +02:00
Max Kellermann
adc5c5db88
net/IPv4Address: pass reference to Cast()
2018-08-21 20:16:57 +02:00
Max Kellermann
0642ce4795
fs/io/FileOutputStream: make linkat() mandatory on Linux
2018-08-21 19:02:03 +02:00
Max Kellermann
d11e1d5880
fs/io/FileOutputStream: add "noexcept"
2018-08-21 18:56:14 +02:00
Max Kellermann
b143477774
fs/io/BufferedReader: add "noexcept" to constructor
2018-08-21 18:52:57 +02:00
Max Kellermann
d092a88a93
system/Open: new UniqueFileDescriptor constructing library
2018-08-21 18:27:39 +02:00
Max Kellermann
ab7597b089
fs/io/FileReader: use class UniqueFileDescriptor
2018-08-21 18:26:36 +02:00
Max Kellermann
84df470008
fs/io/FileReader: use std::exchange()
2018-08-21 18:26:34 +02:00
Max Kellermann
5ca0b7a28f
fs/io/FileReader: add "noexcept"
2018-08-21 18:26:09 +02:00
Max Kellermann
21d621e7ad
fs/io/FileReader: simplify includes
2018-08-21 18:26:09 +02:00
Max Kellermann
d036e20826
system/FileDescriptor: add openat() wrapper
2018-08-21 18:15:37 +02:00
Max Kellermann
9151b84c25
net/AllocatedSocketAddress: convert operator== to template
2018-08-21 12:26:19 +02:00
Max Kellermann
5d7dd12f7a
net/SocketDescriptor: add multicast methods
2018-08-21 11:37:19 +02:00
Max Kellermann
21783ff5f7
net/SocketDescriptor: remove unnecessary SO_REUSEPORT check
2018-08-21 11:35:29 +02:00
Max Kellermann
fd923d5d96
net/SocketDescriptor: add Shutdown()
2018-08-21 11:31:58 +02:00
Max Kellermann
ebf607eef8
net/SocketDescriptor: fix SOCK_NONBLOCK flag in CreateSocketPairNonBlock()
2018-08-21 11:27:15 +02:00
Max Kellermann
e092eadd8d
net/SocketDescriptor: add "noexcept"
2018-08-21 11:08:34 +02:00
Max Kellermann
185148f57c
net/SocketAddress: add cast to size_type
2018-08-21 11:06:05 +02:00
Max Kellermann
ede7434901
net/SocketAddress: add GetSteadyPart()
2018-08-21 10:57:46 +02:00
Max Kellermann
ba3b422ce5
net/SocketDescriptor: make accept4() mandatory on Linux
2018-08-21 10:53:54 +02:00
Max Kellermann
1f3ce380ed
net/SocketAddress: reimplement GetPort() using IPv4Address::GetPort()
2018-08-21 10:49:55 +02:00
Max Kellermann
dfc1f6342a
net/SocketAddress: add IsV4Mapped()
2018-08-21 10:48:37 +02:00
Max Kellermann
94092f1f90
net/SocketAddress: reimplement IsV6Any() using IPv6Address::IsAny()
2018-08-21 10:46:20 +02:00
Max Kellermann
a84b83f20f
net/IPv6Address: new class
2018-08-21 10:39:54 +02:00
Max Kellermann
614e410fe7
net/Resolver: update copyright year
2018-08-21 10:30:24 +02:00
Max Kellermann
4a1e885c0a
net/Resolver: replace with more advanced implementation
...
The new implementation is copied from another project and is
BSD-licensed. It is exception-safe and can parse IPv6 scope ids with
interface names.
2018-08-21 08:26:12 +02:00
Max Kellermann
eee91aa4ea
util/Exception: update copyright
2018-08-21 08:20:52 +02:00
Max Kellermann
855750c784
util/{Const,Writable}Buffer: add method SetEnd()
2018-08-21 08:20:17 +02:00
Max Kellermann
4f2163e76c
system/FileDescriptor: include cleanup
2018-08-20 17:25:42 +02:00
Max Kellermann
eef66dee04
system/FileDescriptor: pass FileDescriptor to CheckDuplicate()
2018-08-20 17:23:14 +02:00
Max Kellermann
7ad440ca1c
net/SocketDescriptor: make eventfd() and signalfd() mandatory on Linux
2018-08-20 17:16:07 +02:00
Max Kellermann
13b3e9e7b3
system/FileDescriptor: make inotify_init1() mandatory on Linux
2018-08-20 17:12:50 +02:00
Max Kellermann
8106929d60
system/FileDescriptor: add pipe2() wrapper
2018-08-20 17:05:29 +02:00
Max Kellermann
795baed3f5
system/FileDescriptor: make pipe2() mandatory on Linux
2018-08-20 17:04:43 +02:00
Max Kellermann
5487d40be9
system/FileDescriptor: add operator!=
2018-08-20 16:49:14 +02:00
Max Kellermann
5e512763d3
system/UniqueFileDescriptor: make the base class public
2018-08-20 16:38:27 +02:00
Max Kellermann
a65d02d3ae
system/FileDescriptor: add "noexcept"
2018-08-20 16:34:47 +02:00
Max Kellermann
2156fc64f4
util/StringStrip: more API documentation
2018-08-20 16:30:46 +02:00
Max Kellermann
441440101d
util/StringStrip: add more "nonnull" attributes
2018-08-20 16:28:43 +02:00
Max Kellermann
ec54754e22
Compiler.h: move to util/
2018-08-20 16:19:17 +02:00
Max Kellermann
0ebba73cb8
net/SocketDescriptor: add method GetPeerCredentials()
2018-08-20 16:11:17 +02:00
Max Kellermann
50c7337965
net/SocketDescriptor: add GetType(), IsStream()
2018-08-20 16:06:58 +02:00
Max Kellermann
b5c569cd30
system/FileDescriptor: add IsPipe(), IsSocket()
2018-08-20 16:05:03 +02:00
Max Kellermann
11396d4fba
net/SocketAddress: add method GetLocalRaw()
2018-08-20 15:59:17 +02:00
Max Kellermann
4c6ae4e9e8
net/IPv4Address: add various helper methods
2018-08-20 15:57:13 +02:00
Max Kellermann
9cb9154b08
net/IPv4Address: add struct sockaddr_in constructor
2018-08-20 15:57:13 +02:00
Max Kellermann
234a6193bb
net/SocketAddress: make GetAddress() constexpr
2018-08-20 15:57:13 +02:00
Max Kellermann
2bf5f32224
net/IPv4Address: add API documentation
2018-08-20 15:50:25 +02:00
Max Kellermann
82d0f68acf
net/IPv4Address: add static method ConstructInAddrBE()
2018-08-20 15:48:52 +02:00
Max Kellermann
616c8383c0
net/IPv4Address: check _WIN32 instead of WIN32
2018-08-20 15:48:49 +02:00
Max Kellermann
5de46268af
net/IPv4Address: add "noexcept"
2018-08-20 15:43:35 +02:00
Max Kellermann
489e11072e
util/WritableBuffer: add ConstBuffer cast operator
2018-08-20 15:36:50 +02:00
Max Kellermann
5e2af15e94
util/Manual: add static method Cast()
2018-08-20 15:35:43 +02:00
Max Kellermann
3fbb54e0a4
util/IterableSplitString: use operator==(nullptr_t)
2018-08-20 15:35:09 +02:00
Max Kellermann
fe6de14faf
util/StringView: add ConstBuffer cast constructors
2018-08-20 15:34:07 +02:00
Max Kellermann
e85b9960f0
util/StringCompare: use StringAPI.hxx
2018-08-20 15:33:16 +02:00
Max Kellermann
75c836fbd9
util/StringAPI: use StringCompare() in StringIsEqual()
2018-08-20 15:31:09 +02:00
Max Kellermann
94b1025780
util/RuntimeError: fix typo
2018-08-20 15:22:24 +02:00
Max Kellermann
36ca9d01fb
util/ForeignFifoBuffer: shift the buffer in MoveFrom() on demand
...
The API documentation says "move as much data as possible", and if
there is room at the head of the buffer, we should use that if the
room after the tail is not large enough.
2018-08-20 15:21:05 +02:00
Max Kellermann
3bceed1b53
util/ForeignFifoBuffer: add "noexcept"
2018-08-20 14:53:39 +02:00
Max Kellermann
90de2c4bd6
util/Exception: move code to NestCurrentException()
2018-08-20 14:52:54 +02:00
Max Kellermann
9d63c8220b
util/Cast: reverse operands in ContainerAttributeOffset()
...
The result shall be positive.
2018-08-20 14:23:02 +02:00
Max Kellermann
edd9d16c84
util/Cast: move OffsetPointer() to OffsetPointer.hxx
2018-08-20 13:46:18 +02:00
Max Kellermann
ec373eba5d
util/BindMethod: add "noexcept"
2018-08-20 13:45:41 +02:00
Max Kellermann
0dfb27b7e5
util/StringAPI: stpcpy() was added in Bionic API level 21
2018-08-20 13:31:23 +02:00
Thomas Guillem
735f62be0c
storage/nfs: implement follow
2018-08-20 11:29:27 +02:00
Thomas Guillem
a04e01d5f5
lib/nfs/Connection: add Lstat
2018-08-20 11:29:11 +02:00
Max Kellermann
0b7d7fe069
Merge branch 'v0.20.x'
2018-08-20 11:27:56 +02:00
Thomas Guillem
9127afbf3f
lib/nfs/Connection: use nfs_stat64_async
...
Since nfs_stat_async is deprecated.
2018-08-20 10:51:24 +02:00
Max Kellermann
616abdda26
Merge branch 'v0.20.x'
2018-08-20 00:19:31 +02:00
Thomas Guillem
aff070bcbb
android: add LogListener
...
A Java object to send logs on the android side.
2018-08-19 23:32:24 +02:00
Max Kellermann
cc64c715a2
db/update/Service: Enqueue() throws on error
2018-08-19 23:15:52 +02:00
Max Kellermann
9999914c74
Main: throw exception instead of calling FatalError()
2018-08-19 23:13:29 +02:00
Max Kellermann
bd32a11016
config/Global: remove obsolete library
2018-08-19 23:08:41 +02:00
Max Kellermann
140aeea300
Main: allocate ConfigData on the stack
2018-08-19 23:08:23 +02:00
Max Kellermann
afd0fe666a
config/Global: move config_global_check() to Check.cxx
2018-08-19 23:01:30 +02:00
Max Kellermann
5f95c07305
config/Path: add InitPathParser()
...
Eliminate yet another access to the global ConfigData instance.
2018-08-19 22:29:39 +02:00
Max Kellermann
1a9659ef45
output/Init: pass global configuration in struct AudioOutputDefaults
2018-08-19 07:52:23 +02:00
Max Kellermann
aaa438e745
mixer/Type: mixer_type_parse() throws on error
2018-08-19 07:49:54 +02:00