input/Plugin: pass EventLoop& to init()
Eliminate dependency on io_thread_get().
This commit is contained in:
@@ -106,7 +106,7 @@ static constexpr Domain cdio_domain("cdio");
|
||||
static bool default_reverse_endian;
|
||||
|
||||
static void
|
||||
input_cdio_init(const ConfigBlock &block)
|
||||
input_cdio_init(EventLoop &, const ConfigBlock &block)
|
||||
{
|
||||
const char *value = block.GetBlockValue("default_byte_order");
|
||||
if (value != nullptr) {
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "tag/TagBuilder.hxx"
|
||||
#include "event/Call.hxx"
|
||||
#include "event/Loop.hxx"
|
||||
#include "IOThread.hxx"
|
||||
#include "thread/Cond.hxx"
|
||||
#include "util/ASCII.hxx"
|
||||
#include "util/StringUtil.hxx"
|
||||
@@ -285,7 +284,7 @@ CurlInputStream::OnError(std::exception_ptr e)
|
||||
*/
|
||||
|
||||
static void
|
||||
input_curl_init(const ConfigBlock &block)
|
||||
input_curl_init(EventLoop &event_loop, const ConfigBlock &block)
|
||||
{
|
||||
CURLcode code = curl_global_init(CURL_GLOBAL_ALL);
|
||||
if (code != CURLE_OK)
|
||||
@@ -319,7 +318,7 @@ input_curl_init(const ConfigBlock &block)
|
||||
verify_host = block.GetBlockValue("verify_host", true);
|
||||
|
||||
try {
|
||||
curl_global = new CurlGlobal(io_thread_get());
|
||||
curl_global = new CurlGlobal(event_loop);
|
||||
} catch (const std::runtime_error &e) {
|
||||
LogError(e);
|
||||
curl_slist_free_all(http_200_aliases);
|
||||
|
||||
@@ -72,7 +72,7 @@ input_ffmpeg_supported(void)
|
||||
}
|
||||
|
||||
static void
|
||||
input_ffmpeg_init(gcc_unused const ConfigBlock &block)
|
||||
input_ffmpeg_init(EventLoop &, const ConfigBlock &)
|
||||
{
|
||||
FfmpegInit();
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#include "lib/nfs/FileReader.hxx"
|
||||
#include "thread/Cond.hxx"
|
||||
#include "util/StringCompare.hxx"
|
||||
#include "IOThread.hxx"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
@@ -206,9 +205,9 @@ NfsInputStream::OnNfsFileError(std::exception_ptr &&e)
|
||||
*/
|
||||
|
||||
static void
|
||||
input_nfs_init(const ConfigBlock &)
|
||||
input_nfs_init(EventLoop &event_loop, const ConfigBlock &)
|
||||
{
|
||||
nfs_init(io_thread_get());
|
||||
nfs_init(event_loop);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
*/
|
||||
|
||||
static void
|
||||
input_smbclient_init(gcc_unused const ConfigBlock &block)
|
||||
input_smbclient_init(EventLoop &, const ConfigBlock &)
|
||||
{
|
||||
try {
|
||||
SmbclientInit();
|
||||
|
||||
Reference in New Issue
Block a user