Commit Graph

1350 Commits

Author SHA1 Message Date
Thomas Guillem 54a5491b86 android: Main is now a service
- add Settings: Activity to start / stop MPD Service (Main).

- Main is a service that run in foreground with a notification. See
  Service.startForeground documentation for more details.

- Main.Client is used to control the service: start or stop it and also receive
  callbacks when service encounters an error, is killed, is started or is
  stopped.

- Main.start to start the service without any fallback.
2018-08-19 23:35:49 +02:00
Joshua Wise 29f78b18b1 storage/plugins/CurlStorage: URL-encode paths in CurlStorage::MapUTF8
When using a database that was not created with a WebDAV music_directory
(i.e., if using a remote database, on which updates happen locally) and
using the Curl storage plugin, MPD would previously send GET requests that
had unescaped spaces in them.  This change uses Curl's URL-encode API to
solve this.
2018-08-17 23:03:56 +02:00
Max Kellermann 38edb58054 increment version number to 0.20.22 2018-08-17 23:02:13 +02:00
Max Kellermann 98afae2520 release v0.20.21 2018-08-17 19:50:59 +02:00
Max Kellermann fb5f9baf9c android/build.py: enable libexpat for the "curl" storage plugin 2018-08-17 17:15:05 +02:00
Joshua Wise a5cc13b0c5 build: Add libexpat to the crosscompile build on Windows.
The Curl plugin requires libexpat in order to work these days, so we should
download and build it in order to get the plugin enabled on Windows.
2018-08-17 17:13:39 +02:00
Max Kellermann fcf487f4e0 playlist/cue: support file type declaration "FLAC" (non-standard)
According to http://wiki.hydrogenaud.io/index.php?title=Cue_sheet FLAC
files should use the "WAVE" file type, but I recently encountered CUE
files declared as "FLAC" which could not be read by MPD.
2018-08-13 08:18:18 +02:00
Max Kellermann 906972973e case-insensitive URI scheme comparison
Required according to RFC 3986:

> An implementation should accept uppercase letters as equivalent to
> lowercase in scheme names

Closes #330
2018-08-02 11:01:45 +02:00
Max Kellermann 63406efcd8 db/update/ExcludeList: allow comments only at start of line 2018-07-06 18:27:17 +02:00
Max Kellermann 5f082a2739 output/httpd: remove broken DLNA support code
This code was added in 21851c0673 but
looks completely broken:

- the status code is "206 OK" but "206" would be "Partial Content"

- the "Content-Length" header has a bogus value

- the "Content-RangeX" parameter has different bogus values (why
  "Content-RangeX" anyway and not "Content-Range"?)

Apart from that, there are strange undocumented non-standard headers
which are probably there to work around bugs/expectations in one
broken proprietary client product.  But these days, MPD doesn't bend
over to support broken clients.  So let's kill this code.

Closes #304
2018-07-06 17:28:01 +02:00
Max Kellermann 8dcb1f805d db/proxy: support tags "ArtistSort", "AlbumArtistSort", "AlbumSort"
Closes #284
2018-05-28 20:14:07 +02:00
Max Kellermann a8b9e5b9b9 db/proxy: add "password" setting
Closes #283
2018-05-28 20:01:08 +02:00
Max Kellermann c7a803c922 increment version number to 0.20.21 2018-05-28 19:46:54 +02:00
Max Kellermann ab197b6d43 release v0.20.20 2018-05-22 12:40:18 +02:00
Max Kellermann 62127bbb12 python/build/libs.py: add libmpdclient 2018-05-12 16:24:24 +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 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
Max Kellermann 7b94f0e36b release v0.20.19 2018-04-26 19:57:04 +02:00
Max Kellermann ac395429c3 db/proxy: implement the group_mask parameter in VisitUniqueTags()
Closes #258
2018-04-26 19:43:33 +02:00
Max Kellermann 388768b3a6 db/proxy: call mpd_search_cancel() after search error
Fixes "search already in progress" errors.
2018-04-26 19:41:19 +02:00
Max Kellermann 1e54297be8 lib/ffmpeg/Init: fix av_register_all() deprecation warning
av_register_all() was deprecated in
FFmpeg/FFmpeg@0694d87024
2018-04-25 21:35:33 +02:00
Max Kellermann 44b200240f player/Thread: never reuse decoder when switching radio streams
When switching to another song manually, the player checks if the
decoder is already decoding that song; if so, it will attempt to reuse
it by seeking it to the new position.  That however fails if the
decoder is not seekable (e.g. a radio stream) which leaves the user
unable to switch to that song with the bogus error message "Not
seekable".
2018-04-25 21:19:26 +02:00
Max Kellermann 73013a3c04 input/thread: move code to Stop()
Fixes crash due to "pure virtual method called" in the "mms" input
plugin.  Closes #253
2018-03-15 19:29:55 +01:00
Max Kellermann c2c2c29658 input/thread: set InputStream::ready after Open() failure
Without setting the "ready" flag, the caller will wait in WaitReady()
forever, locking up MPD.  Closes #252
2018-03-14 13:15:03 +01:00
Max Kellermann dadd3ca671 protocol/ArgParser: disallow negative seek times
Instead of stopping playback (due to seek time overflow), reject the
seek command.  Closes #240

Relative negative values (with "seekcur") are still allowed, and MPD
will fix the resulting position if it turns out to be negative.  But
the "seek" and "seekid" commands use an unsigned time stamp which must
not be negative.
2018-03-04 11:46:11 +01:00
Christian Kröner 79535212c8 Get rid of GCD on macOS which breaks debug builds
With Grand Central Dispatch used in Main.cxx, debug builds on macOS
crash as the IsInside() assertion gets triggered in the event loop. As
a simple fix, usage of GCD is removed. Plugging and unplugging
headphones or changes of the default output device was tested without
issues. Whatever the original commit tried to fix by GCD probably does
not need fixing anymore.
2018-03-04 10:43:55 +01:00
Max Kellermann ef5f96a193 increment version number to 0.20.19 2018-03-04 10:42:05 +01:00
Max Kellermann 0ebeaa9ac2 release v0.20.18 2018-02-24 22:55:06 +01:00
Max Kellermann 25cd47b8dc win32/build.py: enable libnfs
Now that all build failures have been fixed, we can enable the
feature.
2018-02-24 22:44:42 +01:00
tpoeiras 3f3e0739c4 Fix curl storage plugin failure if the authentication method is different than basic. 2018-02-24 21:59:13 +01:00
Max Kellermann c5c1c64a81 python/build/libs.py: add libnfs
Enable the NFS storage plugin on Android.

Closes #226
2018-02-20 22:47:17 +01:00
Max Kellermann 026aef7465 decoder/flac: move the SubmitData() call out of the callback
This addresses two problems:

1. the libFLAC write callback had to send an error status to its
caller when SubmitData() returned a command; this disrupted libFLAC
and the resulting command could not be used for anything;

2. the libFLAC function FLAC__stream_decoder_seek_absolute() also
calls the write callback, but its result cannot be used, because
seeking is still in progress, so we lose all data from one FLAC frame.
By moving the SubmitData() call until after CommandFinished(), we
avoid losing this data.  This fixes another part of #113
2018-02-17 13:33:53 +01:00
Max Kellermann 986ec877b0 decoder/Bridge: truncate last chunk at the exact end_time
Instead of passing whole chunks to the MusicPipe and checking the
end_time after each chunk, truncate the last chunk if it would exceed
the end_time.  This requires keeping track of the absolute PCM frame
number.

This fixes a problem with gapless CUE song transitions: a small part
of the following song was always played twice.

Closes #113
2018-02-17 13:10:00 +01:00
Max Kellermann 79981f3cda increment version number to 0.20.18 2018-02-17 01:21:46 +01:00
Max Kellermann c2940a8385 release v0.20.17 2018-02-11 13:02:53 +01:00
Max Kellermann bede564618 mixer/alsa: work around rounding error at volume 0
Due to rounding errors, a slightly negative value can be passed to
set_normalized_volume(), which will make the log10() call fail.
Actually, volume 0 is already failing because log10(0) is illegal.  So
let's fix this by implementing two corner cases: <=0 and >=100.

Closes #212
2018-02-10 09:07:51 +01:00
Max Kellermann e0ca4b865a android: require SDK version 14
Closes #213.
2018-02-10 00:03:23 +01:00
Max Kellermann 6de92bb42b pcm/Order: fix size calculation with 8 channels
This was a buffer overflow bug which could cause MPD crahes when
playing back 8 channels with the ALSA output plugin.

Closes #216
2018-02-09 19:01:12 +01:00
Max Kellermann 817656504d thread/Util: implement system call wrapper for sched_setscheduler()
There is a POSIX definition for sched_setscheduler(), but Linux does
not implement that; instead of changing the process's scheduler, it
only affects one thread.  This has caused some confusion among
application developers and C library developers.

While glibc implements Linux semantics, Musl has made their
sched_setscheduler() function an always-failing no-op, causing the
error message "sched_setscheduler failed: Function not implemented".

 http://git.musl-libc.org/cgit/musl/commit/src/sched/sched_setscheduler.c?id=1e21e78bf7a5c24c217446d8760be7b7188711c2

Instead of relying on the C library which may be unreliable here, we
now roll our own system call wrapper.

Closes #218
2018-02-09 18:43:45 +01:00
Max Kellermann 5acb978f8f increment version number to 0.20.17 2018-02-09 18:43:45 +01:00
Max Kellermann 975a4ae871 release v0.20.16 2018-02-03 19:55:07 +01:00
Max Kellermann 12fd1cad0c archive/iso9660: libcdio 2.0 compatibility
Closes #173
2018-02-03 19:32:31 +01:00
Max Kellermann dead461542 lib/upnp/Init: enable IPv6 2018-01-31 18:15:46 +01:00
Max Kellermann ec408ca6a6 output/pulse: fix crash during auto-detection
The PulseOutput needs to be "enabled" before WaitConnection() may be
called.

Closes #207
2018-01-30 10:06:36 +01:00
Max Kellermann 8376578921 db/simple/Mount: drop mount point prefix from LOCATE_TAG_BASE_TYPE
Fixes search within mount points, resulting in error "No such
directory".

Closes #190
2018-01-19 23:52:57 +01:00
Max Kellermann 2eef4e6716 thread/Thread: add debug attribute "inside_handle"
This attribute shall be used only for IsInside() to make this safe
against a race condition described in #188:

> There is no requirement on the implementation that the ID of the
> created thread be available before the newly created thread starts
> executing.

http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_create.html):

This means that on some pthread implementations (e.g. Haiku), the
assert(thread.IsInside()) could fail.

Closes #188
2018-01-08 09:58:18 +01:00