Max Kellermann
49f34fbf68
DecoderBuffer: use NewVarSize()
2014-01-07 23:31:26 +01:00
Max Kellermann
fe6094a822
tag/TagPool: use NewVarSize() to allocate TagPoolSlot
2014-01-07 23:24:59 +01:00
Max Kellermann
8a30c7992d
tag/TagPool: rename struct slot to TagPoolSlot
2014-01-07 23:12:24 +01:00
Max Kellermann
70eb9335bd
tag/TagPool: use gcc_packed instead of mpd_packed
...
By accident, this declared a global variable instead of adding the
"packed" attribute.
2014-01-07 23:11:00 +01:00
Max Kellermann
da80f91e1c
Directory: make some code generic, move to VarSize.hxx
2014-01-07 23:10:56 +01:00
Max Kellermann
cc60d193ce
Directory: use g_malloc() instead of g_malloc0()
...
Explicit attribute initialization.
2014-01-07 23:10:56 +01:00
Max Kellermann
3a05c421e0
doc/user: fix typo
2014-01-07 18:06:58 +01:00
Max Kellermann
0f99410ba1
playlist/soundcloud: parse URI without copying it
2014-01-07 10:21:42 +01:00
Max Kellermann
442dadd6fe
playlist/soundcloud: change scheme check to assertion
...
The MPD core takes care for checking the scheme.
2014-01-07 09:40:31 +01:00
Max Kellermann
da9dd58f34
playlist/soundcloud: eliminate nullptr checks before g_free()
2014-01-07 09:27:50 +01:00
Max Kellermann
bd01d80ffc
pcm/Utils: remove unused function pcm_end_pointer()
2014-01-07 00:46:47 +01:00
Max Kellermann
7eda72d440
pcm/Volume: use number of samples instead of end pointer
2014-01-07 00:42:02 +01:00
Max Kellermann
c75339edcc
pcm/Format: change parameters/return values to ConstBuffer
2014-01-06 23:08:49 +01:00
Max Kellermann
b0b7244b3a
pcm/Format: use number of samples instead of end pointer
2014-01-06 22:42:33 +01:00
Max Kellermann
a9e849ff4f
DecoderBuffer: _read() returns ConstBuffer object
2014-01-06 22:17:30 +01:00
Max Kellermann
4c95a4d7c6
DecoderBuffer: add "pure" attributes
2014-01-06 22:16:56 +01:00
Max Kellermann
eac9fabd48
DecoderBuffer: add method _clear()
2014-01-06 21:59:43 +01:00
Max Kellermann
e2a08fa824
decoder/faad: make variables more local
2014-01-06 21:57:40 +01:00
Max Kellermann
d403749d09
decoder/faad: eliminate local variable "ret"
2014-01-06 21:57:40 +01:00
Max Kellermann
582c2105a9
event/Loop: cancel the WakeFD monitor in destructor
2014-01-06 21:57:40 +01:00
Steven O'Brien
f39a34ccfa
input/AlsaInputPlugin.cxx: use I/O thread to poll for available data
...
[mk: modified to use MultiSocketMonitor instead of SocketMonitor]
2014-01-06 18:27:44 +01:00
Max Kellermann
08f5b9f1f9
event/MultiSocketMonitor: add method ClearSocketList()
2014-01-06 18:27:26 +01:00
Max Kellermann
793962c5b8
event/SocketMonitor: don't close the socket automatically
...
Users now have to call Close() explicitly. This simplifies using the
class, as most users have automatic socket management already, and
Steal() had to be used often.
2014-01-06 18:26:55 +01:00
Max Kellermann
0d20130d07
util/Cast: new utility library
2014-01-06 18:21:45 +01:00
Max Kellermann
617090cfda
event/IdleMonitor: cancel in destructor only if active
...
Debug-mode workaround for bogus assertion failure.
2014-01-06 18:21:45 +01:00
Max Kellermann
a9e604d51d
event/MultiSocketMonitor: API documentation
2014-01-06 08:59:27 +01:00
Max Kellermann
e599b86424
event/Loop: try to avoid the WakeFD when adding DeferredMonitor
...
Add a flag that indicates whether the EventLoop is currently "busy".
As long as that flag is set, it does not need to be woken up - we can
simply add the DeferredMonitor to the list, and it will be caught by
EventLoop very soon. This eliminates nearly all of the
DeferredMonitor overhead when compared to IdleMonitor, rendering
IdleMonitor mostly obsolete.
2014-01-05 02:15:34 +01:00
Max Kellermann
da9e584921
event/Loop: combine multiple WakeFD::Write() calls
...
Reduce DeferredMonitor overhead.
2014-01-05 02:15:10 +01:00
Max Kellermann
e9d764d7ad
event/Loop: add attribute "again"
...
Improved support for added events.
2014-01-05 02:15:01 +01:00
Max Kellermann
6268955778
event/Loop: add thread-safety assertions
2014-01-05 02:14:31 +01:00
Max Kellermann
4ddfc6e9a2
output/httpd: move the clients.clear() call to the IOThread
...
This call is not thread-safe.
2014-01-05 02:13:35 +01:00
Max Kellermann
dcbc05a9cd
output/httpd: import GetEventLoop()
2014-01-05 02:13:21 +01:00
Max Kellermann
4c705334fa
ClientList: use "delete" instead of Client::Close()
...
Client::Close() installs a TimeoutMonitor, which is not something we
should do during shutdown.
2014-01-05 02:07:49 +01:00
Max Kellermann
c12da599b9
event/Loop: remove obsolete assertion
2014-01-05 01:41:03 +01:00
Max Kellermann
f685a48008
event/Loop: move code to HandleDeferred()
2014-01-05 01:35:12 +01:00
Max Kellermann
7c15e41da5
event/MultiSocketMonitor: add missing <algorithm> include
...
For std::find_if().
2014-01-05 01:35:12 +01:00
Max Kellermann
7b540f0226
event/MultiSocketMonitor: add method ReplaceSocketList()
...
Move code from AlsaMixerPlugin.
2014-01-05 01:28:36 +01:00
Max Kellermann
e29c22e662
event/MultiSocketMonitor: include cleanup
2014-01-05 00:39:29 +01:00
Max Kellermann
f0d3b47ad8
event/Loop: remove the GLib implementation
...
Now that the remaining known bugs in poll() implementation are fixed,
we can go on without the GLib implementation.
2014-01-04 19:31:23 +01:00
Max Kellermann
bfe7533546
output/httpd: move Bind()/Unbind() to the IOThread
...
Fixes more thread-safety bugs.
2014-01-04 19:29:51 +01:00
Max Kellermann
880bf17dae
event/poll: eliminate one vector::size() call
2014-01-04 19:10:21 +01:00
Max Kellermann
c9da3363a0
output/httpd: move all broadcast operations to the IOThread
...
Add a Page queue to class HttpdOutput, and use DeferredMonitor to
flush this queue inside the IOThread. This fixes a thread-safety
issue: much of EventLoop is not thread-safe, and the httpd plugin
ignored that problem.
2014-01-04 18:22:55 +01:00
Max Kellermann
9bd4ed3e60
output/httpd: use the IOThread
...
Do all I/O in the IOThread and not in the main thread. This solves an
upcoming deadlock problem.
2014-01-04 18:21:40 +01:00
Max Kellermann
68fcc19565
output/httpd: move queue size check to HttpdClient::PushPage()
...
Don't let the server care for client problems.
2014-01-04 17:42:03 +01:00
Max Kellermann
8e4efd071e
output/httpd: wrap the std::list in std::queue
2014-01-04 17:12:59 +01:00
Max Kellermann
f2ad9f6fad
output/httpd: merge duplicate code to ClearQueue()
2014-01-04 17:11:22 +01:00
Max Kellermann
968c5eb767
output/httpd: keep track of queue size
...
Don't iterate the std::list each time.
2014-01-04 17:06:05 +01:00
Max Kellermann
19424e95db
event/Loop: remove bogus "!quit" assertion
...
Commit 1f11959
allowed modifying the "quit" attribute from any thread,
and thus the assertion may fail spuriously. This assertion is too
strict for the relaxed use of "quit". Let's remove it and move the
"quit" check to before the SockedMonitor::Dispatch() call.
2014-01-04 17:06:05 +01:00
Max Kellermann
0f9ef2506f
event/Loop: remove unused method AddCall()
2014-01-04 16:00:45 +01:00
Max Kellermann
1f1195975f
event/Loop: non-recursive Break() implementation
...
Simply set the "quit" flag and wake up the thread. This works even if
we're inside this thread. Setting "quit" to a new value without mutex
protection is usually not safe, but good enough here.
2014-01-04 15:59:00 +01:00