diff options
author | Max Kellermann <max@musicpd.org> | 2019-05-08 18:39:00 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-05-31 17:49:52 +0200 |
commit | 5d74b5cee1c11e7035ba99fa23d724175203319c (patch) | |
tree | ed1fa91f3807bca59b2064ea288ba436d1791cfd /src/Main.cxx | |
parent | e8a0ce643a5e00e768f31387000cdddb2a93cb44 (diff) |
input/cache: first draft of the file cache
Diffstat (limited to 'src/Main.cxx')
-rw-r--r-- | src/Main.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index 86a10f3d2..52d81eb32 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -38,6 +38,8 @@ #include "Log.hxx" #include "LogInit.hxx" #include "input/Init.hxx" +#include "input/cache/Config.hxx" +#include "input/cache/Manager.hxx" #include "event/Loop.hxx" #include "fs/AllocatedPath.hxx" #include "fs/Config.hxx" @@ -414,6 +416,12 @@ MainConfigured(const struct options &options, const ConfigData &raw_config) raw_config.GetPositive(ConfigOption::MAX_CONN, 10); instance.client_list = std::make_unique<ClientList>(max_clients); + const auto *input_cache_config = raw_config.GetBlock(ConfigBlockOption::INPUT_CACHE); + if (input_cache_config != nullptr) { + const InputCacheConfig c(*input_cache_config); + instance.input_cache = std::make_unique<InputCacheManager>(c); + } + initialize_decoder_and_player(instance, raw_config, config.replay_gain); @@ -461,6 +469,7 @@ MainConfigured(const struct options &options, const ConfigData &raw_config) client_manager_init(raw_config); const ScopeInputPluginsInit input_plugins_init(raw_config, instance.io_thread.GetEventLoop()); + const ScopePlaylistPluginsInit playlist_plugins_init(raw_config); #ifdef ENABLE_DAEMON |