Max Kellermann
a17a481e30
event/BufferedSocket: add "noexcept"
2017-12-20 10:42:17 +01:00
Max Kellermann
914df18bf9
Main, ...: catch any exception, not just std::runtime_error
2017-12-19 10:56:23 +01:00
Max Kellermann
e2c81aa9ea
Merge branch 'v0.20.x'
2017-11-14 12:31:13 +01:00
Max Kellermann
014f8cd693
output/httpd: flush encoder after tag
...
Without the flush, ReadPage() may not return any data, or not all
data. This may result in incomplete ddata the new "header" page,
corrupting streams with some encoders such as Vorbis.
Fixes #145
2017-11-14 12:00:14 +01:00
Max Kellermann
6464b4b372
encoder/Configured: glue code to initialize PreparedEncoder
2017-11-10 21:54:57 +01:00
Max Kellermann
13816c1c7d
output/{recorder,httpd,shout}: use std::unique_ptr to manage PreparedEncoder pointer
2017-11-10 21:35:22 +01:00
Max Kellermann
c54a920d13
output/httpd: make enum strictly-typed
2017-11-10 21:25:03 +01:00
Max Kellermann
83f8eeec44
output/httpd: migrate from DeferredMonitor to DeferEvent
2017-11-10 21:18:00 +01:00
Max Kellermann
b83fbad6a1
output/httpd: use C++11 initializers
2017-11-10 21:15:57 +01:00
Max Kellermann
0ff4350352
event/ServerSocket: pass UniqueSocketDescriptor by value
...
Passing it by value is actually smaller (32 bit) than the rvalue
reference (64 bit pointer), and it ensures that the object is consumed
after the call returns, no matter how the methods are implemented.
2017-11-10 20:43:14 +01:00
Max Kellermann
5fd2b7cc79
event/SocketMonitor: eliminate Read(), Write()
...
Migrate callers to GetSocket().Read(), GetSocket.Write(), which is the
same.
2017-11-10 20:37:52 +01:00
Max Kellermann
59a8836924
event/SocketMonitor: add "noexcept"
2017-11-10 20:20:07 +01:00
Max Kellermann
d0f6131ba4
output/Interface: allow Pause() to throw exception
...
Coverity discovered that the Pulse plugin could throw exceptions from
Pause(), but that method was marked "noexcept" because its caller was
not designed to catch exceptions. So instead of avoiding exceptions
(by catching and logging them in each and every implementation), let's
allow them, and do the catch/log game in the MPD core.
2017-09-08 14:45:53 +02:00
Max Kellermann
33b4114534
system/fd_util: remove unused library
2017-08-11 09:20:15 +02:00
Max Kellermann
9a5bcc6db0
net/ServerSocket: pass UniqueSocketDescriptor&& to OnAccept()
2017-08-10 19:20:14 +02:00
Max Kellermann
492b20a89d
event/SocketMonitor: use class SocketDescriptor
2017-08-10 19:19:58 +02:00
Max Kellermann
fcfc8bacc0
output/httpd: remove obsolete accept() error check
2017-08-10 19:19:53 +02:00
Max Kellermann
54de8b8e77
net/*, ...: use AF_LOCAL instead of AF_UNIX
2017-08-10 13:12:13 +02:00
Max Kellermann
31bad5f7af
output/Interface: convert to abstract class
...
Yet another C-style vtable replaced with C++.
2017-08-10 09:01:41 +02:00
Max Kellermann
bea5681fd8
output/Interface: define a new struct AudioOutput
...
Hide struct FilteredAudioOutput from the plugins, preparing for hiding
MPD's core internals.
2017-08-08 18:58:40 +02:00
Max Kellermann
47c9d6ac64
output/Internal: rename source to Filtered.cxx
2017-08-07 21:50:13 +02:00
Max Kellermann
d0157af13e
filter/Internal: rename struct AudioOutput to FilteredAudioOutput
...
Prepare to add an abstract class AudioOutput, to be implemented by
plugins, to get rid of the C-style vtable.
2017-08-07 18:47:39 +02:00
Max Kellermann
dad7d7e798
util/TruncateString: rename CopyString() to CopyTruncateString()
2017-07-05 17:15:58 +02:00
Max Kellermann
4b94ae8040
util/StringUtil: move CopyString() to TruncateString.cxx
2017-07-05 17:11:34 +02:00
Max Kellermann
979f1b6c39
release v0.20.9
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkz5jkQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEubuD/kBXMcV4XawqGNNtSHdrY8CxSL8wJMCMJQl
aMgRkKLPRml8Hj9FNNG9pjXBuT+qUgPX7t9gBEiT7c+sV3fHH40gUf1js5GIsEPm
BAVfvww5EhmQWWVhPTLk1iZ4jp6E96mDmIG1znwo7etSZHXU8RJfR7woBi3SPJ9f
OPcrimskNuWpAWeaEIKi/1Iwzy8d9VK9Ttb73gA3M5zSm7ioXzt3YClpwLRM8JU6
QeUJchy6VwXnygswjUNmbhPc3GsD2FyUZ4OtJ0hodnqqajfldBxhcHUnQk4zZULr
1nLSyOuA9bwLuFohH1T6HiY9z8PFzgqdIHvsjOJgZ4gQa69PVNjal2tUEUav9zFv
aK4LvTVPnIk+hqRbtLpV7/rPKuClrC9BO4oYdBGBDNY4hqVpvRA9obP1s00aOi+K
UhYqLqg7yeIEeTlUxFOhXJCKAEL69BuXT5ihJtDlB/dCUzv37sEch/4WDgs7uc+O
9kJYlElvozw57mbczsee/PCSnSWrLCq/qG/bNEUUQOTueWNuifh3PL62UXGgfbEH
01hJDyLr6ETSmWn7rjTfLJiHThX/EQQvOhs+35fbCyry65z4tFwrilGDmFVUWGPq
/6QEpY1D6q4fkoma/iWOZoTkfKewatAPGMGWoJaGhCnfQFz4VTFtS2bDtuUctQ16
jnXnPFxqBw==
=0SSp
-----END PGP SIGNATURE-----
Merge tag 'v0.20.9'
release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann
a057b4f6d8
*: add lost of "noexcept" specifications
2017-06-04 12:46:48 +02:00
Max Kellermann
ae4b30a697
output/httpd: add "pause" flag
...
Don't access AudioOutput::pause.
2017-05-23 11:13:41 +02:00
Max Kellermann
59e4f1ee0f
*: remove lots of GCC 4.8 fallback code
...
We can remove those C++11 and C++14 kludges because we require GCC 4.9
now.
2017-05-16 11:29:15 +02:00
Max Kellermann
4faef28cc5
release v0.20.7
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkaFL0QHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEr4ID/9iAQC+7fFv06uLOm48Ufu+PgoD8uJkAwF5
QuLQkc85g9urn+bu9N7Qs7Vypp7aLyGcJKY0jyA8wxkOj24pUC3GYk80daUt561V
5s20FnoS/Uoman3CSJL94IfCUBxejizE6vgIIHTc5bb6U0qIsPub/8JTTE2Ih7uP
nvFZ5uBQ+YTc7at+iIH9123eUMKkitkh8osNblovqQT9v42++Tm4ztAytRHBjwUA
Itew5HhlvahbLKqFs/7vmICh/YX1FcOV7cV+erEWYfkH0KCI2bhSle4u2d0CBOvD
VJlDnBCo9bM7WKcPYqJiFFFXA0CRk06wbkkkAtwF4zjp8xos7aQcq4FyQnYL8KXo
5lijIhRwBURBd+nt8oA9kuEhBt/T75otcemJkzVaYappHTJCLjhxSGcPt8mw+nE9
9WQzsp/MIVzg9l5g3D9S/43xM7uhvn98Tn1Qf2s8YRd2o8CZeOhW+X3RvbCvVPv2
mOlx4sFAv8DOJ3KxMdqiJT+PmylPyJluQdqH+tMc8BdPg/kpSpYIPTuSjjRqK1yh
ld5do0HtAAwiHtvXfk5YVFjJSpO0c8yVn6xci2Cl4k/5ZHj2UE1ln+N5vCea2BRF
2J3HAjROwtcwY3lU1jFnEAogf24KWiFJqhhC0EqBGUdlrM8Dn37P5cEWWjROIMNK
lPEdovokNw==
=CdDy
-----END PGP SIGNATURE-----
Merge tag 'v0.20.7'
release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann
71f0ed8b74
*: add "noexcept" to many, many function prototypes
...
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann
89b900432e
output/Internal: move thread-specific stuff to AudioOutputControl
...
The AudioOutput struct (which is exposed to all plugins) should not be
aware that it's being controlled by another thread.
2017-04-28 22:04:30 +02:00
Max Kellermann
dae8b78569
output/httpd: copy the Page reference; fixes use-after-free
2017-03-29 20:17:09 +02:00
Max Kellermann
512e81c629
output/httpd: use emplace() instead of push()
2017-02-19 20:48:17 +01:00
Max Kellermann
452666f742
output/httpd: wake up the I/O thread only if pages have been read from encoder
2017-02-19 20:46:20 +01:00
Max Kellermann
72008d951b
output/httpd: no mutex lock while reading data from encoder
2017-02-19 20:45:16 +01:00
Max Kellermann
72146e7800
output/httpd: use std::lock_guard
2017-02-19 20:43:45 +01:00
Max Kellermann
f7af1bb8e2
output/httpd: cancel the DeferredMonitor in Close()
2017-02-19 20:41:34 +01:00
Max Kellermann
f88f1fca3f
output/httpd: move Close() lock into the I/O thread
...
Fixes a potential deadlock introduced by commit 945287358b
2017-02-19 20:41:06 +01:00
Max Kellermann
26e4a40cc7
output/httpd/Page: use std::shared_ptr instead of class RefCount
2017-02-19 20:17:57 +01:00
Max Kellermann
8b1931072a
output/httpd/Page: no variable size, use AllocatedArray
...
Using variable-size objects is not worth the trouble here. Let's drop
this and use existing and simpler code.
2017-02-19 20:13:41 +01:00
Max Kellermann
45e15b6cc6
output/httpd/Page: make all attributes private
2017-02-19 20:13:35 +01:00
Max Kellermann
be7e52c882
output/httpd/Page: remove unused method Concat()
2017-02-19 20:13:19 +01:00
Max Kellermann
4162ce0bc5
output/httpd/Page: use uint8_t instead of unsigned char
2017-02-19 19:49:53 +01:00
Max Kellermann
7e46277016
Merge branch 'v0.20.x'
2017-02-19 19:46:18 +01:00
Max Kellermann
4bb83781e8
output/httpd/IcyMetaDataServer: cast length to unsigned
...
Fixes another buffer overflow: if the stream has a very long title or
URL, resulting in a metadata string of more than 2 kB, icy_string[0]
is a negative value, which gets casted to size_t - ouch!
https://bugs.musicpd.org/view.php?id=4652
2017-02-19 19:28:52 +01:00
Max Kellermann
a73195b7cc
output/httpd/IcyMetaDataServer: pad the string with 15 spaces
...
Fixes a buffer overflow due to the bad formula rounding the buffer
size up. At the same time, remove the "+1" from the meta_length
calculation, which takes the padding into account and at the same time
implements proper rounding.
2017-02-19 19:27:37 +01:00
Max Kellermann
1bd00b8a9a
output/httpd/IcyMetaDataServer: remove the int cast
...
Why did this cast exist??
2017-02-19 19:27:37 +01:00
Max Kellermann
03a97d87ea
tag/Tag*: rename several source files
2017-02-08 08:49:42 +01:00
Max Kellermann
8fd9d91974
output/Plugin: pass EventLoop& to init()
...
Eliminate dependency on io_thread_get().
2017-01-25 22:54:41 +01:00
Max Kellermann
8d70d10aba
output/httpd: use AudioOutputWrapper
2017-01-25 10:05:08 +01:00