Commit Graph

53 Commits

Author SHA1 Message Date
Max Kellermann
863722545f player/CrossFade, ...: use lround() 2018-09-22 19:08:03 +02:00
Max Kellermann
1a2012a97e player/Control: convert total_play_time to FloatDuration 2018-09-21 20:50:15 +02:00
Max Kellermann
914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01:00
Max Kellermann
6246d36fe6 Merge branch 'v0.20.x' 2017-12-16 20:56:06 +01:00
Max Kellermann
dfaf08743c *: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
2017-12-12 10:22:20 +01:00
Max Kellermann
78ca5491e6 db/Interface: GetUpdateStamp() returns std::chrono::system_clock::time_point 2017-02-11 23:02:17 +01:00
Max Kellermann
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann
249e8d59cb Stats: use std::chrono 2016-12-28 10:22:55 +01:00
Max Kellermann
8f4769d2ac Stats: initialize start_time automatically 2016-12-28 10:22:15 +01:00
Max Kellermann
fac8edd47a db/Interface: migrate visitor methods from class Error to C++ exceptions 2016-10-29 10:42:56 +02:00
Max Kellermann
5da4e321c0 Stats: catch exceptions 2016-03-18 18:46:43 +01:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
5fba8d773c PlayerThread, ...: move to src/player/ 2015-08-15 15:55:46 +02:00
Max Kellermann
7652a2986b client/Response: new Client wrapper class for writing responses 2015-08-12 08:41:05 +02:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
58352ea69d db/Stats: use std::chrono::duration for the total duration
Use milliseconds precision to reduce rounding errors.
2014-08-29 23:25:03 +02:00
Max Kellermann
ae594ad92c DatabasePlugin: split header 2014-02-19 22:54:52 +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
981080500b Stats: pass Database reference around
Call GetDatabase() only once.
2014-02-01 00:38:57 +01:00
Max Kellermann
636d28b784 Stats: remove obsolete "simple" plugin special case
The proxy plugin has now implemented the "idle" event listener.
2014-02-01 00:37:01 +01:00
Max Kellermann
188783ac1a Stats: return false if update has failed 2014-02-01 00:36:36 +01:00
Max Kellermann
4465e2c46b db: add compile-time option to disable database 2014-01-30 20:39:40 +01:00
Max Kellermann
9d34fc394c Database*: move to db/ 2014-01-24 16:38:44 +01:00
Max Kellermann
e199c33c6e Client*: move to client/ 2014-01-24 00:26:53 +01:00
Max Kellermann
4f83c60296 copyright year 2014 2014-01-13 22:31:55 +01:00
Max Kellermann
348d0c944e Stats: lazy initialization
Ask the DatabasePlugin for stats when the first client requests them,
not at startup.
2014-01-10 23:42:46 +01:00
Max Kellermann
529b4bd185 Stats: use monotonic clock instead of GTimer
Reduce GLib usage.
2013-11-24 21:14:38 +01:00
Max Kellermann
85b51e4e77 Stats: use GetProcessTimes() on WIN32 to determine MPD uptime
Don't use GTimer if the operating system is able to tell us the
uptime.
2013-11-24 20:41:00 +01:00
Max Kellermann
c064e8d62f DatabasePlugin: add method GetUpdateStamp()
Refactor SimpleDatabase::GetLastModified() to be generic for all
plugins.  Remove the SimpleDatabase assumption from db_stats_print(),
allowing it to be implemented by all database plugins.
2013-11-22 00:35:29 +01:00
Max Kellermann
099a2cb586 Stats: print db statistics only if db is available
Fixes crash on "stats" in certain configurations.
2013-11-22 00:27:37 +01:00
Max Kellermann
042fe2a9d0 Stats: print more unsigned integers 2013-11-22 00:23:27 +01:00
Max Kellermann
ff1c1107f3 Stats: auto-reload statistics with proxy plugin 2013-11-22 00:19:28 +01:00
Max Kellermann
41a3fd0fd0 Stats: use struct DatabaseStats
Eliminate redundant declaration.
2013-11-22 00:12:12 +01:00
Max Kellermann
b9169a5670 Stats: move the GTimer variable out of struct stats 2013-11-22 00:10:53 +01:00
Max Kellermann
2ecd5fa28d Stats: don't export the global variable "stats"
Unused outside of Stats.cxx.
2013-11-22 00:08:43 +01:00
Max Kellermann
e719b6cc41 Stats: print db_update as unsigned integer 2013-11-22 00:04:58 +01:00
Max Kellermann
32645b80c4 ClientInternal: move class Client to Client.hxx
Publish the Client API, preparing to move more code into the Client
class.
2013-10-19 19:35:37 +02:00
Max Kellermann
ff626ac763 *: use references instead of pointers 2013-10-19 18:48:38 +02:00
Max Kellermann
efc3a69dbf Stats: don't include glib.h in header
Use forward declaration instead.
2013-10-02 12:16:52 +02:00
Max Kellermann
ec883e1901 Stats: rename stats.h to Stats.hxx 2013-10-02 12:14:07 +02:00
Max Kellermann
060814daa8 Log: new logging library API
Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
2013-10-02 08:57:55 +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
e1b03b4a71 PlayerControl: move functions into the class 2013-01-20 17:48:23 +01:00
Max Kellermann
81f3d893d9 player_control.h: convert header to C++ 2013-01-04 22:31:53 +01:00
Max Kellermann
7a982169c9 Client: rename the struct client to class Client 2013-01-03 17:36:28 +01:00
Max Kellermann
70b87f2eb6 client: convert to C++ 2013-01-03 11:16:18 +01:00
Max Kellermann
440ac51cf0 database.h: rename to DatabaseSimple.hxx 2013-01-03 01:06:11 +01:00
Max Kellermann
25740d27bf Stats: stats_print() returns void 2012-08-29 17:41:26 +02:00
Max Kellermann
3c0dea811d DatabasePlugin: add method GetStats()
Optimize the ProxyDatabase by invoking "stats" on the peer, instead of
visiting all songs.
2012-08-15 23:05:08 +02:00
Max Kellermann
aa55d759f5 DatabaseGlue: add function db_is_simple()
Preparing for non-"simple" database plugins.
2012-08-08 09:28:13 +02:00