Max Kellermann
6addc9d6e0
pcm/PcmConvert: remove unused attribute "dest_format"
2019-04-04 21:06:28 +02:00
Max Kellermann
e78d825059
pcm/PcmConvert: eliminate Open() and Close()
...
Let the constructor and destructor do this. This means that all users
have to be converted to allocate PcmConvert dynamically.
2019-04-04 21:01:08 +02:00
Max Kellermann
00b04468dc
filter/Convert: make in_audio_format const
2019-04-04 21:00:23 +02:00
Max Kellermann
8a07724b23
test/RunChromaprint: move class ChromaprintDecoderClient to lib/chromaprint/
2019-04-04 20:29:27 +02:00
Max Kellermann
5256929b17
tag/Chromaprint: move to lib/chromaprint/Context.hxx
2019-04-04 20:21:10 +02:00
Max Kellermann
093bf5d859
event/*, ...: make GetEventLoop() const
2019-04-04 20:07:57 +02:00
Max Kellermann
4f6144dc71
lib/curl/Init: add const
overloads
2019-04-04 20:06:43 +02:00
Max Kellermann
2d1493ed7a
lib/curl/Init: add noexcept
2019-04-04 20:06:20 +02:00
Max Kellermann
43677d5740
event/MaskMonitor: add noexcept
2019-04-04 19:54:17 +02:00
Max Kellermann
693815bb32
input/AsyncInputStream: add noexcept
2019-04-04 19:54:17 +02:00
Max Kellermann
58d7804d66
Client: eliminate SetExpired(), call Close() directly
2019-04-04 10:37:38 +02:00
Max Kellermann
ea5e6d8f33
Merge branch 'v0.21.x'
2019-04-04 10:29:58 +02:00
Max Kellermann
f6941f9a44
event/SocketMonitor: don't cancel if OnSocketReady() returns false
...
Expect OnSocketReady() to cancel events. If it returns false, the
SocketMonitor may be destructed already. This fixes a use-after-free
bug in the "httpd" output plugin.
2019-04-04 10:24:58 +02:00
Max Kellermann
d2eb4df8fc
event/{Fully,}BufferedSocket: add more API documentation
2019-04-04 10:24:58 +02:00
Max Kellermann
df33a898d7
zeroconf/Bonjour: fix OnSocketReady() return value
...
Keep the SocketMonitor registered. This wrong return value was added
6 years ago in commit 72cf8dd8a0
, andd
apparently, nobody ever noticed.
2019-04-04 10:24:29 +02:00
Max Kellermann
325c7b8e8b
output/httpd: close client connection on error
...
This missing piece probably never really hurt, because
HttpdClient::OnSocketClosed() would be called right after a socket
error, but it's better to be explicit about closing on error.
2019-04-04 09:39:22 +02:00
Max Kellermann
380656d8c9
output/httpd: add missing mutex lock
2019-04-03 22:53:03 +02:00
Max Kellermann
9111bc2c21
output/httpd: add more API documentation about locking
2019-04-03 22:49:25 +02:00
Max Kellermann
c1272c72b0
client/Process: reset the CommandListBuilder before processing it
...
Allows removing a CommandResult::CLOSE check.
2019-04-03 22:38:26 +02:00
Max Kellermann
7d1db5c19f
client/Process: refactor IsExpired() checks
2019-04-03 22:31:49 +02:00
Max Kellermann
2142d070a3
client/Process: refactor return
statements
2019-04-03 22:30:38 +02:00
Max Kellermann
9711cee26d
client/Process: update code comment
2019-04-03 22:30:18 +02:00
Max Kellermann
39baa4e364
client/Process: more strict syntax check
2019-04-03 22:29:43 +02:00
Max Kellermann
f339a53e3c
client/Process: move basic syntax check to the beginning of method
...
This catches lines within command lists as well.
2019-04-03 22:27:41 +02:00
Max Kellermann
d9117a272b
client/Response: use C++11 initializer
2019-04-03 21:53:20 +02:00
Max Kellermann
b8a8bdeaec
Permission: use IterableSplitString
2019-04-03 21:47:20 +02:00
Max Kellermann
8f20edac9d
Permission: pass StringView to ParsePermission()
...
Eliminates a temporary copy.
2019-04-03 21:45:01 +02:00
Max Kellermann
8499a662ea
Permission: add noexcept
2019-04-03 21:42:31 +02:00
Max Kellermann
3f05b7d8b4
client/New: include cleanup
2019-04-03 21:41:52 +02:00
Max Kellermann
1d563700a4
client/File: include cleanup
2019-04-03 21:40:12 +02:00
Max Kellermann
def6b936c8
client/Response: add noexcept
2019-04-03 21:38:09 +02:00
Max Kellermann
3610f55479
client/Write: add noexcept
2019-04-03 21:37:38 +02:00
Max Kellermann
6db84852ae
client/Listener: add noexcept
2019-04-03 21:36:02 +02:00
Max Kellermann
41dc36ba92
client/List: add noexcept
2019-04-03 21:34:53 +02:00
Max Kellermann
fe32db17d7
client/Internal: rename to Config.hxx
2019-04-03 21:31:32 +02:00
Max Kellermann
772aa4f165
client/Internal: move CLIENT_MAX_* to class Client
2019-04-03 21:28:46 +02:00
Max Kellermann
38298e0cd8
client/Internal: move client_domain to Domain.hxx
2019-04-03 21:26:16 +02:00
Max Kellermann
1213d979f8
client/*: rename source files, remove "Client" prefix
2019-04-03 20:59:00 +02:00
Max Kellermann
a9cb12b745
Client: make almost all attributes private
2019-04-03 20:16:08 +02:00
Max Kellermann
380f73c112
client/Process: convert functions to Client methods
2019-04-03 20:04:59 +02:00
Max Kellermann
9f79d034b3
client/Process: add noexcept
2019-04-03 20:04:31 +02:00
Max Kellermann
37b54179d8
net/IPv[46]Address: add cast to void* to fix GCC9 build failure
...
Fixes:
src/net/IPv4Address.hxx: In member function 'constexpr IPv4Address::operator SocketAddress() const':
src/net/IPv4Address.hxx:171:24: error: a reinterpret_cast is not a constant expression
171 | return SocketAddress((const struct sockaddr *)&address,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/net/IPv6Address.hxx: In member function 'constexpr IPv6Address::operator SocketAddress() const':
src/net/IPv6Address.hxx:138:24: error: a reinterpret_cast is not a constant expression
138 | return SocketAddress((const struct sockaddr *)&address,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Closes https://github.com/MusicPlayerDaemon/MPD/issues/522
2019-04-03 16:59:53 +02:00
Max Kellermann
4a745a399f
client: un-inline the destructor
2019-04-03 14:44:01 +02:00
Max Kellermann
c340485dd5
client: make GetEventLoop() public
2019-04-03 14:32:28 +02:00
Max Kellermann
f8570dd79f
encoder/opus: use new[] instead of xalloc()
2019-04-03 14:22:32 +02:00
Max Kellermann
7a1b56fe96
release v0.21.7
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlykiHUQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFErFWEACP0T0em6pKOV9W2YHivtnJoBhb3wG46a2w
rnyNuj0FM8nhMsWunvqbOExogGxZziTKYhSdvzOBwNSleG1Eyjks8yNuPpp7nHH/
Y5gyRr1o6BR4hkukWDAIBWN/iXatUWHb/itInN0KhrqyU0YptNGbOF87vLfAZlqW
MNVTXO4YAx/tYHEt/4ze/ljtrNvXsB8Zw86cNI+jrivdujdKVfiN5dUpbc5Hj8DA
3i6Y5YFm4OvHbFENeMy/kVht8Ln0/3Ak+Z9L7ti9ZSWLbOaQc7+Nl0P/3pfftzWf
YK6DsRyvJ2dEPylAXqRIkZWdIU1VwjKc7cKYJFljNAMhaUWcrefXIGQOv0+1kbqz
CxLgk3hIK3R7lGbxLXDU7xD05hbOGgXe1BKO9alGhEsyB8+sT6qfVay/RlJPN+da
mSnslSzPyS+p9ZdyDnWXq68FS8BIriajDVXP7/WNMKz9OEe5BiXBBQVDM5/XbxQU
qPxLn/BVYzDXOw8msgyIZ/vqE1rpomJDILsK/EMJ/HLAOdR/Jo10wIAGAqiLPp2j
n2R9jS7nxZKmEvcZkg/HroNiGSpT89f38bbW/MCdzxAkg4vQDxQ0OE9GoeBi3oiP
g/SkM/sJ9UdlC3bq7TAhxK0huimAEg5Rh6Z1II00D89QmWFQT0hjmxo++9WwCQXw
CkIiKRf7Ug==
=KzqS
-----END PGP SIGNATURE-----
Merge tag 'v0.21.7'
release v0.21.7
2019-04-03 12:32:20 +02:00
Max Kellermann
5201147ab1
input/curl: use std::throw_with_nested() instead of logging the exception
...
Let the caller decide what to do with the original exception.
2019-03-29 17:34:51 +01:00
Max Kellermann
fb7daa0d05
input/smbclient: use std::throw_with_nested() to construct PluginUnavailable
...
Preserve the original exception.
2019-03-29 17:32:23 +01:00
Max Kellermann
508e522188
PluginUnavailable: perfect forwarding in the constructor
2019-03-29 17:17:45 +01:00
Max Kellermann
2e9f3d8b9f
decoder/HybridDSD: downgrade log message to "debug"
...
This plugin is interesting only for a tiny fraction of MPD users, so
let's not spam everybody else's log with it.
2019-03-29 17:15:48 +01:00
Max Kellermann
976731ab6c
command/playlist: invoke the RemoteTagScanner on all newly added songs
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/234
2019-03-29 17:01:31 +01:00
François Revol
0d8942e64a
Haiku: remove redundant calls to delete_sem()
...
Fixes #184 .
Semaphores are kernel-managed objects, calling delete_sem() twice is not more
dangerous than calling close() twice on an fd though, it would just return
an error.
2019-03-29 14:33:49 +01:00
François Revol
37a0f04712
Haiku: add version info to the resources like win32 does
2019-03-29 14:33:27 +01:00
François Revol
cde9348009
Haiku: fix adding resources
...
The custom_command was run in src/haiku/ and created a file with only resources inside.
Since xres edits the file in-place and meson doesn't like it, we have to run a shell script for now.
Maybe later I'll add proper support in meson.
2019-03-29 14:32:59 +01:00
François Revol
9d0bf5e95c
Haiku: fix build
2019-03-29 14:32:06 +01:00
Max Kellermann
b1b630a4cc
command/database: support "sort" and "window" in more commands
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/516
2019-03-25 19:05:49 +01:00
Max Kellermann
c60d374fc8
db/DatabasePlaylist: pass DatabaseSelection to search_add_to_playlist()
2019-03-25 19:04:34 +01:00
Max Kellermann
de4fd4c059
command/database: move code to ParseDatabaseSelection()
2019-03-25 19:02:11 +01:00
Max Kellermann
95d8b30864
protocol/Ack: add noexcept
2019-03-25 19:01:34 +01:00
Max Kellermann
eb94f409d5
protocol/Ack: perfect forwarding in the ProtocolError constructor
2019-03-25 19:01:27 +01:00
Max Kellermann
ca4e53859d
Merge branch 'v0.21.x'
2019-03-25 08:11:07 +01:00
Max Kellermann
8b327f1d9b
filter/AutoConvert: implement Flush()
2019-03-24 22:42:06 +01:00
Max Kellermann
aef0507abb
filter/Filter: fix typo in API doc
2019-03-24 22:34:11 +01:00
Max Kellermann
61120d2059
filter/ffmpeg: use only one AVFrame
...
The two were never used at the same time, and merging them saves one allocation.
2019-03-24 22:29:57 +01:00
Max Kellermann
cc1822810f
filter/ffmpeg: use av_buffersrc_add_frame() instead of av_buffersrc_write_frame()
...
This transfers ownership of the buffer instead of adding another reference.
2019-03-24 22:28:40 +01:00
Max Kellermann
a21c6884f2
filter/ffmpeg: call av_frame_unref() before av_buffersink_get_frame()
...
Fix another memory leak.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/514
2019-03-24 22:27:48 +01:00
Max Kellermann
2700eed08d
filter/ffmpeg: remove unnecessary av_frame_make_writable() call
...
A newly allocated buffer doesn't need this call; it only adds overhead
for copying the data.
2019-03-24 22:26:09 +01:00
Max Kellermann
ec2badbedd
filter/ffmpeg: call av_frame_unref() before av_frame_get_buffer()
...
av_frame_get_buffer() leaks memory if buffers were already allocated.
Fixes one of the memory leaks of https://github.com/MusicPlayerDaemon/MPD/issues/514
2019-03-24 22:24:54 +01:00
Max Kellermann
054a7557fa
lib/ffmpeg/Frame: add av_frame_unref() wrapper
2019-03-24 22:21:35 +01:00
Max Kellermann
977a4570d9
Merge branch 'v0.21.x'
2019-03-21 11:49:41 +01:00
Max Kellermann
1d436b3c86
lib/ffmpeg/IOContext: keep using avio_read() with old libavformat versions
...
avio_read_partial() was added in libavformat 57.81.100, and we keep
compatibility with version 57.40 for now. Fixes regression from
commit bfb7b0117f
Closes https://github.com/MusicPlayerDaemon/MPD/issues/511
2019-03-20 13:15:05 +01:00
Max Kellermann
a854595886
event/ServerSocket: runtime error if abstract sockets are unavailable
2019-03-20 13:09:16 +01:00
Max Kellermann
8fc3c5c612
event/ServerSocket: add HAVE_UN check to AddAbstract()
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/510
2019-03-20 13:06:09 +01:00
Max Kellermann
4f408bd952
event/ServerSocket, doc, ...: refer to AF_LOCAL as "local socket"
...
.. and not "UNIX domain socket. Be consistent about the naming.
2019-03-20 12:57:26 +01:00
Max Kellermann
f86b14bfc5
tag/Chromaprint: relicense as BSD-2
2019-03-18 19:26:19 +01:00
Max Kellermann
ec5be91ff6
filter/ffmpeg: new filter plugin
2019-03-18 18:56:06 +01:00
Max Kellermann
a7a9490a0c
filter/hdcd: include cleanup
2019-03-18 18:55:25 +01:00
Max Kellermann
c0d6008781
filter/hdcd: move generic code to class FfmpegFilter
2019-03-18 18:35:23 +01:00
Max Kellermann
9f62824e98
filter/hdcd: fix typo
2019-03-18 18:32:20 +01:00
Max Kellermann
c673528cff
filter/hdcd: new filter plugin based on FFmpeg's "af_hdcd"
2019-03-18 13:48:24 +01:00
Max Kellermann
321f01b95c
filter/plugins/null: move code to src/filter/NullFilter.hxx
2019-03-18 13:48:24 +01:00
Max Kellermann
e88667e01c
lib/ffmpeg/Filter: add MakeAudioBuffer{Source,Sink}()
2019-03-18 11:05:13 +01:00
Max Kellermann
fb96907b52
lib/ffmpeg/Filter: add missing include
2019-03-18 11:05:13 +01:00
Max Kellermann
09ece26200
lib/ffmpeg/SampleFormat: add ToFfmpegSampleFormat()
2019-03-18 11:02:17 +01:00
Max Kellermann
0c6d22fe47
decoder/ffmpeg: move code to lib/ffmpeg/SampleFormat.hxx
2019-03-18 10:58:46 +01:00
Max Kellermann
c563eb81a3
lib/ffmpeg/Filter: C+++ wrapper for several libavfilter objects
2019-03-18 10:32:25 +01:00
Max Kellermann
e864a0dd05
lib/ffmpeg/meson.build: detect libavfilter
2019-03-18 10:30:02 +01:00
Max Kellermann
42a05bc904
lib/ffmpeg/Frame: add more wrapper methods
2019-03-18 10:29:26 +01:00
Max Kellermann
4722175049
Merge branch 'v0.21.x'
2019-03-18 10:01:00 +01:00
Jörg Krause
7f87de783f
src/lib/gcrypt/meson.build: use dependency() for quering linker flags
...
Since version 0.49.0 the Meson build system has native support for
finding and using the gcrypt library using the `dependency()` function.
`dependency()` has the advantage over `find_library()` as it queries the
required linker flags for proper linking with external libraries, e.g.
libgpg-error.
As the latest released version 1.8.4 of libgcrypt does not
provide a .pc file, using `libgcrypt-config` is the only way to query
the required linker flags.
Unfortunately, there is an issue when cross compiling mpd and the user does not
define `libgcrypt-config` in the cross file. If the user sets the qobuz feature
to `auto` and the target does not have libgcrypt installed, the Meson
build system will falsly assume libgcrypt is available for the target as
it uses the native `libgcrypt-config` on the host and pretend is has
found the library.
Therefore, we still rely on `find_library()` to workaround this buggy
behavior. This way, if qobuz feature detection is set to `auto`, the
feature is disabled in case there is no target libgcrypt available.
Fixes building mpd statically with the qobuz feature enabled. Otherwise
the build fails with undefined references because of the missing libgpg-error
dependency:
```
/sysroot/usr/lib/libgcrypt.a(libgcrypt_la-visibility.o): In function `gcry_strerror':
visibility.c:(.text+0x14): undefined reference to `gpg_strerror'
```
2019-03-18 09:12:19 +01:00
Max Kellermann
3a901098e9
release v0.21.6
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlyOz50QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEub0D/oDIXjCyFredPqElU6wgHKmJIWHXiPMIzY2
L5dK3ilGcON3ZDK4myoYvA5dkqat11u72x5TG3crcm8rITXuNJr93ONomZnfRvkq
NwG5JHcexJOOm/ppaE7xd0VmfifRlJWpm+nqgPrObvMz+dIWQIOojYOGLeLYxUvC
0i8mmfs6dIir+vpH13U9r3EPa78AZcuKttkZaK1ByaoK32RKAYPFIQvZgfWLI4Kj
RUOrH9piEOGVx+vKw54rj69S+a8Do0LtMhnzOWmfrG8XQzS4W6dsp6gunYsFA9gR
DZsERbu70JGJ8mrIKrrbXNT4/M06hTyAwob9PoRybi2aCP5BvfgBaM6qCeTNKKgQ
YNLXBZVMbF/hbkoPG+DiS9S5Meyp8T3GYjaT4Bi8GufJu7HGERPp721PPPJLeyBg
SpQo9SeS6xHA0bquQ1BJ3FV0JVn31w+taybMK+5eZqxS3xDjlVNorU2Dua2tkJKW
IoIdoTfsU498V3RgPYrefUt0jLKbfGHTiyL1vZ2inZyK0AswebKFYyIFZnHLXkO2
Pi2NOuE5RYmqRmB4TEwvLubP0nW5OI5lHCyvY/2GVjankPW5ufPtJMcpjs3hvx4Y
5ORmEJBx5d5Y2NG1rZdnWv+b4x02MA8eAD2L3pq7WJ148AkZD3ddBBm7MpIJuW/n
fFH7/jl30A==
=EnrO
-----END PGP SIGNATURE-----
Merge tag 'v0.21.6'
release v0.21.6
2019-03-17 23:58:54 +01:00
Max Kellermann
62a129c18f
PlaylistFile: ignore empty playlist names
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/465 and
https://github.com/MusicPlayerDaemon/MPD/pull/466
2019-03-17 23:46:36 +01:00
Max Kellermann
c18cd941aa
lib/xiph: disable Tremor detection if libvorbis was found
...
And disable libvorbis detection if Tremor was explicitly enabled.
This fixes a crash bug caused by libvorbis/Tremor ABI conflict caused
by commit 4f7d52dbf2
2019-03-17 23:36:52 +01:00
Max Kellermann
6d12c22653
decoder/ogg: ignore the BOS packet after seek to the beginning of song
...
Previously, MPD would skip the current song after attempting to seek
to its beginnig, because that was a seek to offset 0. At offset 0,
MPD will see the BOS packet again, which results in throwing
StopDecoder in MPDOpusDecoder::OnOggEnd().
Closes https://github.com/MusicPlayerDaemon/MPD/issues/470
2019-03-17 23:14:59 +01:00
Max Kellermann
b76d78e6ae
output/sles: enable power saving mode
2019-03-17 18:04:40 +01:00
Jacob Vosmaer
0a6e484b1a
output/plugins/OSXOutputPlugin: add boost meson dependency
2019-03-17 16:59:24 +01:00
Max Kellermann
a66097129d
Merge branch 'v0.21.x'
2019-03-16 14:08:22 +01:00
Max Kellermann
0bb71f1f20
output/pulse: use pa_channel_map_init_extend() instead of _auto()
...
Unlike pa_channel_map_init_auto(), pa_channel_map_init_extend() does
not fail if there is no valid mapping for the given channel count, but
instead maps additional "AUX" channels.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/493
2019-03-16 14:03:10 +01:00
Max Kellermann
1aa7cdd602
decoder/opus: fix replay gain when there are no other tags
...
The `tag_builder.empty()` check was wrong for the SubmitReplayGain()
call.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/497
2019-03-16 13:55:19 +01:00
Max Kellermann
3bf521d5ca
song/TagSongFilter: apply negation properly to multiple tag values
...
The old implementation didn't make a lot of sense; the "!=" operator
was not actually the opposite of "==".
Closes https://github.com/MusicPlayerDaemon/MPD/issues/505
2019-03-16 13:23:02 +01:00
Max Kellermann
0acb55cde5
song/StringFilter: remove obsolete #if
2019-03-16 13:23:02 +01:00
Max Kellermann
6b89fd6100
song/StringFilter: make MatchWithoutNegation() public
2019-03-16 13:23:02 +01:00
Max Kellermann
9e9418294a
song/TagSongFilter: eliminate Match(TagItem)
2019-03-15 20:28:27 +01:00
Max Kellermann
b850eb74b7
song/TagSongFilter: add code comments
2019-03-15 19:54:29 +01:00
Max Kellermann
67d73a2aee
song/TagSongFilter: improve lambda indent
2019-03-15 19:54:16 +01:00
Max Kellermann
fde9a470dd
song/TagSongFilter: eliminate the std::fill_n() call
2019-03-15 19:35:58 +01:00
Max Kellermann
8d1f30e55b
tag/Fallback: add API documentation
2019-03-15 19:23:10 +01:00
Max Kellermann
1881b0e975
song/TagSongFilter: rename MatchNN() to Match()
...
The "NN" suffix used to mean "no negation", but that's not how it's
implemented today.
2019-03-15 19:06:56 +01:00
Max Kellermann
eed4e40ec6
Merge branch 'v0.21.x'
2019-03-14 20:32:04 +01:00
Max Kellermann
6de57b36c7
song/TagSongFilter: eliminate the std::fill_n() call
2019-03-14 20:31:22 +01:00
Max Kellermann
98b29f6d1c
meson.build: remove the libwinpthread-1.dll dependency on Windows
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/507
2019-03-14 20:07:06 +01:00
Max Kellermann
59fdfd25cb
command/database: fix "list" with filter expression
...
Disable the 0.11 compatibility mode if the only argument is a filter
expression.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/506
2019-03-14 19:50:09 +01:00
Max Kellermann
0d98677212
playlist/flac: copy the URI to fix use-after-free bug
...
Closes https://github.com/MusicPlayerDaemon/MPD/issues/508
2019-03-14 19:30:33 +01:00
Max Kellermann
cb100f2e5c
input/ffmpeg: use avio_feof(), eliminate eof
attribute
2019-03-13 10:41:12 +01:00
Max Kellermann
bfb7b0117f
lib/ffmpeg/IOContext: allow partial reads
2019-03-13 10:39:43 +01:00
Max Kellermann
f6a705c769
input/ffmpeg: add AVIOContext wrapper class
2019-03-13 10:01:17 +01:00
Max Kellermann
0c01840a7e
input/ffmpeg: use C++11 initializer
2019-03-13 09:59:45 +01:00
Max Kellermann
b0b75c54de
input/ffmpeg: convert to class
2019-03-13 09:59:20 +01:00
Max Kellermann
3fc201d985
input/ffmpeg: add noexcept
2019-03-13 09:58:33 +01:00
Max Kellermann
5aa453ada3
input/ffmpeg: include cleanup
2019-03-13 09:57:50 +01:00
Max Kellermann
0009d53b3f
decoder/ffmpeg: add AVCodecContext wrapper class
2019-03-13 09:41:52 +01:00
Max Kellermann
05f7a6d1ff
decoder/ffmpeg: add AVFormatContext wrapper class
2019-03-13 00:27:21 +01:00
Max Kellermann
0256bbbbaf
decoder/ffmpeg: wider try/catch in ffmpeg_scan_stream()
2019-03-13 00:27:21 +01:00
Max Kellermann
bce608cdbc
decoder/ffmpeg: ffmpeg_decode() may throw
...
Don't catch and log exceptions. Let the caller handle the error.
2019-03-13 00:20:13 +01:00
Max Kellermann
38a0844cdf
decoder/ffmpeg: add AVFrame wrapper class
2019-03-12 23:51:46 +01:00
Max Kellermann
9acc6617d2
filter/registry: move extern
lines to plugin headers
2019-03-12 12:26:12 +01:00
Max Kellermann
4f72f49216
filter/normalize: clean up forward declarations
2019-03-12 12:24:31 +01:00
Max Kellermann
af9840daf7
util/Clamp: remove redundant inline
keywords from constexpr
functions
2019-03-12 11:54:51 +01:00
Max Kellermann
a67a9c9980
tag/Pool: remove redundant inline
keywords from constexpr
functions
2019-03-12 11:54:44 +01:00
Max Kellermann
732b2acf35
lib/upnp: remove redundant inline
keywords from constexpr
functions
2019-03-12 11:54:38 +01:00
Max Kellermann
16906cdcbe
fs/FileInfo: remove redundant inline
keywords from constexpr
functions
2019-03-12 11:54:31 +01:00
Max Kellermann
96e70659f0
lib/xiph/FlacAudioFormat: remove redundant inline
keywords from constexpr
functions
2019-03-12 11:53:13 +01:00
Max Kellermann
f2cacaf6b6
AudioFormat, pcm/Dsd*: remove redundant inline
keywords from constexpr
functions
2019-03-08 10:29:03 +01:00
Max Kellermann
24cde31328
lib/ffmpeg/Time: remove redundant inline
keywords from constexpr
functions
2019-03-08 10:28:02 +01:00
Max Kellermann
f6c0688684
util/ByteOrder: remove redundant inline
keywords from constexpr
functions
2019-03-08 10:23:14 +01:00
Max Kellermann
c176d94598
system/ByteOrder: move to util/
2019-03-08 10:21:10 +01:00
borine
c5df879cf9
decooder/plugins/PcmDecoderPlugin: add missing config for preproceesor macro definitions
2019-03-07 12:31:43 +00:00
borine
0762e5c289
decoder/plugins/PcmDecoderPlugin: guard alsa specific code with pre-processor macro test
2019-03-07 08:26:04 +00:00
borine
5d18559c1c
input/plugins/AlsaInputPlugin: change default device to default and default format to 48000:16:2
...
using the device "default" brings this plugin into line with the AlsaOutputPlugin; and a sample rate of 48kHz is more widely used as a native default for modern hardware than 44.1kHz
Also fixes an inconsistency between the docs and code.
2019-03-06 19:37:19 +00:00
borine
7db9c7f24e
input/plugins/AlsaInputPlugin: introduce mpd.conf config block to allow user to override the builtin defaults
2019-03-06 14:18:10 +00:00
borine
c834eb4590
input/plugins/AlsaInputPlugin: extend the alsa uri parsing to permit specification of the desired pcm audio format in the uri
2019-03-06 08:53:00 +00:00
borine
945ea51bd4
decoder/plugins/PcmDecoderPlugin: introduce new internal mime type "audio/x-mpd-alsa-pcm"
...
This mime type is to enable the AlsaInputPlugin to communicate the pcm stream audio format to the decoder
2019-03-06 08:39:47 +00:00
Max Kellermann
38f0c16904
system/UniqueFileDescriptor: add CreatePipeNonBlock()
2019-02-27 23:30:56 +01:00
Max Kellermann
4fbf6b6c95
net/StaticSocketAddress: remove GetAddress()
2019-02-27 23:26:59 +01:00
Max Kellermann
1f8ff48168
net/StaticSocketAddress: add GetLocalRaw()
2019-02-27 23:26:00 +01:00
Max Kellermann
20b6e0d684
net/SocketDescriptor: add SetTcpUserTimeout()
2019-02-27 23:22:12 +01:00
Max Kellermann
713c1f2ba9
Merge branch 'feature/playlist' of git://github.com/miccoli/MPD
2019-02-27 13:49:22 +01:00
Stefano Miccoli
b3a458338a
allow loading playlists specified as absolute filesystem paths
...
implement for the "load" command the same logic used for the "add"
command: local clients can load playlist specified as absolute paths.
For relative paths the old logic is preserved: first look for a stored
playlist, then look in the music directory.
2019-02-26 00:12:09 +01:00
Max Kellermann
44422b2b2f
event/ServerSocket, config/Net: abstract socket support
2019-02-25 13:08:33 +01:00
Thomas Zander
4c50a5e0b3
Ensure SEEK_SET is set on systems where stdio.h is not pulled in by accident.
2019-02-23 18:04:00 +01:00
Max Kellermann
83f7610dd1
storage/udisks2: move empty string check out of the fallback block in MapUTF8()
...
Even if the LocalStorage is available, return the "udisks://" URI when
the MapUTF8() parameter is an empty string. This fixes the mount URI
in the state file.
2019-02-22 15:07:40 +01:00
Max Kellermann
30e0644722
db/simple: call ReturnSong() on mounted database
...
Fixes a memory leak, or an assertion failure in the debug build.
2019-02-22 14:52:13 +01:00
Max Kellermann
3ada464020
db/simple: use C++11 initializer
2019-02-22 14:52:01 +01:00
Max Kellermann
d5983dd362
storage/udisks2: use the relative path
...
Closes #487
2019-02-22 14:41:56 +01:00
Max Kellermann
98258acc37
storage/udisks2: pass Path to SetMountPoint()
2019-02-22 14:41:56 +01:00
Max Kellermann
834ad7a58f
TagPrint: omit tags which were disabled by the client
...
Closes #471
2019-02-22 13:05:38 +01:00
Max Kellermann
e8f2f98048
tag/Mask: fix another typo, this time in operator^=
...
Similar to commit ff1ff1e54a
2019-02-22 12:44:36 +01:00
Max Kellermann
bbaeea1ab7
storage/udisks2: use existing mount point if already mounted
...
Fixes the "org.freedesktop.UDisks2.Error.AlreadyMounted" error.
Closes #485
2019-02-21 13:32:03 +01:00
Max Kellermann
0a3aee9d82
storage/udisks2: move code to SetMountPoint()
2019-02-21 13:31:59 +01:00
Max Kellermann
2434020971
storage/udisks2: adjust lambda indent
2019-02-21 13:31:57 +01:00
Max Kellermann
41e0eb7378
lib/dbus/udisks2: parse the MountPoints property
2019-02-21 13:28:26 +01:00
Max Kellermann
6adf964c81
lib/dbus/ReadIter: add dbus_message_iter_get_fixed_array() wrapper
2019-02-21 12:56:05 +01:00
Max Kellermann
b59f37bc0a
db/simple/Directory: close the Database in destructor
...
Fixes assertion failure.
2019-02-20 22:50:15 +01:00
Max Kellermann
cf2d171ccc
db/simple: reorder checks in assert() to fix assertion failure
...
`light_song.Get()` could cause an assertion failure because the
`Manual<>` object must not be used if uninitialized.
Regression by commit ebc006ab52
2019-02-20 21:24:01 +01:00
Max Kellermann
cc28a7b67f
Main: create Database on stack, move to Instance after Open() succeeded
...
This fixes use-after-free bug in SimpleDatabase::Close(), accessing
the `root` object which was already freed by the `catch` block in
Open().
By having the Database on the stack first, we can avoid calling
Close() on the failed-to-open Database from Instance's destructor.
Closes #482
2019-02-20 20:50:28 +01:00
Max Kellermann
8b5c33cecd
Instance: use std::unique_ptr<> to manage the Database pointer
2019-02-20 20:48:20 +01:00
Max Kellermann
6c28adbcd2
db/Plugin: use std::unique_ptr<> to manage Database pointers
2019-02-20 20:43:31 +01:00
Max Kellermann
2125e3ed57
db/simple/Directory: add noexcept
2019-02-20 20:39:49 +01:00
Max Kellermann
3da7ecfadf
mixer/pulse: add missing ParseFloat() check
2019-02-20 19:27:13 +01:00
Max Kellermann
5bb02bbd39
mixer/pulse: move volume_scale_factor
up to improve struct packing
2019-02-20 19:25:55 +01:00
Max Kellermann
f11aa09f7c
mixer/pulse: add const
to volume_scale_factor
2019-02-20 19:25:53 +01:00
Max Kellermann
02eb4752d3
mixer/pulse: use C++11 initializer
2019-02-20 19:25:45 +01:00
Max Kellermann
d9c3215584
mixer/pulse: rename scale
to scale_volume
...
Make it less generic, to avoid clashes.
2019-02-20 19:23:11 +01:00
Clément Pit-Claudel
110e6d026b
mixer/pulse: Add a new 'scale' parameter to allow volumes above 100
...
Closes GH-479.
2019-02-17 16:14:52 -05:00
Max Kellermann
c0f57b8a8b
net/IPv[46]Address: update copyright
2019-02-19 13:00:45 +01:00
Max Kellermann
57633fbcb3
net/AllocatedSocketAddress: add methods IsV6Any(), IsV4Mapped()
2019-02-19 12:51:24 +01:00
Max Kellermann
864c87e6c0
net/SocketAddress: add method GetLocalPath()
2019-02-19 12:50:40 +01:00
Max Kellermann
1a516cf3c0
net/AllocatedSocketAddress: add method GetLocalRaw()
2019-02-19 12:43:16 +01:00
Max Kellermann
5c25499c5e
lib/cdio/Paranoia: add method GetDiscSectorRange()
2019-02-19 12:40:36 +01:00
Max Kellermann
da4bb4c298
fs/io/OutputStream: update include guard
2019-02-19 12:39:29 +01:00
Max Kellermann
5b8ff61799
fs/io/BufferedOutputStream: add WithBufferedOutputStream()
2019-02-19 12:37:53 +01:00
Max Kellermann
56bded07b1
system/UniqueFileDescriptor: import std::swap
2019-02-19 12:36:54 +01:00
Max Kellermann
db144a43ad
system/Open: add OpenWriteOnly(), OpenDirectory()
2019-02-19 12:16:41 +01:00
Max Kellermann
5965f62b56
system/EpollFD: include cleanup
2019-02-19 11:51:52 +01:00
Max Kellermann
05aa9f72a9
util/StringView: add SkipPrefix(), RemoveSuffix()
2019-02-19 11:51:32 +01:00
Max Kellermann
281461f0f0
nfs: work around assertion failure on exception during program init
...
Closes #477
2019-02-15 18:33:58 +01:00
Max Kellermann
f70eb63879
Instance: eliminate FinishShutdownUpdate(), move code to destructor
2019-02-15 18:20:11 +01:00
Max Kellermann
99c23cf139
Instance: eliminate ShutdownDatabase(), move code to destructor
...
Destruct automatically, even if leaving the scope due to exception
being thrown.
2019-02-15 18:04:23 +01:00
Max Kellermann
e9c45a9140
playlist/Registry: add RAII class
2019-02-05 23:03:29 +01:00
Max Kellermann
a065c6e6b9
Main: use AtScopeExit() to call DeinitFS()
2019-02-05 23:02:50 +01:00
Max Kellermann
feb5ff9bd2
Mapper: remove empty function mapper_finish()
2019-02-05 23:01:09 +01:00
Max Kellermann
98c47d9d36
Instance: remove FinishShutdownPartitions()
...
The list of partitions is cleared automatically.
2019-02-05 22:53:02 +01:00
Max Kellermann
6c67408944
event/Loop: add flag alive
...
This replaces the old `dead` flag which was unreliable; it was `false`
if the EventThread was not yet started, which could cause deadlocks in
BlockingCall().
2019-02-05 22:38:45 +01:00
Max Kellermann
261a816b21
command/AllCommands: remove empty function command_finish()
2019-02-05 22:15:41 +01:00
Max Kellermann
7a23c123c8
decoder/List: add RAII class
2019-02-05 22:12:22 +01:00
Max Kellermann
e85b24bee0
decoder/List: add noexcept
2019-02-05 22:11:51 +01:00
Max Kellermann
9e73ea77b4
input/Init: add RAII class
2019-02-05 22:07:49 +01:00
Max Kellermann
848f6aa5ab
Main: stop io_thread and rtio_thread automatically
...
They will be stopped by ~EventThread() when the `Instance` is deleted.
2019-02-05 21:49:59 +01:00
Max Kellermann
c9ba4f3f9c
archive/List: add RAII class
2019-02-05 21:40:07 +01:00
Max Kellermann
c0e9246a66
archive/List: add noexcept
2019-02-05 21:38:46 +01:00