From 9cba55b39c708587a25067bfc21013f301407c78 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 10:04:47 +0100 Subject: [PATCH 01/11] python/build/project.py: add "edits" parameter to edit source files --- python/build/project.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/python/build/project.py b/python/build/project.py index c79c4f5a1..087ca3d07 100644 --- a/python/build/project.py +++ b/python/build/project.py @@ -7,6 +7,7 @@ from build.tar import untar class Project: def __init__(self, url, md5, installed, name=None, version=None, base=None, + edits=None, use_cxx=False): if base is None: basename = os.path.basename(url) @@ -28,6 +29,7 @@ class Project: self.md5 = md5 self.installed = installed + self.edits = edits self.use_cxx = use_cxx def download(self, toolchain): @@ -47,7 +49,18 @@ class Project: parent_path = toolchain.src_path else: parent_path = toolchain.build_path - return untar(self.download(toolchain), parent_path, self.base) + path = untar(self.download(toolchain), parent_path, self.base) + + if self.edits is not None: + for filename, function in self.edits.items(): + with open(os.path.join(path, filename), 'r+t') as f: + old_data = f.read() + new_data = function(old_data) + f.seek(0) + f.truncate(0) + f.write(new_data) + + return path def make_build_path(self, toolchain): path = os.path.join(toolchain.build_path, self.base) From d667b5b48cff7f053ba0d7bf5811a77f66cedeb1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 10:25:16 +0100 Subject: [PATCH 02/11] python/build/libs.py: work around libid3tag CFLAGS bug --- python/build/libs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/build/libs.py b/python/build/libs.py index 8653ddb4c..305bd7636 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -1,3 +1,4 @@ +import re from build.project import Project from build.zlib import ZlibProject from build.autotools import AutotoolsProject @@ -58,6 +59,11 @@ libid3tag = AutotoolsProject( '--disable-debugging', ], autogen=True, + + edits={ + # fix bug in libid3tag's configure.ac which discards all but the last optimization flag + 'configure.ac': lambda data: re.sub(r'optimize="\$1"', r'optimize="$optimize $1"', data, count=1), + } ) libmad = AutotoolsProject( From 49678a0893380cdc2405221fe31d32651ccafa9d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 10:33:53 +0100 Subject: [PATCH 03/11] python/build/libs.py: suppress "visibility default" in libopus build --- python/build/libs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/build/libs.py b/python/build/libs.py index 305bd7636..50f963d13 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -30,6 +30,9 @@ opus = AutotoolsProject( [ '--disable-shared', '--enable-static', ], + + # suppress "visibility default" from opus_defines.h + cppflags='-DOPUS_EXPORT=', ) flac = AutotoolsProject( From f8c69893e1b3a625a0ec772ef26290d7ad5d7138 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 11:11:20 +0100 Subject: [PATCH 04/11] python/build/libs.py: disable lots of useless FFmpeg features --- python/build/libs.py | 117 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 3 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 50f963d13..7340305e9 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -114,15 +114,126 @@ ffmpeg = FfmpegProject( '--disable-pixelutils', '--disable-network', '--disable-encoders', + '--disable-muxers', '--disable-protocols', '--disable-devices', '--disable-filters', + '--disable-filters', '--disable-v4l2_m2m', - # clang misinterprets the "B0" in hevc_mvs.c as binary - # literal, which breaks the build; but we don't need that - # video codec anyway + '--disable-parser=bmp', + '--disable-parser=cavsvideo', + '--disable-parser=dvbsub', + '--disable-parser=dvdsub', + '--disable-parser=dvd_nav', + '--disable-parser=mpeg4video', + '--disable-parser=mpegaudio', + '--disable-parser=mpegvideo', + '--disable-parser=vc1', + '--disable-parser=png', + '--disable-parser=pnm', + + # we don't need these decoders, because we have the dedicated + # libraries + '--disable-decoder=flac', + '--disable-decoder=mp1', + '--disable-decoder=mp1float', + '--disable-decoder=mp2', + '--disable-decoder=mp2float', + '--disable-decoder=mp3', + '--disable-decoder=mp3adu', + '--disable-decoder=mp3adufloat', + '--disable-decoder=mp3float', + '--disable-decoder=mp3on4', + '--disable-decoder=mp3on4float', + '--disable-decoder=opus', + '--disable-decoder=vorbis', + + # audio codecs nobody uses + '--disable-decoder=atrac1', + '--disable-decoder=atrac3', + '--disable-decoder=atrac3al', + '--disable-decoder=atrac3p', + '--disable-decoder=atrac3pal', + '--disable-decoder=dsicinaudio', + '--disable-decoder=dvaudio', + '--disable-decoder=metasound', + '--disable-decoder=paf_audio', + '--disable-decoder=ralf', + '--disable-decoder=qdm2', + '--disable-decoder=qdmc', + + # disable lots of image and video codecs + '--disable-decoder=bmp', + '--disable-decoder=clearvideo', + '--disable-decoder=dsicinvideo', + '--disable-decoder=dvvideo', + '--disable-decoder=ffv1', + '--disable-decoder=ffvhuff', + '--disable-decoder=ffwavesynth', + '--disable-decoder=flic', + '--disable-decoder=flv', + '--disable-decoder=gif', + '--disable-decoder=h261', + '--disable-decoder=h263', + '--disable-decoder=h263i', + '--disable-decoder=h263p', + '--disable-decoder=h264', '--disable-decoder=hevc', + '--disable-decoder=hnm4_video', + '--disable-decoder=hq_hqa', + '--disable-decoder=hqx', + '--disable-decoder=iff_ilbm', + '--disable-decoder=indeo2', + '--disable-decoder=indeo3', + '--disable-decoder=indeo4', + '--disable-decoder=indeo5', + '--disable-decoder=interplay_video', + '--disable-decoder=jpeg2000', + '--disable-decoder=jpegls', + '--disable-decoder=microdvd', + '--disable-decoder=mjpeg', + '--disable-decoder=mmvideo', + '--disable-decoder=motionpixels', + '--disable-decoder=mpeg1video', + '--disable-decoder=mpeg2video', + '--disable-decoder=mpeg4', + '--disable-decoder=mpegvideo', + '--disable-decoder=msmpeg4_crystalhd', + '--disable-decoder=msmpeg4v1', + '--disable-decoder=msmpeg4v2', + '--disable-decoder=msmpeg4v3', + '--disable-decoder=mvc1', + '--disable-decoder=mvc2', + '--disable-decoder=on2avc', + '--disable-decoder=paf_video', + '--disable-decoder=qdraw', + '--disable-decoder=qpeg', + '--disable-decoder=rawvideo', + '--disable-decoder=rv10', + '--disable-decoder=rv20', + '--disable-decoder=rv30', + '--disable-decoder=rv40', + '--disable-decoder=sheervideo', + '--disable-decoder=tiff', + '--disable-decoder=mottiertexseqvideo', + '--disable-decoder=truemotion1', + '--disable-decoder=truemotion2', + '--disable-decoder=truemotion2rt', + '--disable-decoder=twinvq', + '--disable-decoder=utvideo', + '--disable-decoder=vc1', + '--disable-decoder=vmdvideo', + '--disable-decoder=vp3', + '--disable-decoder=vp5', + '--disable-decoder=vp6', + '--disable-decoder=vp7', + '--disable-decoder=vp8', + '--disable-decoder=vp9', + '--disable-decoder=wmv1', + '--disable-decoder=wmv2', + '--disable-decoder=wmv3', + '--disable-decoder=yuv4', ], ) From e3e90b4b93a04d27712668838a590d0d43ec186a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 12:00:29 +0100 Subject: [PATCH 05/11] python/build/libs.py: disable libcurl SMB support MPD doesn't use this feature anyway. --- python/build/libs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/build/libs.py b/python/build/libs.py index 7340305e9..f2dc06ea2 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -250,6 +250,7 @@ curl = AutotoolsProject( '--disable-ldap', '--disable-ldaps', '--disable-rtsp', '--disable-proxy', '--disable-dict', '--disable-telnet', '--disable-tftp', '--disable-pop3', '--disable-imap', '--disable-smtp', + '--disable-smb', '--disable-gopher', '--disable-manual', '--disable-threaded-resolver', '--disable-verbose', '--disable-sspi', From cab77e35e08af825bec745b8a3af93b9feff266b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 13:00:24 +0100 Subject: [PATCH 06/11] queue/PlaylistControl: fix crash after seek failure This completes the bug fix commit 2065e3290452377b2931f3129b230c8cc536cbc8; if we clear "queued" then we must clear "queued_song" as well, or another variant of the assertion fails. --- NEWS | 1 + src/queue/PlaylistControl.cxx | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index e87043daa..308aa0551 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.20.15 (not yet released) +* queue: fix crash after seek failure * resampler - soxr: clear internal state after manual song change * state file diff --git a/src/queue/PlaylistControl.cxx b/src/queue/PlaylistControl.cxx index 018ddcbb7..c71f29ba2 100644 --- a/src/queue/PlaylistControl.cxx +++ b/src/queue/PlaylistControl.cxx @@ -212,8 +212,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) { assert(queue.IsValidOrder(i)); - const DetachedSong *queued_song = GetQueuedSong(); - pc.LockClearError(); stop_on_error = true; error_count = 0; @@ -226,8 +224,6 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) playing = true; current = i; - - queued_song = nullptr; } queued = -1; @@ -235,7 +231,7 @@ playlist::SeekSongOrder(PlayerControl &pc, unsigned i, SongTime seek_time) try { pc.LockSeek(new DetachedSong(queue.GetOrder(i)), seek_time); } catch (...) { - UpdateQueuedSong(pc, queued_song); + UpdateQueuedSong(pc, nullptr); throw; } From d98c19d56137d725c68165ded9a511e68d6e9083 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 16:49:28 +0100 Subject: [PATCH 07/11] python/build/libs.py: disable more FFmpeg modules --- python/build/libs.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/python/build/libs.py b/python/build/libs.py index f2dc06ea2..28717de9c 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -126,12 +126,33 @@ ffmpeg = FfmpegProject( '--disable-parser=dvbsub', '--disable-parser=dvdsub', '--disable-parser=dvd_nav', + '--disable-parser=flac', + '--disable-parser=g729', + '--disable-parser=gsm', + '--disable-parser=h261', + '--disable-parser=h263', + '--disable-parser=h264', + '--disable-parser=hevc', + '--disable-parser=mjpeg', + '--disable-parser=mlp', '--disable-parser=mpeg4video', '--disable-parser=mpegaudio', '--disable-parser=mpegvideo', + '--disable-parser=opus', '--disable-parser=vc1', + '--disable-parser=vp3', + '--disable-parser=vp8', + '--disable-parser=vp9', '--disable-parser=png', '--disable-parser=pnm', + '--disable-parser=xma', + + '--disable-demuxer=h261', + '--disable-demuxer=h263', + '--disable-demuxer=h264', + '--disable-demuxer=image2', + '--disable-demuxer=mpegps', + '--disable-demuxer=mpegvideo', # we don't need these decoders, because we have the dedicated # libraries @@ -230,6 +251,7 @@ ffmpeg = FfmpegProject( '--disable-decoder=vp7', '--disable-decoder=vp8', '--disable-decoder=vp9', + '--disable-decoder=webvtt', '--disable-decoder=wmv1', '--disable-decoder=wmv2', '--disable-decoder=wmv3', From 368d9359dd3e86d56cc2fb5f12bb9857548bcbcd Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 17:41:53 +0100 Subject: [PATCH 08/11] python/build/libs.py: update libogg to 1.3.3 --- python/build/libs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/build/libs.py b/python/build/libs.py index 28717de9c..084508574 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -6,8 +6,8 @@ from build.ffmpeg import FfmpegProject from build.boost import BoostProject libogg = AutotoolsProject( - 'http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz', - '5c3a34309d8b98640827e5d0991a4015', + 'http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.xz', + '4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08', 'lib/libogg.a', [ '--disable-shared', '--enable-static', From 023ce4e720faf60b899a8e0082ecce1aa9e9c329 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 17:13:21 +0100 Subject: [PATCH 09/11] python/build/libs.py: disable even more FFmpeg modules --- python/build/libs.py | 75 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/python/build/libs.py b/python/build/libs.py index 084508574..0ad195798 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -147,12 +147,43 @@ ffmpeg = FfmpegProject( '--disable-parser=pnm', '--disable-parser=xma', + '--disable-demuxer=aqtitle', + '--disable-demuxer=ass', + '--disable-demuxer=bethsoftvid', + '--disable-demuxer=bink', + '--disable-demuxer=cavsvideo', + '--disable-demuxer=cdxl', + '--disable-demuxer=dvbsub', + '--disable-demuxer=dvbtxt', '--disable-demuxer=h261', '--disable-demuxer=h263', '--disable-demuxer=h264', + '--disable-demuxer=ico', '--disable-demuxer=image2', + '--disable-demuxer=jacosub', + '--disable-demuxer=lrc', + '--disable-demuxer=microdvd', + '--disable-demuxer=mjpeg', + '--disable-demuxer=mjpeg_2000', '--disable-demuxer=mpegps', '--disable-demuxer=mpegvideo', + '--disable-demuxer=mpl2', + '--disable-demuxer=mpsub', + '--disable-demuxer=pjs', + '--disable-demuxer=rawvideo', + '--disable-demuxer=realtext', + '--disable-demuxer=sami', + '--disable-demuxer=scc', + '--disable-demuxer=srt', + '--disable-demuxer=stl', + '--disable-demuxer=subviewer', + '--disable-demuxer=subviewer1', + '--disable-demuxer=swf', + '--disable-demuxer=tedcaptions', + '--disable-demuxer=vobsub', + '--disable-demuxer=vplayer', + '--disable-demuxer=webvtt', + '--disable-demuxer=yuv4mpegpipe', # we don't need these decoders, because we have the dedicated # libraries @@ -176,24 +207,46 @@ ffmpeg = FfmpegProject( '--disable-decoder=atrac3al', '--disable-decoder=atrac3p', '--disable-decoder=atrac3pal', + '--disable-decoder=binkaudio_dct', + '--disable-decoder=binkaudio_rdft', + '--disable-decoder=bmv_audio', '--disable-decoder=dsicinaudio', '--disable-decoder=dvaudio', '--disable-decoder=metasound', '--disable-decoder=paf_audio', + '--disable-decoder=ra_144', + '--disable-decoder=ra_288', '--disable-decoder=ralf', '--disable-decoder=qdm2', '--disable-decoder=qdmc', # disable lots of image and video codecs + '--disable-decoder=ass', + '--disable-decoder=asv1', + '--disable-decoder=asv2', + '--disable-decoder=apng', + '--disable-decoder=avrn', + '--disable-decoder=avrp', + '--disable-decoder=bethsoftvid', + '--disable-decoder=bink', '--disable-decoder=bmp', + '--disable-decoder=bmv_video', + '--disable-decoder=cavs', + '--disable-decoder=ccaption', + '--disable-decoder=cdgraphics', '--disable-decoder=clearvideo', + '--disable-decoder=dirac', '--disable-decoder=dsicinvideo', + '--disable-decoder=dvbsub', + '--disable-decoder=dvdsub', '--disable-decoder=dvvideo', + '--disable-decoder=exr', '--disable-decoder=ffv1', '--disable-decoder=ffvhuff', '--disable-decoder=ffwavesynth', '--disable-decoder=flic', '--disable-decoder=flv', + '--disable-decoder=fraps', '--disable-decoder=gif', '--disable-decoder=h261', '--disable-decoder=h263', @@ -204,38 +257,59 @@ ffmpeg = FfmpegProject( '--disable-decoder=hnm4_video', '--disable-decoder=hq_hqa', '--disable-decoder=hqx', + '--disable-decoder=idcin', '--disable-decoder=iff_ilbm', '--disable-decoder=indeo2', '--disable-decoder=indeo3', '--disable-decoder=indeo4', '--disable-decoder=indeo5', '--disable-decoder=interplay_video', + '--disable-decoder=jacosub', '--disable-decoder=jpeg2000', '--disable-decoder=jpegls', '--disable-decoder=microdvd', + '--disable-decoder=mimic', '--disable-decoder=mjpeg', '--disable-decoder=mmvideo', + '--disable-decoder=mpl2', '--disable-decoder=motionpixels', '--disable-decoder=mpeg1video', '--disable-decoder=mpeg2video', '--disable-decoder=mpeg4', '--disable-decoder=mpegvideo', + '--disable-decoder=mscc', '--disable-decoder=msmpeg4_crystalhd', '--disable-decoder=msmpeg4v1', '--disable-decoder=msmpeg4v2', '--disable-decoder=msmpeg4v3', + '--disable-decoder=msvideo1', + '--disable-decoder=mszh', '--disable-decoder=mvc1', '--disable-decoder=mvc2', '--disable-decoder=on2avc', '--disable-decoder=paf_video', + '--disable-decoder=png', '--disable-decoder=qdraw', '--disable-decoder=qpeg', '--disable-decoder=rawvideo', + '--disable-decoder=realtext', + '--disable-decoder=roq', + '--disable-decoder=roq_dpcm', + '--disable-decoder=rscc', '--disable-decoder=rv10', '--disable-decoder=rv20', '--disable-decoder=rv30', '--disable-decoder=rv40', + '--disable-decoder=sami', '--disable-decoder=sheervideo', + '--disable-decoder=snow', + '--disable-decoder=srt', + '--disable-decoder=stl', + '--disable-decoder=subrip', + '--disable-decoder=subviewer', + '--disable-decoder=subviewer1', + '--disable-decoder=svq1', + '--disable-decoder=svq3', '--disable-decoder=tiff', '--disable-decoder=mottiertexseqvideo', '--disable-decoder=truemotion1', @@ -251,6 +325,7 @@ ffmpeg = FfmpegProject( '--disable-decoder=vp7', '--disable-decoder=vp8', '--disable-decoder=vp9', + '--disable-decoder=vqa', '--disable-decoder=webvtt', '--disable-decoder=wmv1', '--disable-decoder=wmv2', From ed4d0aa9096231ff581a1cd3f9bd78efde15d36d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 17:55:25 +0100 Subject: [PATCH 10/11] release v0.20.15 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 308aa0551..0a09d75c7 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -ver 0.20.15 (not yet released) +ver 0.20.15 (2018/01/05) * queue: fix crash after seek failure * resampler - soxr: clear internal state after manual song change From 43a62aef0762710d89ef044b545c6f52de7f776b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 5 Jan 2018 18:09:56 +0100 Subject: [PATCH 11/11] android: release 0.20.15 --- android/AndroidManifest.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 208c6e1ae..c0b3dd4ca 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="14" + android:versionName="0.20.15">