Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cabcbb059d | ||
|
|
5e21b2db3c | ||
|
|
3a0d6d96c1 | ||
|
|
f39d2d33c0 | ||
|
|
ead3dc6a92 | ||
|
|
7d814cc899 | ||
|
|
f5b4606c09 | ||
|
|
d6dbf64efb | ||
|
|
8d18b4c24b | ||
|
|
fe8621906d | ||
|
|
b4fcbdb235 | ||
|
|
f4b5a28596 | ||
|
|
6cbd77fc57 | ||
|
|
1bc78e9f2c | ||
|
|
cb6282e0a7 | ||
|
|
f6941f9a44 | ||
|
|
d2eb4df8fc | ||
|
|
df33a898d7 | ||
|
|
325c7b8e8b | ||
|
|
380656d8c9 | ||
|
|
9111bc2c21 | ||
|
|
37b54179d8 | ||
|
|
511826763a |
@@ -9,7 +9,7 @@ matrix:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:mhier/libboost-latest'
|
||||
- sourceline: 'ppa:saiarcot895/chromium-dev' # for ninja-build
|
||||
- sourceline: 'ppa:mstipicevic/ninja-build-1-7-2'
|
||||
- sourceline: 'ppa:deadsnakes/ppa' # for Python 3.7 (required by Meson)
|
||||
packages:
|
||||
- g++-6
|
||||
@@ -34,7 +34,7 @@ matrix:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- sourceline: 'ppa:mhier/libboost-latest'
|
||||
- sourceline: 'ppa:saiarcot895/chromium-dev' # for ninja-build
|
||||
- sourceline: 'ppa:mstipicevic/ninja-build-1-7-2'
|
||||
- sourceline: 'ppa:deadsnakes/ppa' # for Python 3.7 (required by Meson)
|
||||
packages:
|
||||
- g++-8
|
||||
|
||||
14
NEWS
14
NEWS
@@ -1,3 +1,17 @@
|
||||
ver 0.21.8 (2019/04/23)
|
||||
* input
|
||||
- smbclient: download to buffer instead of throttling transfer
|
||||
* output
|
||||
- httpd: add missing mutex lock
|
||||
- httpd: fix use-after-free bug
|
||||
* playlist
|
||||
- soundcloud: fix "Unsupported URI scheme" (0.21.6 regression)
|
||||
* fix Bonjour bug
|
||||
* fix build failure with GCC 9
|
||||
* fix build failure with -Ddatabase=false
|
||||
* systemd: add user socket unit
|
||||
* doc: "list file" is deprecated
|
||||
|
||||
ver 0.21.7 (2019/04/03)
|
||||
* input
|
||||
- qobuz/tidal: scan tags when loading a playlist
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.musicpd"
|
||||
android:installLocation="auto"
|
||||
android:versionCode="29"
|
||||
android:versionName="0.21.7">
|
||||
android:versionCode="30"
|
||||
android:versionName="0.21.8">
|
||||
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26"/>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ author = 'Max Kellermann'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.21.7'
|
||||
version = '0.21.8'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = version
|
||||
|
||||
|
||||
@@ -96,10 +96,8 @@ When the whole patch series is finished, convert stgit patches to git commits:
|
||||
Submitting Patches
|
||||
==================
|
||||
|
||||
Send your patches to the mailing list:
|
||||
Email: `mpd-devel <mpd-devel@musicpd.org>`_
|
||||
|
||||
:program:`git pull` requests are preferred.
|
||||
Submit pull requests on GitHub:
|
||||
https://github.com/MusicPlayerDaemon/MPD/pulls
|
||||
|
||||
Development Tools
|
||||
=================
|
||||
|
||||
@@ -414,9 +414,10 @@ Querying :program:`MPD`'s status
|
||||
- ``songid``: playlist songid of the current song stopped on or playing
|
||||
- ``nextsong`` [#since_0_15]_: playlist song number of the next song to be played
|
||||
- ``nextsongid`` [#since_0_15]_: playlist songid of the next song to be played
|
||||
- ``time``: total time elapsed (of current playing/paused song)
|
||||
- ``time``: total time elapsed (of current playing/paused song) in seconds
|
||||
(deprecated, use ``elapsed`` instead)
|
||||
- ``elapsed`` [#since_0_16]_: Total time elapsed within the current song, but with higher resolution.
|
||||
- ``elapsed`` [#since_0_16]_: Total time elapsed within the
|
||||
current song in seconds, but with higher resolution.
|
||||
- ``duration`` [#since_0_20]_: Duration of the current song in seconds.
|
||||
- ``bitrate``: instantaneous bitrate in kbps
|
||||
- ``xfade``: ``crossfade`` in seconds
|
||||
@@ -437,7 +438,7 @@ Querying :program:`MPD`'s status
|
||||
- ``albums``: number of albums
|
||||
- ``songs``: number of songs
|
||||
- ``uptime``: daemon uptime in seconds
|
||||
- ``db_playtime``: sum of all song times in the db
|
||||
- ``db_playtime``: sum of all song times in the database in seconds
|
||||
- ``db_update``: last db update in UNIX time
|
||||
- ``playtime``: time length of music played
|
||||
|
||||
@@ -599,7 +600,7 @@ Whenever possible, ids should be used.
|
||||
Deletes the song ``SONGID`` from the
|
||||
playlist
|
||||
|
||||
:command:`move {FROM} [{START:END} | {TO}]`
|
||||
:command:`move [{FROM} | {START:END}] {TO}`
|
||||
Moves the song at ``FROM`` or range of songs
|
||||
at ``START:END`` [#since_0_15]_ to ``TO``
|
||||
in the playlist.
|
||||
@@ -860,8 +861,7 @@ The music database
|
||||
:command:`list {TYPE} {FILTER} [group {GROUPTYPE}]`
|
||||
Lists unique tags values of the specified type.
|
||||
``TYPE`` can be any tag supported by
|
||||
:program:`MPD` or
|
||||
*file*.
|
||||
:program:`MPD`.
|
||||
|
||||
Additional arguments may specify a :ref:`filter <filter_syntax>`.
|
||||
The *group* keyword may be used
|
||||
@@ -872,6 +872,10 @@ The music database
|
||||
|
||||
list album group albumartist
|
||||
|
||||
``list file`` was implemented in an early :program:`MPD` version,
|
||||
but does not appear to make a lot of sense. It still works (to
|
||||
avoid breaking compatibility), but is deprecated.
|
||||
|
||||
.. _command_listall:
|
||||
|
||||
:command:`listall [URI]`
|
||||
@@ -1053,7 +1057,8 @@ Stickers
|
||||
"Stickers" [#since_0_15]_ are pieces of
|
||||
information attached to existing
|
||||
:program:`MPD` objects (e.g. song files,
|
||||
directories, albums). Clients can create arbitrary name/value
|
||||
directories, albums; but currently, they are only implemented for
|
||||
song). Clients can create arbitrary name/value
|
||||
pairs. :program:`MPD` itself does not assume
|
||||
any special meaning in them.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
project(
|
||||
'mpd',
|
||||
['c', 'cpp'],
|
||||
version: '0.21.7',
|
||||
version: '0.21.8',
|
||||
meson_version: '>= 0.49.0',
|
||||
default_options: [
|
||||
'c_std=c99',
|
||||
@@ -367,8 +367,10 @@ basic_dep = declare_dependency(
|
||||
|
||||
if enable_database
|
||||
subdir('src/storage')
|
||||
subdir('src/db')
|
||||
else
|
||||
storage_glue_dep = dependency('', required: false)
|
||||
endif
|
||||
subdir('src/db')
|
||||
|
||||
if neighbor_glue_dep.found()
|
||||
sources += 'src/command/NeighborCommands.cxx'
|
||||
|
||||
@@ -392,7 +392,7 @@ libnfs = AutotoolsProject(
|
||||
)
|
||||
|
||||
boost = BoostProject(
|
||||
'http://downloads.sourceforge.net/project/boost/boost/1.69.0/boost_1_69_0.tar.bz2',
|
||||
'8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406',
|
||||
'http://downloads.sourceforge.net/project/boost/boost/1.70.0/boost_1_70_0.tar.bz2',
|
||||
'430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778',
|
||||
'include/boost/version.hpp',
|
||||
)
|
||||
|
||||
@@ -108,17 +108,17 @@ static constexpr Domain cmdline_domain("cmdline");
|
||||
gcc_noreturn
|
||||
static void version(void)
|
||||
{
|
||||
printf("Music Player Daemon " VERSION " (%s)\n"
|
||||
printf("Music Player Daemon " VERSION " (%s)"
|
||||
"\n"
|
||||
"Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>\n"
|
||||
"Copyright 2008-2018 Max Kellermann <max.kellermann@gmail.com>\n"
|
||||
"This is free software; see the source for copying conditions. There is NO\n"
|
||||
"warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||
"warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n",
|
||||
GIT_VERSION);
|
||||
|
||||
#ifdef ENABLE_DATABASE
|
||||
"\n"
|
||||
"Database plugins:\n",
|
||||
GIT_VERSION);
|
||||
printf("\n"
|
||||
"Database plugins:\n");
|
||||
|
||||
for (auto i = database_plugins; *i != nullptr; ++i)
|
||||
printf(" %s", (*i)->name);
|
||||
@@ -129,18 +129,18 @@ static void version(void)
|
||||
for (auto i = storage_plugins; *i != nullptr; ++i)
|
||||
printf(" %s", (*i)->name);
|
||||
|
||||
printf("\n"
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
||||
"\n"
|
||||
printf("\n"
|
||||
"Neighbor plugins:\n");
|
||||
for (auto i = neighbor_plugins; *i != nullptr; ++i)
|
||||
printf(" %s", (*i)->name);
|
||||
|
||||
printf("\n"
|
||||
#endif
|
||||
|
||||
printf("\n"
|
||||
"\n"
|
||||
"Decoders plugins:\n");
|
||||
|
||||
|
||||
@@ -55,14 +55,26 @@ LocateFileUri(const char *uri, const Client *client
|
||||
}
|
||||
|
||||
static LocatedUri
|
||||
LocateAbsoluteUri(const char *uri
|
||||
LocateAbsoluteUri(UriPluginKind kind, const char *uri
|
||||
#ifdef ENABLE_DATABASE
|
||||
, const Storage *storage
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (!uri_supported_scheme(uri))
|
||||
throw std::runtime_error("Unsupported URI scheme");
|
||||
switch (kind) {
|
||||
case UriPluginKind::INPUT:
|
||||
case UriPluginKind::STORAGE: // TODO: separate check for storage plugins
|
||||
if (!uri_supported_scheme(uri))
|
||||
throw std::runtime_error("Unsupported URI scheme");
|
||||
break;
|
||||
|
||||
case UriPluginKind::PLAYLIST:
|
||||
/* for now, no validation for playlist URIs; this is
|
||||
more complicated because there are three ways to
|
||||
identify which plugin to use: URI scheme, filename
|
||||
suffix and MIME type */
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_DATABASE
|
||||
if (storage != nullptr) {
|
||||
@@ -76,7 +88,8 @@ LocateAbsoluteUri(const char *uri
|
||||
}
|
||||
|
||||
LocatedUri
|
||||
LocateUri(const char *uri, const Client *client
|
||||
LocateUri(UriPluginKind kind,
|
||||
const char *uri, const Client *client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, const Storage *storage
|
||||
#endif
|
||||
@@ -100,7 +113,7 @@ LocateUri(const char *uri, const Client *client
|
||||
#endif
|
||||
);
|
||||
else if (uri_has_scheme(uri))
|
||||
return LocateAbsoluteUri(uri
|
||||
return LocateAbsoluteUri(kind, uri
|
||||
#ifdef ENABLE_DATABASE
|
||||
, storage
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,12 @@ class Client;
|
||||
class Storage;
|
||||
#endif
|
||||
|
||||
enum class UriPluginKind {
|
||||
INPUT,
|
||||
STORAGE,
|
||||
PLAYLIST,
|
||||
};
|
||||
|
||||
struct LocatedUri {
|
||||
enum class Type {
|
||||
/**
|
||||
@@ -84,7 +90,8 @@ struct LocatedUri {
|
||||
* that feature is disabled if this parameter is nullptr
|
||||
*/
|
||||
LocatedUri
|
||||
LocateUri(const char *uri, const Client *client
|
||||
LocateUri(UriPluginKind kind,
|
||||
const char *uri, const Client *client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, const Storage *storage
|
||||
#endif
|
||||
|
||||
@@ -94,7 +94,8 @@ SongLoader::LoadSong(const char *uri_utf8) const
|
||||
assert(uri_utf8 != nullptr);
|
||||
#endif
|
||||
|
||||
const auto located_uri = LocateUri(uri_utf8, client
|
||||
const auto located_uri = LocateUri(UriPluginKind::INPUT,
|
||||
uri_utf8, client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, storage
|
||||
#endif
|
||||
|
||||
@@ -218,7 +218,7 @@ handle_read_comments(Client &client, Request args, Response &r)
|
||||
|
||||
const char *const uri = args.front();
|
||||
|
||||
const auto located_uri = LocateUri(uri, &client
|
||||
const auto located_uri = LocateUri(UriPluginKind::INPUT, uri, &client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
@@ -331,7 +331,7 @@ handle_album_art(Client &client, Request args, Response &r)
|
||||
const char *uri = args.front();
|
||||
size_t offset = args.ParseUnsigned(1);
|
||||
|
||||
const auto located_uri = LocateUri(uri, &client
|
||||
const auto located_uri = LocateUri(UriPluginKind::INPUT, uri, &client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
|
||||
@@ -99,7 +99,7 @@ handle_listfiles(Client &client, Request args, Response &r)
|
||||
/* default is root directory */
|
||||
const auto uri = args.GetOptional(0, "");
|
||||
|
||||
const auto located_uri = LocateUri(uri, &client
|
||||
const auto located_uri = LocateUri(UriPluginKind::STORAGE, uri, &client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
@@ -219,7 +219,7 @@ handle_lsinfo(Client &client, Request args, Response &r)
|
||||
compatibility, work around this here */
|
||||
uri = "";
|
||||
|
||||
const auto located_uri = LocateUri(uri, &client
|
||||
const auto located_uri = LocateUri(UriPluginKind::INPUT, uri, &client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
|
||||
@@ -69,7 +69,8 @@ handle_save(Client &client, Request args, gcc_unused Response &r)
|
||||
CommandResult
|
||||
handle_load(Client &client, Request args, gcc_unused Response &r)
|
||||
{
|
||||
const auto uri = LocateUri(args.front(), &client
|
||||
const auto uri = LocateUri(UriPluginKind::PLAYLIST, args.front(),
|
||||
&client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
@@ -99,7 +100,8 @@ handle_load(Client &client, Request args, gcc_unused Response &r)
|
||||
CommandResult
|
||||
handle_listplaylist(Client &client, Request args, Response &r)
|
||||
{
|
||||
const auto name = LocateUri(args.front(), &client
|
||||
const auto name = LocateUri(UriPluginKind::PLAYLIST, args.front(),
|
||||
&client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
@@ -115,7 +117,8 @@ handle_listplaylist(Client &client, Request args, Response &r)
|
||||
CommandResult
|
||||
handle_listplaylistinfo(Client &client, Request args, Response &r)
|
||||
{
|
||||
const auto name = LocateUri(args.front(), &client
|
||||
const auto name = LocateUri(UriPluginKind::PLAYLIST, args.front(),
|
||||
&client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
|
||||
@@ -83,7 +83,8 @@ handle_add(Client &client, Request args, Response &r)
|
||||
here */
|
||||
uri = "";
|
||||
|
||||
const auto located_uri = LocateUri(uri, &client
|
||||
const auto located_uri = LocateUri(UriPluginKind::INPUT, uri,
|
||||
&client
|
||||
#ifdef ENABLE_DATABASE
|
||||
, nullptr
|
||||
#endif
|
||||
|
||||
@@ -9,6 +9,11 @@ db_api_dep = declare_dependency(
|
||||
link_with: db_api,
|
||||
)
|
||||
|
||||
if not enable_database
|
||||
db_glue_dep = db_api_dep
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
subdir('plugins')
|
||||
|
||||
db_glue_sources = [
|
||||
|
||||
@@ -568,7 +568,8 @@ ProxyDatabase::OnSocketReady(gcc_unused unsigned flags) noexcept
|
||||
if (!is_idle) {
|
||||
// TODO: can this happen?
|
||||
IdleMonitor::Schedule();
|
||||
return false;
|
||||
SocketMonitor::Cancel();
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned idle = (unsigned)mpd_recv_idle(connection, false);
|
||||
@@ -586,7 +587,8 @@ ProxyDatabase::OnSocketReady(gcc_unused unsigned flags) noexcept
|
||||
idle_received |= idle;
|
||||
is_idle = false;
|
||||
IdleMonitor::Schedule();
|
||||
return false;
|
||||
SocketMonitor::Cancel();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -110,15 +110,9 @@ BufferedSocket::OnSocketReady(unsigned flags) noexcept
|
||||
if (flags & READ) {
|
||||
assert(!input.IsFull());
|
||||
|
||||
if (!ReadToBuffer())
|
||||
if (!ReadToBuffer() || !ResumeInput())
|
||||
return false;
|
||||
|
||||
if (!ResumeInput())
|
||||
/* we must return "true" here or
|
||||
SocketMonitor::Dispatch() will call
|
||||
Cancel() on a freed object */
|
||||
return true;
|
||||
|
||||
if (!input.IsFull())
|
||||
ScheduleRead();
|
||||
}
|
||||
|
||||
@@ -46,6 +46,11 @@ public:
|
||||
using SocketMonitor::Close;
|
||||
|
||||
private:
|
||||
/**
|
||||
* @return the number of bytes read from the socket, 0 if the
|
||||
* socket isn't ready for reading, -1 on error (the socket has
|
||||
* been closed and probably destructed)
|
||||
*/
|
||||
ssize_t DirectRead(void *data, size_t length) noexcept;
|
||||
|
||||
/**
|
||||
|
||||
@@ -45,6 +45,11 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
* @return the number of bytes written to the socket, 0 if the
|
||||
* socket isn't ready for writing, -1 on error (the socket has
|
||||
* been closed and probably destructed)
|
||||
*/
|
||||
ssize_t DirectWrite(const void *data, size_t length) noexcept;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -33,8 +33,8 @@ SocketMonitor::Dispatch(unsigned flags) noexcept
|
||||
{
|
||||
flags &= GetScheduledFlags();
|
||||
|
||||
if (flags != 0 && !OnSocketReady(flags) && IsDefined())
|
||||
Cancel();
|
||||
if (flags != 0)
|
||||
OnSocketReady(flags);
|
||||
}
|
||||
|
||||
SocketMonitor::~SocketMonitor() noexcept
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "lib/smbclient/Mutex.hxx"
|
||||
#include "../InputStream.hxx"
|
||||
#include "../InputPlugin.hxx"
|
||||
#include "../MaybeBufferedInputStream.hxx"
|
||||
#include "PluginUnavailable.hxx"
|
||||
#include "system/Error.hxx"
|
||||
#include "util/ASCII.hxx"
|
||||
@@ -112,8 +113,9 @@ input_smbclient_open(const char *uri,
|
||||
throw MakeErrno(e, "smbc_fstat() failed");
|
||||
}
|
||||
|
||||
return std::make_unique<SmbclientInputStream>(uri, mutex,
|
||||
ctx, fd, st);
|
||||
return std::make_unique<MaybeBufferedInputStream>
|
||||
(std::make_unique<SmbclientInputStream>(uri, mutex,
|
||||
ctx, fd, st));
|
||||
}
|
||||
|
||||
size_t
|
||||
|
||||
@@ -150,8 +150,6 @@ ReadServers(NeighborExplorer::List &list, int fd)
|
||||
smbc_dirent *e;
|
||||
while ((e = smbc_readdir(fd)) != nullptr)
|
||||
ReadEntry(list, *e);
|
||||
|
||||
smbc_closedir(fd);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
}
|
||||
|
||||
constexpr operator SocketAddress() const noexcept {
|
||||
return SocketAddress((const struct sockaddr *)&address,
|
||||
return SocketAddress((const struct sockaddr *)(const void *)&address,
|
||||
sizeof(address));
|
||||
}
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
}
|
||||
|
||||
constexpr operator SocketAddress() const noexcept {
|
||||
return SocketAddress((const struct sockaddr *)&address,
|
||||
return SocketAddress((const struct sockaddr *)(const void *)&address,
|
||||
sizeof(address));
|
||||
}
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ HttpdClient::SendResponse() noexcept
|
||||
FormatWarning(httpd_output_domain,
|
||||
"failed to write to client: %s",
|
||||
(const char *)msg);
|
||||
Close();
|
||||
LockClose();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -428,6 +428,7 @@ void
|
||||
HttpdClient::OnSocketError(std::exception_ptr ep) noexcept
|
||||
{
|
||||
LogError(ep);
|
||||
LockClose();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -142,6 +142,8 @@ public:
|
||||
|
||||
/**
|
||||
* Frees the client and removes it from the server's client list.
|
||||
*
|
||||
* Caller must lock the mutex.
|
||||
*/
|
||||
void Close() noexcept;
|
||||
|
||||
|
||||
@@ -208,10 +208,15 @@ public:
|
||||
return HasClients();
|
||||
}
|
||||
|
||||
/**
|
||||
* Caller must lock the mutex.
|
||||
*/
|
||||
void AddClient(UniqueSocketDescriptor fd) noexcept;
|
||||
|
||||
/**
|
||||
* Removes a client from the httpd_output.clients linked list.
|
||||
*
|
||||
* Caller must lock the mutex.
|
||||
*/
|
||||
void RemoveClient(HttpdClient &client) noexcept;
|
||||
|
||||
@@ -239,10 +244,14 @@ public:
|
||||
|
||||
/**
|
||||
* Broadcasts data from the encoder to all clients.
|
||||
*
|
||||
* Mutext must not be locked.
|
||||
*/
|
||||
void BroadcastFromEncoder();
|
||||
|
||||
/**
|
||||
* Mutext must not be locked.
|
||||
*
|
||||
* Throws #std::runtime_error on error.
|
||||
*/
|
||||
void EncodeAndPlay(const void *chunk, size_t size);
|
||||
@@ -251,6 +260,9 @@ public:
|
||||
|
||||
size_t Play(const void *chunk, size_t size) override;
|
||||
|
||||
/**
|
||||
* Mutext must not be locked.
|
||||
*/
|
||||
void CancelAllClients() noexcept;
|
||||
|
||||
void Cancel() noexcept override;
|
||||
|
||||
@@ -50,7 +50,7 @@ protected:
|
||||
/* virtual methods from class SocketMonitor */
|
||||
bool OnSocketReady(gcc_unused unsigned flags) noexcept override {
|
||||
DNSServiceProcessResult(service_ref);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[Socket]
|
||||
ListenStream=/run/mpd/socket
|
||||
ListenStream=%t/mpd/socket
|
||||
ListenStream=6600
|
||||
Backlog=5
|
||||
KeepAlive=true
|
||||
|
||||
@@ -3,6 +3,12 @@ if systemd_user_unit_dir == ''
|
||||
systemd_user_unit_dir = join_paths(get_option('prefix'), 'lib', 'systemd', 'user')
|
||||
endif
|
||||
|
||||
# copy the system socket unit to the "user" directory
|
||||
install_data(
|
||||
join_paths('..', 'system', 'mpd.socket'),
|
||||
install_dir: systemd_user_unit_dir,
|
||||
)
|
||||
|
||||
configure_file(
|
||||
input: 'mpd.service.in',
|
||||
output: 'mpd.service',
|
||||
|
||||
Reference in New Issue
Block a user