Max Kellermann
d29d186d62
output/alsa: use a new I/O thread with real-time scheduling
...
The normal I/O event thread can have a large latency, e.g. when
libgnutls loads all TLS CA certificates for a https connect. This
makes it unreliable for the ALSA I/O notifications, and causes ring
buffer xruns. To avoid interfering with high latency events such as
CURL's, we move the ALSA I/O events to a separate I/O thread which
also obtains real-time scheduling (if possible).
Closes #221
2018-02-16 22:38:55 +01:00
Max Kellermann
ce2b6dc84d
RemoteTagCache: new glue class for integrating RemoteTagScanner
...
This commit also puts an instance of RemoteTagScanner into the
Instance class, and hooks it into the "add" and "addid" commands.
2018-01-30 00:05:57 +01:00
Max Kellermann
52da387a1d
Main: move part of the shutdown code to Instance methods
2018-01-29 23:45:48 +01:00
Max Kellermann
befd669075
Instance: rename Shutdown() to Break()
2018-01-29 23:31:41 +01:00
Max Kellermann
7027da3cd3
Instance: un-inline the destructor
...
Allows more forward declarations.
2018-01-29 18:43:10 +01:00
Max Kellermann
cd6de3b24e
neighbor/{Explorer,Listener}: add "noexcept"
2018-01-02 16:58:14 +01:00
Max Kellermann
c5996c0593
*: add "noexcept" to many, many function prototypes
...
See commit 71f0ed8b74
2017-05-15 23:05:45 +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
788e3b31e1
*: remove "pure" and "const" attributes from throwing functions
...
The "pure" and "const" attributes are not so well-defined, and a
recent clang version implements an optimization which pushes the
definition's boundary beyond what I believed it was. clang now
assumes that functions declared "pure" cannot throw exceptions, even
if they lack the "noexcept" specification.
When compiled with this new clang version, MPD will crash randomly if
an exception happens to get thrown by such as "pure" function
(https://github.com/MusicPlayerDaemon/MPD/issues/41 ).
This commit removes all such misplaced "pure" and "const" attributes,
closing #41 .
2017-05-08 17:25:06 +02:00
Max Kellermann
e48ea5f23a
Instance: add method FindPartition()
2017-02-25 10:26:33 +01:00
Max Kellermann
77178e0590
Instance: make "partition" a std::list
...
With this commit, multi-player support becomes possible... it's just
not wired to the frontend yet.
This is based on massive amounts of refactoring work I did over the
past 9 years.
2017-02-17 23:22:29 +01:00
Max Kellermann
9a909d9f27
Instance: un-inline the constructor
2017-02-17 23:22:05 +01:00
Max Kellermann
90d25a40a0
Instance: use C++11 initializer
2017-02-17 23:21:55 +01:00
Max Kellermann
5e081de14a
IOThread: move EventThread instance into struct Instance
...
Eliminate global variables.
2017-02-10 22:25:06 +01:00
Max Kellermann
5900253b85
update copyright year
2017-01-03 20:48:59 +01:00
Max Kellermann
22dcca9832
util/Error: remove obsolete class
2016-11-10 12:58:26 +01:00
Max Kellermann
8d41e9658f
Instance: remove Error parameter from GetDatabase()
2016-10-26 18:52:00 +02:00
Max Kellermann
086652dd50
Instance: add GetDatabaseOrThrow()
2016-10-26 18:47:19 +02:00
hawken
8f196db778
Fix for segfault on uninitialized state_file
2016-10-12 12:18:44 +02:00
Max Kellermann
863f4d8366
util/BindMethod: new utility class for callbacks
...
Replaces the old BoundMethod template.
2016-06-17 18:20:19 +02:00
Max Kellermann
2edad38c7c
db/DatabaseListener: pass URI to OnDatabaseSongRemoved()
...
There's no point in passing a LightSong reference here; the callee is
interested only in the URI.
2016-03-18 16:22:33 +01:00
Max Kellermann
f254831aa6
Instance: remove redundant "virtual" keywords
2016-03-10 23:16:35 +01:00
Max Kellermann
5ca6026787
Partition: use CallbackMaskMonitor, replacing class GlobalEvents::Monitor
2016-03-10 22:52:16 +01:00
Max Kellermann
483daa5882
Instance: move GlobalEvents::Monitor to Partition
...
All remaining events are specific to the Partition.
2016-03-10 22:47:47 +01:00
Max Kellermann
e2bc92d128
Instance: replace IdleMaskMonitor with CallMaskMonitor
2016-03-10 22:38:10 +01:00
Max Kellermann
5ffb82993e
IdleMonitor: new class to replace GlobalEvents::IDLE
...
Use MaskMonitor to eliminate duplicate code.
2016-03-10 20:32:43 +01:00
Max Kellermann
07add0bd91
Instance: add base class which owns the EventLoop
2016-03-10 20:32:35 +01:00
Max Kellermann
031410c72b
Instance: add StateFile* attribute
2016-03-05 21:00:38 +01:00
Max Kellermann
0e87ce4680
GlobalEvents: expose the internal class
...
Move the GlobalEvents::Monitor instance into class Instance.
Eliminate all global variables.
2016-03-05 20:23:30 +01:00
Max Kellermann
b4d594eeff
Instance: embed EventLoop, no pointer
2016-03-05 20:20:12 +01:00
Max Kellermann
23ab4e5e5f
Instance: add method Shutdown()
2016-03-05 18:56:16 +01:00
Max Kellermann
8e563cbccd
Instance: use C++11 initializers
2016-03-05 18:55:57 +01:00
Max Kellermann
1d67aa7bf2
update copyright year to 2016
2016-02-26 17:54:05 +01:00
Max Kellermann
712ed555e6
Copyright year 2015
2015-01-01 19:48:13 +01:00
Max Kellermann
a9fefcf600
Main: wrap the Storage instance in CompositeStorage
2014-02-09 11:07:08 +01:00
Max Kellermann
522ad4cca6
Instance: narrow "storage" to class Storage
2014-02-06 07:19:14 +01:00
Max Kellermann
4c995eb498
db/UpdateWalk: move LocalStorage to Instance
...
Keep only a reference.
2014-02-05 17:58:13 +01:00
Max Kellermann
d380db25be
Instance: add attribute "event_loop"
...
Replaces global variable "main_loop".
2014-02-05 00:09:36 +01:00
Max Kellermann
ff665b37cb
db/DatabaseListener: add method OnDatabaseSongRemoved()
...
Decouples db/update/Remove.cpp from global variables.
2014-02-04 19:53:37 +01:00
Max Kellermann
bae6f653d1
Instance: merge DatabaseModified() into OnDatabaseModified()
2014-02-04 19:17:22 +01:00
Max Kellermann
cf6281a5a7
Instance: add Database attribute
...
Move from db/DatabaseGlue.cxx, eliminating global variable.
2014-02-04 11:22:33 +01:00
Max Kellermann
f00710a57e
Main: create UpdateService instance in glue_db_init_and_load()
2014-02-04 11:22:32 +01:00
Max Kellermann
4465e2c46b
db: add compile-time option to disable database
2014-01-30 20:39:40 +01:00
Max Kellermann
c6725884bc
db/update: convert to OO API
...
Move global variables into the new classes. That may allow multiple
update threads for multiple databases one day.
2014-01-30 18:47:05 +01:00
Max Kellermann
5c4a42caa0
neighbor: new subsystem to detect file servers on the local network
...
This commit adds the NeighborPlugin API which can be used to detect
nearby file servers that can be used by input plugins. This list of
servers is exported using the new "listneighbors" command. The idle
even "neighbor" notifies interested clients when a new neighbor is
found or an existing one is lost.
There's a lot missing currently: protocol&user documentation, and a
way to "mount" remote servers into the music database. Obviously,
some code from the UPnP database plugin can be moved to a neighbor
plugin.
2014-01-26 00:10:05 +01:00
Max Kellermann
9d34fc394c
Database*: move to db/
2014-01-24 16:38:44 +01:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Max Kellermann
114df1f137
DatabasePlugin: add interface DatabaseListener
...
Allow database plugins to announce that they have been modified.
2014-01-11 01:01:54 +01:00
Max Kellermann
322b061632
DetachedSong: fork of struct Song
...
From now on, struct Song will be used by the database only, and
DetachedSong will be used by everybody else. DetachedSong is easier
to use, but Song has lower overhead.
2014-01-09 09:05:58 +01:00
Max Kellermann
2f43e4bc66
Playlist: copy stream tags from the PlayerThread
...
Finally restores an important feature that has been broken for several
months when the PlayerThread started working with Song copies instead
of pointers to the Queue's Song instances (commit e96779d
).
2013-10-22 00:02:21 +02:00