Commit Graph

6227 Commits

Author SHA1 Message Date
Max Kellermann
939003c1f1 OutputAll: add pure/const attributes 2013-09-27 09:38:47 +02:00
Max Kellermann
a10f3a8aec PlayerControl: convert functions to methods 2013-09-27 09:30:19 +02:00
Max Kellermann
ef663810a2 DecoderControl: convert functions to methods 2013-09-27 09:18:03 +02:00
Max Kellermann
ada67a6a4f PlayerThread: move code to player_control::CommandFinished() 2013-09-27 07:58:48 +02:00
Max Kellermann
b6a5d1ad5a PlayerThread: use nullptr instead of NULL 2013-09-27 00:03:22 +02:00
Max Kellermann
d8c5a63bc2 PlayerThread: unlock/lock in player_task() 2013-09-26 23:58:41 +02:00
Max Kellermann
bcb2db62c9 PlayerThread: move code into the player class 2013-09-26 23:57:31 +02:00
Max Kellermann
079ef93121 PlayerThread: use player references 2013-09-26 23:27:47 +02:00
Max Kellermann
b2789c598e PlayerThread: use {decoder,player}_control references 2013-09-26 22:53:40 +02:00
Max Kellermann
92a93c1217 PlayerThread: allocate decoder_control on the stack 2013-09-26 22:48:55 +02:00
Max Kellermann
96b70835f9 PlayerThread: move global MusicBuffer variable into the player object 2013-09-26 22:45:49 +02:00
Max Kellermann
7fa3b7a267 PlayerThread: simplify "buffer empty" assertion 2013-09-26 22:41:07 +02:00
Max Kellermann
f3fc76e3c8 MusicChunk: remove obsolete prototypes 2013-09-26 22:34:43 +02:00
Max Kellermann
3216f4b257 MusicBuffer: expose the C++ API 2013-09-26 22:21:56 +02:00
Max Kellermann
ce1d897575 MusicPipe: expose the C++ API 2013-09-26 21:51:45 +02:00
Max Kellermann
17e108a10a MusicChunk: use constexpr for CHUNK_SIZE 2013-09-26 21:49:26 +02:00
Max Kellermann
5bc4ab899f *Plugin: remove redundant "line %i" from error messages
The MPD core will add this as a prefeix.
2013-09-26 20:59:40 +02:00
Max Kellermann
44faf1080c SongFilter: search for album artist falls back to the artist tag
Implement Mantis ticket 0003646.
2013-09-26 19:25:13 +02:00
Max Kellermann
e354c5c2a8 IdTable, SongFilter: use std::fill_n() instead of std::fill() 2013-09-26 18:25:28 +02:00
Max Kellermann
04bc9005ae TagType: reduce the enum size to 1 byte
Reduce the TagItem overhead.
2013-09-26 18:14:58 +02:00
Max Kellermann
3c92c69bc7 Tag: add "pure" attributes 2013-09-26 18:11:00 +02:00
Max Kellermann
52ee132d92 TagHandler: use a TagBuilder internally
Reduce heap allocator overhead.
2013-09-26 17:35:08 +02:00
Max Kellermann
7ca0aedcfc Main: fix crash if no database was configured
Add nullptr check, and return early from glue_db_init_and_load().
2013-09-26 17:33:46 +02:00
Max Kellermann
a2c4037a24 Main: use nullptr instead of NULL 2013-09-26 17:31:50 +02:00
Max Kellermann
d7b0073ce1 decoder/modplug: fix include directory
Since Debian package 1:0.8.8.4-4, the pkg-config file does not contain
-I/usr/include/libmodplug anymore, and we need to add the
"libmodplug/" prefix to the #include line.
2013-09-26 17:27:35 +02:00
Artem Savkov
585b68d2ae input/curl: fix EventLoop stall after curl_easy_pause
When playing finite http streams, e.g. something from soundcloud,
eventloop stalls after pausing writefunc. TimeoutMonitor is cancelled
by the time resume happens, so when enough data is consumed writefunc
is called only once. Calling InvalidateSockets() from
input_curl_resume() seems to fix the issue.
2013-09-26 17:27:35 +02:00
Max Kellermann
89d2d648cc ConfigPath: return early on "~"
Previously, the pointer was moved to undefined memory.
2013-09-12 11:05:59 +02:00
Max Kellermann
7532f24d58 ConfigPath: skip the slash of "~/"
Increment the "path" earlier.
2013-09-12 11:05:41 +02:00
Max Kellermann
69a5df2f98 ConfigPath: remove the "~/" from the constructed path
This was building broken paths like "/home/foo/~/bar".  Bug found by
Maarten de Vries.
2013-09-12 10:54:45 +02:00
Max Kellermann
1c65908cdb ConfigPath: simplify the duplicate tilde check 2013-09-12 10:49:57 +02:00
Max Kellermann
3aaf013dd1 ConfigPath: convert "home" variable to Path object
Use Path::FromUTF8() for the g_get_home_dir() return value instead of
assuming it's already FS charset.
2013-09-12 10:35:40 +02:00
Max Kellermann
5f2705ab07 ConfigPath: move code to GetHome() 2013-09-12 10:30:00 +02:00
Max Kellermann
9af620982c ConfigPath: include cleanup 2013-09-12 10:17:41 +02:00
Max Kellermann
1ee6a78cb7 Path: add FromUTF8() overload that returns an Error 2013-09-12 10:17:41 +02:00
Max Kellermann
bf4ee48efa ConfigPath: move path_domain to system/Path.cxx 2013-09-12 10:03:37 +02:00
Maarten de Vries
08e6d222a2 Listen: Allow tilde paths for socket. 2013-09-12 08:55:45 +02:00
Max Kellermann
a24589d46e TagBuilder: add method Commit(Tag&)
For callers that already have a Tag instance.
2013-09-05 19:23:06 +02:00
Max Kellermann
84533b6cad TagBuilder: add method IsEmpty() 2013-09-05 19:14:47 +02:00
Max Kellermann
8dca38e979 Tag: remove the obsolete "bulk" mode
Methods BeginAdd() and EndAdd() have been replaced by class
TagBuilder.
2013-09-05 19:08:22 +02:00
Max Kellermann
662bed6a00 db/proxy: use class TagBuilder 2013-09-05 19:07:27 +02:00
Max Kellermann
ae5e0cb02b SongSave: use class TagBuilder 2013-09-05 18:59:19 +02:00
Max Kellermann
0b3e1c4706 TagBuilder: new class for constructing Tag objects
Obsoletes Tag::BeginAdd() and the complicated "bulk add" code.
2013-09-05 18:41:49 +02:00
Max Kellermann
ce08a7a932 TagItem: disable the copy constructor/operator
This is not a C++ class and must not be copied.
2013-09-05 18:41:01 +02:00
Max Kellermann
5d5f21bfc5 Tag: compile-time initialisation of ignore_tag_items
Move to TagSettings.c and use C99 initializers.
2013-09-05 18:34:12 +02:00
Max Kellermann
fcccedc588 Tag: move struct TagItem to TagItem.hxx 2013-09-05 18:28:07 +02:00
Max Kellermann
0d73a49327 Tag: move fix_tag_value() to TagString.cxx 2013-09-05 18:27:40 +02:00
Max Kellermann
6239dd96f2 Tag: remove unused methods 2013-09-05 18:27:31 +02:00
Max Kellermann
57a4700fb9 TagNames: make tag_item_names const 2013-09-05 18:27:23 +02:00
Max Kellermann
2b676dc5fc Tag: move configuration code to TagConfig.cxx
Allow using the Tag.cxx library without the Config library.
2013-09-05 18:27:08 +02:00
Max Kellermann
3f267b1795 Tag, ...: move to libtag.a 2013-09-05 18:26:56 +02:00
Max Kellermann
7a4c9f5f4c mpd_error.h: remove obsolete header
Migrate the remaining callers to FatalError().
2013-09-05 18:26:46 +02:00
Ales Guzik
3330aa6f6a input/curl: enable https 2013-09-05 11:56:49 +02:00
Max Kellermann
8929f88e6d PlaylistPlugin: add interface SongEnumerator
Replaces struct playlist_provider.
2013-09-05 09:40:55 +02:00
Max Kellermann
5348808bf5 PlaylistPlugin, ConfigGlobal: use nullptr instead of NULL 2013-09-05 09:40:32 +02:00
Max Kellermann
fccba1af2a use standard snprintf() instead of GLib g_snprintf() 2013-09-05 09:21:53 +02:00
Max Kellermann
26d92c80ed conf.h: remove obsolete header
Use only ConfigData.hxx in plugin sources to reduce header
dependencies.
2013-09-05 08:47:10 +02:00
Max Kellermann
9605e24655 conf.h: move constants to ConfigDefaults.hxx 2013-09-05 08:42:08 +02:00
Max Kellermann
7d0269d2ce InputLegacy: move functions to the input_stream class 2013-09-05 00:23:14 +02:00
Max Kellermann
681d6bbdc5 TagTable: un-inline the two functions
Reduce header dependencies.
2013-09-04 23:57:30 +02:00
Max Kellermann
867b82b6de Tag*: move TagTable.hxx to libtag.a 2013-09-04 23:54:37 +02:00
Max Kellermann
5101ef4b02 Tag*: move libtag.a sources to src/tag/ 2013-09-04 23:46:20 +02:00
Max Kellermann
ee9e238179 system/SocketError: un-inline constructor
Reduces header dependencies.
2013-09-04 23:36:30 +02:00
Max Kellermann
29030b54c9 util/Error: new error passing library
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann
c9fcc7f148 system/resolver: convert to C++ 2013-09-04 18:02:09 +02:00
Max Kellermann
d1f4a31b5e output/pulse: require libpulse 0.9.16
Remove all #ifdefs.  Old versions of libpulse are not being tested,
and thus I'm removing support.
2013-09-04 16:55:03 +02:00
Max Kellermann
b691d3123b IOThread: pass GError to FatalError()
Fixes build failure on GLib < 2.32.
2013-09-04 16:54:52 +02:00
Max Kellermann
f68e36f8c2 DatabaseSave: eliminate redundant db_quark() implementation 2013-09-03 11:52:57 +02:00
Max Kellermann
4db119c01b IOThread: use FatalError() on g_thread_create() error
New GLib versions don't fail.
2013-09-03 11:28:47 +02:00
Max Kellermann
bbd7115564 input/{mms,despotify}: remove "seek" implementation
Omitting it has the same effect as returning false unconditionally.
2013-09-03 10:54:29 +02:00
Max Kellermann
8d36367fe2 input_stream.h: rename to InputLegacy.hxx 2013-09-03 09:18:30 +02:00
Max Kellermann
3deca8fccd db_error: convert to C++ 2013-08-10 19:43:27 +02:00
Max Kellermann
7af24c4d3a playlist_error: convert to C++ 2013-08-10 19:40:45 +02:00
Max Kellermann
7f0ce4e94e ack.h: move to protocol/ 2013-08-10 19:32:41 +02:00
Max Kellermann
5c48d3fbba alsa/mixer: defer InvalidateSockets() call to I/O thread 2013-08-10 14:05:06 +02:00
Max Kellermann
00420ef9ca EventLoop: initialise the thread id explicitly 2013-08-10 14:01:55 +02:00
Max Kellermann
b9d30595d6 ZeroconfAvahi: disable Avahi with epoll
Temporary hotfix until we have integrated avahi into our new event
loop.
2013-08-10 13:59:01 +02:00
Max Kellermann
c1f4f1fdb6 EventLoop: new implementation using epoll
Implement an event loop without GLib.
2013-08-10 13:54:23 +02:00
Max Kellermann
342333f72a mixer/alsa: invoke InvalidateSockets() in constructor 2013-08-10 13:54:23 +02:00
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