Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
99659e4c
Commit
99659e4c
authored
Dec 13, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'v0.19.21'
release v0.19.21
parents
dc05dd7c
3bbcda91
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
94 additions
and
24 deletions
+94
-24
.gitignore
.gitignore
+2
-1
Makefile.am
Makefile.am
+8
-3
NEWS
NEWS
+6
-0
configure.ac
configure.ac
+18
-1
user.xml
doc/user.xml
+28
-1
FfmpegDecoderPlugin.cxx
src/decoder/plugins/FfmpegDecoderPlugin.cxx
+1
-3
mpd.service.in
systemd/system/mpd.service.in
+0
-0
mpd.socket
systemd/system/mpd.socket
+0
-0
mpd.service.in
systemd/user/mpd.service.in
+31
-0
test_queue_priority.cxx
test/test_queue_priority.cxx
+0
-15
No files found.
.gitignore
View file @
99659e4c
...
@@ -35,7 +35,8 @@ tags
...
@@ -35,7 +35,8 @@ tags
/mkinstalldirs
/mkinstalldirs
/build
/build
/src/mpd
/src/mpd
/systemd/mpd.service
/systemd/system/mpd.service
/systemd/user/mpd.service
/stamp-h1
/stamp-h1
/src/dsd2pcm/dsd2pcm
/src/dsd2pcm/dsd2pcm
...
...
Makefile.am
View file @
99659e4c
...
@@ -1599,8 +1599,13 @@ FILTER_LIBS = \
...
@@ -1599,8 +1599,13 @@ FILTER_LIBS = \
if
HAVE_SYSTEMD
if
HAVE_SYSTEMD
systemdsystemunit_DATA
=
\
systemdsystemunit_DATA
=
\
systemd/mpd.socket
\
systemd/system/mpd.socket
\
systemd/mpd.service
systemd/system/mpd.service
endif
if
HAVE_SYSTEMD_USER
systemduserunit_DATA
=
\
systemd/user/mpd.service
endif
endif
...
@@ -2356,7 +2361,7 @@ EXTRA_DIST = $(doc_DATA) autogen.sh \
...
@@ -2356,7 +2361,7 @@ EXTRA_DIST = $(doc_DATA) autogen.sh \
$
(
wildcard
$(srcdir)
/scripts/
*
.rb
)
\
$
(
wildcard
$(srcdir)
/scripts/
*
.rb
)
\
$(man_MANS)
$(DOCBOOK_FILES)
doc/mpdconf.example doc/doxygen.conf
\
$(man_MANS)
$(DOCBOOK_FILES)
doc/mpdconf.example doc/doxygen.conf
\
$
(
wildcard
$(srcdir)
/doc/include/
*
.xml
)
\
$
(
wildcard
$(srcdir)
/doc/include/
*
.xml
)
\
systemd/mpd.socket
\
systemd/
system/
mpd.socket
\
android/AndroidManifest.xml
\
android/AndroidManifest.xml
\
android/build.py
\
android/build.py
\
android/custom_rules.xml
\
android/custom_rules.xml
\
...
...
NEWS
View file @
99659e4c
...
@@ -62,6 +62,12 @@ ver 0.20 (not yet released)
...
@@ -62,6 +62,12 @@ ver 0.20 (not yet released)
* switch the code base to C++14
* switch the code base to C++14
- GCC 4.9 or clang 3.4 (or newer) recommended
- GCC 4.9 or clang 3.4 (or newer) recommended
ver 0.19.21 (2016/12/13)
* decoder
- ffmpeg: fix crash bug
* fix unit test failure after recent "setprio" change
* systemd: add user unit
ver 0.19.20 (2016/12/09)
ver 0.19.20 (2016/12/09)
* protocol
* protocol
- "setprio" re-enqueues old song if priority has been raised
- "setprio" re-enqueues old song if priority has been raised
...
...
configure.ac
View file @
99659e4c
...
@@ -52,6 +52,22 @@ if test "x$with_systemdsystemunitdir" != xno; then
...
@@ -52,6 +52,22 @@ if test "x$with_systemdsystemunitdir" != xno; then
fi
fi
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
AC_ARG_WITH([systemduserunitdir],
AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd service files]),
[], [with_systemduserunitdir=no])
if test "x$with_systemduserunitdir" = xyes; then
AC_MSG_CHECKING(for systemd)
with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)
if test -z "$with_systemduserunitdir"; then
AC_MSG_ERROR([Failed to detect systemd])
fi
AC_MSG_RESULT([$with_systemduserunitdir])
fi
if test "x$with_systemduserunitdir" != xno; then
AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
fi
AM_CONDITIONAL(HAVE_SYSTEMD_USER, [test -n "$with_systemduserunitdir" -a "x$with_systemduserunitdir" != xno ])
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
dnl Declare Variables
dnl Declare Variables
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
...
@@ -1498,7 +1514,8 @@ dnl Generate files
...
@@ -1498,7 +1514,8 @@ dnl Generate files
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(doc/doxygen.conf)
AC_CONFIG_FILES(doc/doxygen.conf)
AC_CONFIG_FILES(systemd/mpd.service)
AC_CONFIG_FILES(systemd/system/mpd.service)
AC_CONFIG_FILES(systemd/user/mpd.service)
AC_OUTPUT
AC_OUTPUT
echo 'MPD is ready for compilation, type "make" to begin.'
echo 'MPD is ready for compilation, type "make" to begin.'
doc/user.xml
View file @
99659e4c
...
@@ -151,7 +151,7 @@ apt-get install g++ \
...
@@ -151,7 +151,7 @@ apt-get install g++ \
<application>
systemd
</application>
unit files: a "service"
<application>
systemd
</application>
unit files: a "service"
unit and a "socket" unit. These will only be installed when
unit and a "socket" unit. These will only be installed when
<application>
MPD
</application>
was configured with
<application>
MPD
</application>
was configured with
<parameter>
--with-systemdsystemunitdir=/lib/systemd
</parameter>
.
<parameter>
--with-systemdsystemunitdir=/lib/systemd
/system
</parameter>
.
</para>
</para>
<para>
<para>
...
@@ -167,6 +167,33 @@ systemctl start mpd.socket</programlisting>
...
@@ -167,6 +167,33 @@ systemctl start mpd.socket</programlisting>
<varname>
port
</varname>
settings.
<varname>
port
</varname>
settings.
</para>
</para>
</section>
</section>
<section
id=
"systemd_user"
>
<title><filename>
systemd
</filename>
user unit
</title>
<para>
You can launch
<application>
MPD
</application>
as a
<filename>
systemd
</filename>
user unit. The service file will
only be installed when
<application>
MPD
</application>
was
configured with
<parameter>
--with-systemduserunitdir=/usr/lib/systemd/user
</parameter>
or
<parameter>
--with-systemduserunitdir=$HOME/.local/share/systemd/user
</parameter>
.
</para>
<para>
Once the user unit is installed, you can start and stop
<application>
MPD
</application>
like any other service:
</para>
<programlisting>
systemctl --user start mpd
</programlisting>
<para>
To auto-start
<application>
MPD
</application>
upon login, type:
</para>
<programlisting>
systemctl --user enable mpd
</programlisting>
</section>
</chapter>
</chapter>
<chapter
id=
"config"
>
<chapter
id=
"config"
>
...
...
src/decoder/plugins/FfmpegDecoderPlugin.cxx
View file @
99659e4c
...
@@ -68,10 +68,8 @@ FfmpegOpenInput(AVIOContext *pb,
...
@@ -68,10 +68,8 @@ FfmpegOpenInput(AVIOContext *pb,
context
->
pb
=
pb
;
context
->
pb
=
pb
;
int
err
=
avformat_open_input
(
&
context
,
filename
,
fmt
,
nullptr
);
int
err
=
avformat_open_input
(
&
context
,
filename
,
fmt
,
nullptr
);
if
(
err
<
0
)
{
if
(
err
<
0
)
avformat_free_context
(
context
);
throw
MakeFfmpegError
(
err
,
"avformat_open_input() failed"
);
throw
MakeFfmpegError
(
err
,
"avformat_open_input() failed"
);
}
return
context
;
return
context
;
}
}
...
...
systemd/mpd.service.in
→
systemd/
system/
mpd.service.in
View file @
99659e4c
File moved
systemd/mpd.socket
→
systemd/
system/
mpd.socket
View file @
99659e4c
File moved
systemd/user/mpd.service.in
0 → 100644
View file @
99659e4c
[Unit]
Description=Music Player Daemon
Documentation=man:mpd(1) man:mpd.conf(5)
After=network.target sound.target
[Service]
Type=notify
ExecStart=@prefix@/bin/mpd --no-daemon
# allow MPD to use real-time priority 50
LimitRTPRIO=50
LimitRTTIME=infinity
# disallow writing to /usr, /bin, /sbin, ...
ProtectSystem=yes
# more paranoid security settings
NoNewPrivileges=yes
ProtectKernelTunables=yes
ProtectControlGroups=yes
# AF_NETLINK is required by libsmbclient, or it will exit() .. *sigh*
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
RestrictNamespaces=yes
# Note that "ProtectKernelModules=yes" is missing in the user unit
# because systemd 232 is unable to reduce its own capabilities
# ("Failed at step CAPABILITIES spawning /usr/bin/mpd: Operation not
# permitted")
[Install]
WantedBy=default.target
test/test_queue_priority.cxx
View file @
99659e4c
...
@@ -164,21 +164,6 @@ QueuePriorityTest::TestPriority()
...
@@ -164,21 +164,6 @@ QueuePriorityTest::TestPriority()
check_descending_priority
(
&
queue
,
current_order
+
1
);
check_descending_priority
(
&
queue
,
current_order
+
1
);
/* priority=60 for the old prio50 item; must not be moved,
because it's before the current song, and it's status
hasn't changed (it was already higher before) */
unsigned
c_order
=
0
;
unsigned
c_position
=
queue
.
OrderToPosition
(
c_order
);
CPPUNIT_ASSERT_EQUAL
(
50u
,
unsigned
(
queue
.
items
[
c_position
].
priority
));
queue
.
SetPriority
(
c_position
,
60
,
current_order
);
current_order
=
queue
.
PositionToOrder
(
current_position
);
CPPUNIT_ASSERT_EQUAL
(
3u
,
current_order
);
c_order
=
queue
.
PositionToOrder
(
c_position
);
CPPUNIT_ASSERT_EQUAL
(
0u
,
c_order
);
/* move the prio=20 item back */
/* move the prio=20 item back */
a_order
=
queue
.
PositionToOrder
(
a_position
);
a_order
=
queue
.
PositionToOrder
(
a_position
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment