Compare commits

...

14 Commits

Author SHA1 Message Date
Max Kellermann
ab197b6d43 release v0.20.20 2018-05-22 12:40:18 +02:00
Max Kellermann
16b0e53a36 android/AndroidManifest.xml: increment version number to 0.20.20 2018-05-22 12:40:11 +02:00
Max Kellermann
bc14a6038e Makefile.am: invoke javac with source/target 1.6
Fixes:

```
error: Source option 5 is no longer supported. Use 6 or later.
error: Target option 1.5 is no longer supported. Use 1.6 or later.
```
2018-05-22 12:37:01 +02:00
Max Kellermann
626329a1cc python/build/meson.py: create build_path if it does not exist 2018-05-22 12:31:37 +02:00
Max Kellermann
8bf250c228 python/build/libs: upgrade CURL to 7.60.0 2018-05-22 11:17:19 +02:00
Max Kellermann
62127bbb12 python/build/libs.py: add libmpdclient 2018-05-12 16:24:24 +02:00
Max Kellermann
786ac87b76 python/build: add support for Meson/ninja based projects 2018-05-12 15:00:17 +02:00
Max Kellermann
c76f4ac89b player/Thread: pause all outputs in single mode
This mostly affects the Pulse output plugin which needs to "cork" the
stream (closes #278).
2018-05-12 14:44:07 +02:00
Michal Koutenský
d495ec71a8 decoder/opus: add support for R128_ALBUM_GAIN tag 2018-05-07 10:57:03 +02:00
Max Kellermann
b763852f57 decoder/dsd: allow 4 MB ID3 tags
Closes #277
2018-05-07 10:53:48 +02:00
Max Kellermann
6522d2f722 decoder/{dsdiff,dsf}: support more MIME types
These are used by DSD-streaming servers.  For example, MiniDLNA uses
"audio/x-dsd".
2018-05-03 12:02:11 +02:00
Max Kellermann
ac61fd1d78 {input,output}/alsa: work around -Wswitch due to SND_PCM_STATE_PRIVATE1 2018-05-03 11:59:18 +02:00
Max Kellermann
c44d1566fa SongFilter: fix "modified-since" filter
Error message sent to client was "basic_string::_M_construct null not
valid" due to passing nullptr to the std::string constructor.

Regression caused by commit 386688b87a
2018-04-30 20:34:25 +02:00
Max Kellermann
80dc7c2f74 increment version number to 0.20.20 2018-04-30 20:32:36 +02:00
16 changed files with 151 additions and 9 deletions

View File

@@ -330,7 +330,7 @@ android/build/gen/org/musicpd/R.java: android/build/resources.apk
android/build/classes.dex: $(JAVA_SOURCE_PATHS) android/build/gen/org/musicpd/R.java android/build/classes.dex: $(JAVA_SOURCE_PATHS) android/build/gen/org/musicpd/R.java
@$(MKDIR_P) $(JAVA_CLASSFILES_DIR) @$(MKDIR_P) $(JAVA_CLASSFILES_DIR)
$(JAVAC) -source 1.5 -target 1.5 -Xlint:-options \ $(JAVAC) -source 1.6 -target 1.6 -Xlint:-options \
-cp $(ANDROID_SDK_PLATFORM_DIR)/android.jar:$(JAVA_CLASSFILES_DIR) \ -cp $(ANDROID_SDK_PLATFORM_DIR)/android.jar:$(JAVA_CLASSFILES_DIR) \
-d $(JAVA_CLASSFILES_DIR) $^ -d $(JAVA_CLASSFILES_DIR) $^
$(DX) --dex --output $@ $(JAVA_CLASSFILES_DIR) $(DX) --dex --output $@ $(JAVA_CLASSFILES_DIR)

12
NEWS
View File

@@ -1,3 +1,15 @@
ver 0.20.20 (2018/05/22)
* protocol
- fix "modified-since" filter regression
* output
- pulse: cork stream when paused due to "single" mode
* decoder
- dsdiff, dsf: support more MIME types
- dsdiff, dsf: allow 4 MB ID3 tags
- opus: support R128_ALBUM_GAIN tag
* Android, Windows
- enable the "proxy" database plugin
ver 0.20.19 (2018/04/26) ver 0.20.19 (2018/04/26)
* protocol * protocol
- validate absolute seek time, reject negative values - validate absolute seek time, reject negative values

View File

@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.musicpd" package="org.musicpd"
android:installLocation="auto" android:installLocation="auto"
android:versionCode="18" android:versionCode="19"
android:versionName="0.20.19"> android:versionName="0.20.20">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/> <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/>

View File

@@ -138,6 +138,7 @@ class AndroidNdkToolchain:
# a list of third-party libraries to be used by MPD on Android # a list of third-party libraries to be used by MPD on Android
from build.libs import * from build.libs import *
thirdparty_libs = [ thirdparty_libs = [
libmpdclient,
libogg, libogg,
libvorbis, libvorbis,
opus, opus,

View File

@@ -1,10 +1,10 @@
AC_PREREQ(2.60) AC_PREREQ(2.60)
AC_INIT(mpd, 0.20.19, musicpd-dev-team@lists.sourceforge.net) AC_INIT(mpd, 0.20.20, musicpd-dev-team@lists.sourceforge.net)
VERSION_MAJOR=0 VERSION_MAJOR=0
VERSION_MINOR=20 VERSION_MINOR=20
VERSION_REVISION=19 VERSION_REVISION=20
VERSION_EXTRA=0 VERSION_EXTRA=0
AC_CONFIG_SRCDIR([src/Main.cxx]) AC_CONFIG_SRCDIR([src/Main.cxx])

View File

@@ -3,10 +3,17 @@ from os.path import abspath
from build.project import Project from build.project import Project
from build.zlib import ZlibProject from build.zlib import ZlibProject
from build.meson import MesonProject
from build.autotools import AutotoolsProject from build.autotools import AutotoolsProject
from build.ffmpeg import FfmpegProject from build.ffmpeg import FfmpegProject
from build.boost import BoostProject from build.boost import BoostProject
libmpdclient = MesonProject(
'https://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.14.tar.xz',
'0a84e2791bfe3077cf22ee1784c805d5bb550803dffe56a39aa3690a38061372',
'lib/libmpdclient.a',
)
libogg = AutotoolsProject( libogg = AutotoolsProject(
'http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.xz', 'http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.xz',
'4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08', '4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08',
@@ -334,8 +341,8 @@ ffmpeg = FfmpegProject(
) )
curl = AutotoolsProject( curl = AutotoolsProject(
'http://curl.haxx.se/download/curl-7.59.0.tar.xz', 'http://curl.haxx.se/download/curl-7.60.0.tar.xz',
'e44eaabdf916407585bf5c7939ff1161e6242b6b015d3f2f5b758b2a330461fc', '8736ff8ded89ddf7e926eec7b16f82597d029fc1469f3a551f1fafaac164e6a0',
'lib/libcurl.a', 'lib/libcurl.a',
[ [
'--disable-shared', '--enable-static', '--disable-shared', '--enable-static',

96
python/build/meson.py Normal file
View File

@@ -0,0 +1,96 @@
import os.path, subprocess, sys
from build.project import Project
class MesonProject(Project):
def __init__(self, url, md5, installed, configure_args=[],
**kwargs):
Project.__init__(self, url, md5, installed, **kwargs)
self.configure_args = configure_args
def _make_cross_file(self, toolchain):
if toolchain.is_windows:
system = 'windows'
else:
system = 'linux'
if toolchain.is_arm:
cpu_family = 'arm'
if toolchain.is_armv7:
cpu = 'armv7'
else:
cpu = 'armv6'
else:
cpu_family = 'x86'
if 'x86_64' in toolchain.arch:
cpu = 'x86_64'
else:
cpu = 'i686'
# TODO: support more CPUs
endian = 'little'
# TODO: write pkg-config wrapper
path = os.path.join(toolchain.build_path, 'meson.cross')
os.makedirs(toolchain.build_path, exist_ok=True)
with open(path, 'w') as f:
f.write("""
[binaries]
c = '%s'
cpp = '%s'
ar = '%s'
strip = '%s'
[properties]
root = '%s'
c_args = %s
c_link_args = %s
cpp_args = %s
cpp_link_args = %s
[host_machine]
system = '%s'
cpu_family = '%s'
cpu = '%s'
endian = '%s'
""" % (toolchain.cc, toolchain.cxx, toolchain.ar, toolchain.strip,
toolchain.install_prefix,
repr((toolchain.cppflags + ' ' + toolchain.cflags).split()),
repr(toolchain.ldflags.split()),
repr((toolchain.cppflags + ' ' + toolchain.cxxflags).split()),
repr(toolchain.ldflags.split()),
system, cpu_family, cpu, endian))
return path
def configure(self, toolchain):
src = self.unpack(toolchain)
cross_file = self._make_cross_file(toolchain)
build = self.make_build_path(toolchain)
configure = [
'meson',
src, build,
'--prefix', toolchain.install_prefix,
# this is necessary because Meson uses Debian's build machine
# MultiArch path (e.g. "lib/x86_64-linux-gnu") for cross
# builds, which is obviously wrong
'--libdir', 'lib',
'--buildtype', 'plain',
'--default-library=static',
'--cross-file', cross_file,
] + self.configure_args
subprocess.check_call(configure, env=toolchain.env)
return build
def build(self, toolchain):
build = self.configure(toolchain)
subprocess.check_call(['ninja', 'install'],
cwd=build, env=toolchain.env)

View File

@@ -67,7 +67,7 @@ SongFilter::Item::Item(unsigned _tag, const char *_value, bool _fold_case)
} }
SongFilter::Item::Item(unsigned _tag, time_t _time) SongFilter::Item::Item(unsigned _tag, time_t _time)
:tag(_tag), value(nullptr), time(_time) :tag(_tag), time(_time)
{ {
} }

View File

@@ -128,7 +128,7 @@ dsdlib_tag_id3(InputStream &is,
return; return;
const auto count64 = size - tagoffset; const auto count64 = size - tagoffset;
if (count64 < 10 || count64 > 1024 * 1024) if (count64 < 10 || count64 > 4 * 1024 * 1024)
return; return;
if (!dsdlib_skip_to(nullptr, is, tagoffset)) if (!dsdlib_skip_to(nullptr, is, tagoffset))

View File

@@ -484,6 +484,8 @@ static const char *const dsdiff_suffixes[] = {
static const char *const dsdiff_mime_types[] = { static const char *const dsdiff_mime_types[] = {
"application/x-dff", "application/x-dff",
"audio/x-dff",
"audio/x-dsd",
nullptr nullptr
}; };

View File

@@ -358,6 +358,8 @@ static const char *const dsf_suffixes[] = {
static const char *const dsf_mime_types[] = { static const char *const dsf_mime_types[] = {
"application/x-dsf", "application/x-dsf",
"audio/x-dsf",
"audio/x-dsd",
nullptr nullptr
}; };

View File

@@ -53,6 +53,14 @@ ScanOneOpusTag(const char *name, const char *value,
long l = strtol(value, &endptr, 10); long l = strtol(value, &endptr, 10);
if (endptr > value && *endptr == 0) if (endptr > value && *endptr == 0)
rgi->track.gain = double(l) / 256.; rgi->track.gain = double(l) / 256.;
} else if (rgi != nullptr && strcmp(name, "R128_ALBUM_GAIN") == 0) {
/* R128_ALBUM_GAIN is a Q7.8 fixed point number in
dB */
char *endptr;
long l = strtol(value, &endptr, 10);
if (endptr > value && *endptr == 0)
rgi->album.gain = double(l) / 256.;
} }
tag_handler_invoke_pair(handler, ctx, name, value); tag_handler_invoke_pair(handler, ctx, name, value);

View File

@@ -270,6 +270,12 @@ AlsaInputStream::Recover(int err)
/* this is no error, so just keep running */ /* this is no error, so just keep running */
err = 0; err = 0;
break; break;
default:
/* this default case is just here to work around
-Wswitch due to SND_PCM_STATE_PRIVATE1 (libasound
1.1.6) */
break;
} }

View File

@@ -846,6 +846,12 @@ AlsaOutput::Recover(int err)
case SND_PCM_STATE_DRAINING: case SND_PCM_STATE_DRAINING:
err = 0; err = 0;
break; break;
default:
/* this default case is just here to work around
-Wswitch due to SND_PCM_STATE_PRIVATE1 (libasound
1.1.6) */
break;
} }
return err; return err;

View File

@@ -950,6 +950,7 @@ Player::SongBorder()
const bool border_pause = pc.LockApplyBorderPause(); const bool border_pause = pc.LockApplyBorderPause();
if (border_pause) { if (border_pause) {
paused = true; paused = true;
pc.outputs.Pause();
idle_add(IDLE_PLAYER); idle_add(IDLE_PLAYER);
} }
} }

View File

@@ -76,6 +76,7 @@ class CrossGccToolchain:
# a list of third-party libraries to be used by MPD on Android # a list of third-party libraries to be used by MPD on Android
from build.libs import * from build.libs import *
thirdparty_libs = [ thirdparty_libs = [
libmpdclient,
libogg, libogg,
libvorbis, libvorbis,
opus, opus,