Commit Graph

7252 Commits

Author SHA1 Message Date
Max Kellermann
94cdc47786 event/Call: signal the calling thread
Fixes regression from commit 018f4155.
2013-08-10 12:40:44 +02:00
Max Kellermann
cc511e7b60 event/IdleMonitor: new monitor class 2013-08-10 11:52:31 +02:00
Max Kellermann
bb2af791e9 event/MultiSocketMonitor: add struct SingleFD
Prepare for migrating away from GLib.
2013-08-10 11:52:31 +02:00
Max Kellermann
f3f4b332ae event/MultiSocketMonitor: use uint64_t instead of gint64
Unsigned and portable.
2013-08-10 11:52:31 +02:00
Max Kellermann
84ac79bb08 event/MultiSocketMonitor: eliminate virtual method CheckSockets()
Handle timeout internally.
2013-08-10 11:52:31 +02:00
Max Kellermann
be0c8495cd event/MultiSocketMonitor: PrepareSockets() returns timeout
Simplify the API, don't use GLib specific integer type.
2013-08-10 11:52:31 +02:00
Max Kellermann
cbd0709d1c glib_compat.h: use monotonic_clock_us() in g_source_get_time() 2013-08-10 11:52:31 +02:00
Max Kellermann
371d635da8 glib_compat.h: remove unused wrapper g_file_test() 2013-08-10 11:52:31 +02:00
Max Kellermann
85216966fa decoder/wildmidi: use class Path for the "timidity.cfg" location 2013-08-10 11:52:31 +02:00
Max Kellermann
1c823e9d1f ConfigData: overload GetBlockPath() with default value 2013-08-10 11:52:31 +02:00
Max Kellermann
25e338a098 ConfigData: use FatalError() instead of MPD_ERROR() 2013-08-10 11:52:31 +02:00
Max Kellermann
81175b0717 system/EPollFD: fix typo in Add() 2013-08-10 11:52:31 +02:00
Max Kellermann
d23c907a94 thread/Id: new class replacing GThread pointers
Remove a GLib dependencies from class EventLoop and DatabaseLock.
2013-08-10 09:00:04 +02:00
Max Kellermann
018f4155eb event: add function BlockingCall()
Replaces io_thread_call().  This approach is more generic and easier
to use due to std::function.
2013-08-08 23:04:07 +02:00
Max Kellermann
9ab0a1f5f1 EventLoop: add methodd IsInside()
Track which thread runs the EventLoop and provide a check whether
we're currently inside.
2013-08-08 23:04:01 +02:00
Max Kellermann
c043b337b1 EventLoop: un-inline Run() and others
Prepare for adding more code.
2013-08-08 23:03:49 +02:00
Max Kellermann
090bc6fa79 event/*Monitor: add method GetEventLoop() 2013-08-08 23:03:38 +02:00
Max Kellermann
b63db1c1aa event/SocketMonitor: un-inline Schedule()
Merge with CommitEventFlags().
2013-08-08 00:18:59 +02:00
Max Kellermann
0287ac794e event/SocketMonitor: add assertions 2013-08-08 00:18:59 +02:00
Max Kellermann
0005221533 output/httpd: use "unsigned" instead of "guint" 2013-08-08 00:18:59 +02:00
Max Kellermann
23d2c0f1c6 Client{Event,Write}: add missing include 2013-08-08 00:14:19 +02:00
Max Kellermann
377b6f05ea event/BufferedSocket: add missing include 2013-08-08 00:11:40 +02:00
Max Kellermann
3ac2e9d31f os/FileSystem: disable mkfifo() wrapper on WIN32 2013-08-07 20:31:27 +02:00
Max Kellermann
b76a29a69a ConfigPath: return a Path object
Migrate all callers to use Path directly, instead of doing the
conversion in each caller.
2013-08-07 19:59:09 +02:00
Max Kellermann
abe090ec1f *: remove remaining __cplusplus checks 2013-08-07 19:58:52 +02:00
Max Kellermann
dff05c71e6 event/EPollFD: basic support for Linux epoll 2013-08-07 19:44:43 +02:00
Max Kellermann
f6f4742410 event/DeferredMonitor: rename Run() to RunDeferred() 2013-08-07 19:39:26 +02:00
Max Kellermann
977004c350 event/DeferredMonitor: use EventLoop::AddIdle() 2013-08-07 19:38:10 +02:00
Max Kellermann
fdc7d13ad1 configure.ac: pass option name to MPD_OPTIONAL_FUNC() 2013-08-07 19:23:00 +02:00
Max Kellermann
355dd5cb24 event/DeferredMonitor: new class wrapping g_idle_add() 2013-08-07 18:59:42 +02:00
Max Kellermann
123dd5fe2d mixer/alsa: use AllocatedArray for the pollfd buffer 2013-08-07 18:56:57 +02:00
Max Kellermann
953e3190ca encoder/lame: use ReusableBuffer instead of AllocatedArray 2013-08-07 18:53:24 +02:00
Max Kellermann
44a0e21795 PcmBuffer: move code to new class ReusableBuffer
ReusableBuffer is more generic.
2013-08-07 18:51:21 +02:00
Max Kellermann
fafaf567f9 Makefile: fix "distcheck" errors 2013-08-07 18:49:05 +02:00
Max Kellermann
870cc1d928 add missing includes 2013-08-07 18:23:55 +02:00
Max Kellermann
d86ee93801 filter/Route: don't access PcmBuffer attributes directly
Return the pointer given by PcmBuffer::Get() instead of reaching into
the PcmBuffer object.
2013-08-07 18:23:34 +02:00
Alexander Gehrke
87b7328463 CommandLine.cxx: look for config file in XDG_CONFIG_HOME too
Look for "$XDG_CONFIG_HOME/mpd/mpd.conf", similar to where mpd looks
for the file under Windows.
2013-08-07 18:22:27 +02:00
Alexis Ballier
3f846cf6b8 FfmpegDecoderPlugin: Allocate the interleaved buffer as needed instead of using an arbitrary big constant.
Also, save a memcpy when FFmpeg outputs interleaved audio.

Fixes build with FFmpeg 2.0.
2013-08-07 15:07:41 +02:00
Max Kellermann
f2ce8c3b62 event/EventFD: move to libsystem 2013-08-07 11:52:26 +02:00
Max Kellermann
4223657ab8 event/SignalMonitor: use signalfd() if available 2013-08-07 11:03:47 +02:00
Max Kellermann
930128a7ea SignalHandlers: move code to new class SignalMonitor 2013-08-07 10:56:33 +02:00
Max Kellermann
db447440ff event/Event{Pipe,FD}: auto-create in constructor
Errors are fatal now.  This makes the class a lot easier to use.
2013-08-07 10:53:22 +02:00
Max Kellermann
b70d38dc10 Makefile.am: move sources to libsystem.a 2013-08-07 10:31:31 +02:00
Max Kellermann
a27d105dcd FatalError: new library to replace mpd_error.h 2013-08-07 10:08:36 +02:00
Max Kellermann
67e44b0f2c daemon: convert to C++ 2013-08-07 09:53:33 +02:00
Max Kellermann
bf840700e4 test/signals: remove obsolete library 2013-08-07 09:51:43 +02:00
Max Kellermann
47e16dbee3 configure.ac: add option --enable-eventfd
Remove the runtime check for eventfd(), hard-code the feature once
it's been selected at compile time.  The class WakeFD is splitted into
EventFD and EventPipe, using WakeFD as a macro diversion.
2013-08-06 23:32:21 +02:00
Max Kellermann
66f678023f util/Manual: add missing include <utility> 2013-08-06 22:34:20 +02:00
Max Kellermann
132971f8eb playlist/pls: use std::string instead of GString 2013-08-06 09:32:08 +02:00
Max Kellermann
3f04a4d635 encoder/lame: dynamic output buffer 2013-08-06 09:13:28 +02:00