Commit Graph

9589 Commits

Author SHA1 Message Date
Max Kellermann ed68fd4ab3 queue/PlaylistUpdate: include cleanup 2016-10-27 22:19:26 +02:00
Max Kellermann e9a9dabb49 tag/ApeLoader: include cleanup 2016-10-27 22:18:05 +02:00
Max Kellermann 31faafea9d Client: remove the AllowFile() overload with Error parameter
Unused.
2016-10-27 22:16:05 +02:00
Max Kellermann 6961bd61ca LocateUri: migrate from class Error to C++ exceptions 2016-10-27 22:04:41 +02:00
Max Kellermann 726fc53e62 Client: add AllowFile() overload which throws exception 2016-10-27 22:04:38 +02:00
Max Kellermann c598686bd9 storage: migrate from class Error to C++ exceptions 2016-10-27 21:35:19 +02:00
Max Kellermann cab87e9398 storage/FileInfo: make methods "constexpr" 2016-10-27 21:35:19 +02:00
Max Kellermann 680037927d Merge branch 'v0.19.x' 2016-10-27 21:27:19 +02:00
Max Kellermann ee026386e5 storage/Composite: avoid setting the error twice
If an error has already been set by f.directory->storage->GetInfo(),
don't set it again.
2016-10-27 21:26:55 +02:00
Max Kellermann 60f72f0ff9 command/Storage: use std::unique_ptr 2016-10-27 21:04:40 +02:00
Max Kellermann debc855806 Merge branch 'v0.19.x' 2016-10-27 21:01:27 +02:00
Max Kellermann 49c04ccfc7 decoder/sidplay: fix playback speed with libsidplayfp
https://bugs.musicpd.org/view.php?id=4577
2016-10-27 20:25:19 +02:00
Max Kellermann 11ba44870b decoder/sidplay: simplify seek loop 2016-10-27 20:25:12 +02:00
Max Kellermann f9a64d24bf storage/Composite: eliminate the second FindStorage() overload
It was used in a wrong way, which did not deal with errors
consistently.  And if that's wrong, there is no need for FindStorage()
at all - let's remove it and the confusion around it.
2016-10-27 19:55:20 +02:00
Max Kellermann e1a8dcfcc8 storage/Composite: add FindStorage() API documentation 2016-10-27 19:55:08 +02:00
Max Kellermann 1ee0e29974 storage/Composite: fix documentation typo 2016-10-27 17:12:24 +02:00
Max Kellermann 10e32454ef lib/sqlite, sticker: migrate from class Error to C++ exceptions 2016-10-27 07:50:08 +02:00
Max Kellermann 8d41e9658f Instance: remove Error parameter from GetDatabase() 2016-10-26 18:52:00 +02:00
Max Kellermann 086652dd50 Instance: add GetDatabaseOrThrow() 2016-10-26 18:47:19 +02:00
Max Kellermann 77a9940461 decoder/ffmpeg: ignore empty packets
An empty packet would be a command for avcodec_send_packet() to
finalize the codec.

Fixes https://bugs.musicpd.org/view.php?id=4588
2016-10-26 18:29:07 +02:00
Max Kellermann 9c1c180ae0 tag/Item: declare value[] to have only one element
By declaring the variable-length array to have a nominal size of 1,
struct TagPoolSlot shrinks from 24 bytes to 16 bytes, because "ref"
and "item" now both fit in one machine word.
2016-10-26 18:26:01 +02:00
Max Kellermann 06682bd2a9 tag/Item: remove "packed" attribute, add static_assert on alignment instead
The "packed" attribute triggers a clang 4.0 warning, and it's not
necessary.  All we want is correct allocation of this
dynamically-sized struct.
2016-10-26 18:24:16 +02:00
Max Kellermann 6135f0763b playlist/cue/CueParser: update API documentation 2016-10-26 17:07:52 +02:00
Max Kellermann 2f2b394d72 fs/StandardDirectory: no /etc/passwd lookups on Android
This doesn't make sense on Android; there is no home directory for
users.
2016-10-26 17:00:17 +02:00
Max Kellermann ba181ae9df fs/io/FileOutputStream: work around -Wunused 2016-10-26 17:00:17 +02:00
Max Kellermann f62546ec79 decoder/mad: use C++11 initializers 2016-10-25 18:52:54 +02:00
hawken 1c155a0d03 Fix for TextInputStream consuming file without producing lines 2016-10-12 12:19:04 +02:00
hawken 8f196db778 Fix for segfault on uninitialized state_file 2016-10-12 12:18:44 +02:00
Yue Wang d0302d1bbe _delay in output plugin will now ask the thread to repeatedly wait until it returns 0.
change the _delay API doc so that it matches its implementation behavior.
2016-09-19 10:24:56 -07:00
Yue Wang d73267df5e use osx_output_delay to wait until ring buffer is able to write
This further optimize the performance. 

This is now working properly with a conditional variable bug being fixed (8bbfb5cda1).
2016-09-19 08:51:03 -07:00
Christian Körner 8bbfb5cda1 thread/PosixCond: fix timed_wait
pthread_cond_timedwait() in PosixCond.hxx:timed_wait(PosixMutex...) returns
EINVAL, if ts.tv_nsec >= 1E9. In this case, it returns to early.

Find attached a patch which fixes this. I chose a compare-subtraction method
to keep ts.tv_nsec below 1E9.

Another option would be
ts.tv_sec += ts.tv_nsec / 1000000000;
ts.tv_nsec %= 1000000000;

But I guess this takes more time on some ARM processors, which don't support
hardware division.
2016-09-19 11:21:21 +02:00
Yue Wang f881917d2f Fix a bug that buffer_frame_size is not properly initialized 2016-09-18 21:09:57 -07:00
Yue Wang 99244f51b0 Remove unused imports 2016-09-18 19:40:55 -07:00
Yue Wang 606d029ed9 Kill mutex and locks in osx_render. Improve performance. Also fix an initialization problem 2016-09-18 19:40:04 -07:00
Yue Wang e4b9d679fb options for sample rate syncing and device hogging 2016-09-18 19:12:45 -07:00
Yue Wang 4a8a33ea85 Hogging is for user selected device only.
do not hog system device.
2016-09-18 13:15:46 -07:00
Yue Wang ac4b83046a Add sample rate synchronization and device hogging to core audio plugin
which ensures mpd do bit perfect playback on OS X
2016-09-18 12:52:08 -07:00
Max Kellermann 2a2ac35b98 decoder/ffmpeg: FfmpegOpenInput() throws exception on error 2016-09-16 18:49:22 +02:00
Max Kellermann 8c744efd56 input/InputStream: migrate from class Error to C++ exceptions 2016-09-16 17:43:36 +02:00
Max Kellermann 597e59f10d input/thread: use C++ exceptions instead of class Error 2016-09-16 17:43:32 +02:00
Max Kellermann 3cd07d0b54 input/thread: use class ScopeLock and ScopeUnlock 2016-09-16 17:43:32 +02:00
Max Kellermann 13259225c2 input/async: eliminate attribute "postponed_error"
Switch the remaining users to "postponed_exception".
2016-09-16 17:43:32 +02:00
Max Kellermann 7acd91331c input/curl: use C++ exceptions instead of class Error 2016-09-16 17:43:32 +02:00
Max Kellermann 0fdaca17a2 input/alsa: use C++ exceptions instead of class Error 2016-09-16 17:43:32 +02:00
Max Kellermann 539c0ed171 {input,storage}/nfs: use C++ exceptions instead of class Error 2016-09-16 17:43:32 +02:00
Max Kellermann 553365b942 Log: add std::exception_ptr overloads 2016-09-16 17:43:32 +02:00
Max Kellermann 100308db02 db/update: catch exceptions from Storage plugins 2016-09-16 17:43:32 +02:00
Max Kellermann ab967462e6 tag/{ApeLoader,Id3Load}: catch InputStream exceptions 2016-09-16 17:37:22 +02:00
Max Kellermann 1bc553ea62 decoder/DecoderAPI: catch InputStream::Read() exceptions 2016-09-16 17:34:53 +02:00
Max Kellermann 687ea53616 input/nfs: use class ScopeUnlock 2016-09-16 16:51:36 +02:00
Max Kellermann 220d9528a3 archive/Plugin: migrate open() from class Error to C++ exceptions 2016-09-09 18:36:36 +02:00
Max Kellermann fc7d3f64c0 input/Plugin: migrate open() from class Error to C++ exceptions 2016-09-09 18:15:01 +02:00
Max Kellermann 63ab7767a3 event/Call: rethrow exceptions in calling thread 2016-09-09 18:14:21 +02:00
Max Kellermann 20894d1c5e playlist/SoundCloud: use AtScopeExit() 2016-09-09 18:04:11 +02:00
Max Kellermann 2f03d2234a playlist/SoundCloud: use std::string 2016-09-09 18:01:36 +02:00
Max Kellermann dadf3d846b playlist/SoundCloud: implicit SoundCloudJsonData initialization 2016-09-09 18:01:01 +02:00
Max Kellermann 941a9284b9 playlist/SoundCloud: rename struct parse_data to SoundCloudJsonData 2016-09-09 18:00:26 +02:00
Max Kellermann 4ee3820bd6 playlist/SoundCloud: make parse_callbacks constexpr 2016-09-09 17:59:42 +02:00
Max Kellermann c155df5d79 playlist/SoundCloud: use ScopeLock 2016-09-09 17:59:07 +02:00
Max Kellermann 33b70567c8 input/alsa: use AtScopeExit() 2016-09-09 17:12:52 +02:00
Max Kellermann 720bf51ba6 input/alsa: simplify OpenDevice(), merge redundant recovery code 2016-09-09 17:12:52 +02:00
Max Kellermann 26bdb72428 input/Init: set input_plugins_enabled
Got lost in commit 6ed77f2a27
2016-09-09 17:12:52 +02:00
Max Kellermann 90c8a1b1cf input/archive: use AtScopeExit() for exception-safety 2016-09-09 16:32:11 +02:00
Max Kellermann 3143dbf3dc input/Open: use ScopeLock 2016-09-09 16:11:51 +02:00
Max Kellermann 38d587aaeb decoder/wavpack: wavpack_open_wvc() returns InputStreamPtr
Let std::unique_ptr manage both the InputStream and the WavpackInput.
2016-09-09 16:04:57 +02:00
Max Kellermann fe9bafa741 decoder/wavpack: use AtScopeExit() for exception-safety 2016-09-09 15:55:58 +02:00
Max Kellermann 8092e18158 input/async: add attribute "postponed_exception"
Will replace "postponed_error".
2016-09-09 15:41:09 +02:00
Max Kellermann 6ed77f2a27 input/Plugin: migrate init() from class Error to C++ exceptions 2016-09-09 15:16:47 +02:00
Max Kellermann a73688a2be input/Plugin: remove InitResult::UNAVAILABLE, throw PluginUnavailable instead 2016-09-09 15:11:52 +02:00
Max Kellermann e7d327226a mixer: migrate to C++ exceptions 2016-09-09 14:44:15 +02:00
Max Kellermann ae1eb9ccde pcm/Convert: migrate from class Error to C++ exceptions 2016-09-09 14:44:13 +02:00
Max Kellermann 860064c812 output/pulse: use a RTTI lock guard
Make all the locks exception-safe.
2016-09-09 14:36:24 +02:00
Max Kellermann 845901ab01 decoder/Internal: convert error from Error to std::exception_ptr 2016-09-08 20:56:05 +02:00
Max Kellermann 25f7360264 decoder/Thread: throw InputStream::Open() errors
Code simplification.
2016-09-08 20:54:55 +02:00
Max Kellermann 78ec7d0fe1 decoder/Thread: throw StopDecoder on DecoderCommand::STOP 2016-09-08 20:54:55 +02:00
Max Kellermann a1e9678b69 decoder/Thread: std::throw_with_nested() to wrap caught exception 2016-09-08 20:54:55 +02:00
Max Kellermann be5d629c13 Log: recognize class Error as nested exception 2016-09-08 20:54:55 +02:00
Max Kellermann 957b399e90 decoder/Thread: call FlushChunk() using AtScopeExit()
Be exception-safe.
2016-09-08 20:41:44 +02:00
Max Kellermann 5e6c164b9f decoder/Internal: use C++11 initializers 2016-09-08 20:34:39 +02:00
Max Kellermann 5d9a889190 decoder/Thread: throw C++ exceptions on error 2016-09-08 20:26:40 +02:00
Max Kellermann a9acc9c971 decoder/Thread: catch C++ exceptions from the decoder plugin 2016-09-08 19:24:15 +02:00
Max Kellermann 308010794a decoder/Control: convert error from Error to std::exception_ptr
Prepare full C++ exception support in the decoder thread.
2016-09-08 17:16:03 +02:00
Max Kellermann 0ce72cbf9d player/Control: convert error from Error to std::exception_ptr
Prepare full C++ exception support in the player thread.
2016-09-08 12:15:14 +02:00
Max Kellermann 6e52ab285a player/Control: use class Error as C++ exception, throw it 2016-09-08 12:07:22 +02:00
Max Kellermann 3da4648112 command/Player: restore "single" mode using AtScopeExit() 2016-09-08 12:07:22 +02:00
Max Kellermann 1897409476 player/Control: update API documentation 2016-09-08 12:07:22 +02:00
Max Kellermann c60d65dd8f command/All: catch class Error 2016-09-08 12:07:22 +02:00
Max Kellermann f29949e14d command/Error: support class Error as C++ exception 2016-09-08 10:34:02 +02:00
Max Kellermann 75aa98ddaa command/Error: merge the two try/catch blocks 2016-09-08 10:34:02 +02:00
Max Kellermann 06909f4f00 util/Error: remove explicit move constructor, allow copying
The C++ compiler will auto-generate move and copy
constructors/operators for us.
2016-09-08 10:34:02 +02:00
Max Kellermann aca081557a queue/PlaylistControl: use PlaylistError::NotPlaying() 2016-09-05 20:37:24 +02:00
Max Kellermann a71efacd1e queue/PlaylistControl: fix return value in PlayNext(), PlayPrevious()
Failure must be indicated by returning false.
2016-09-05 19:21:23 +02:00
Max Kellermann 871063dab7 neighbor/Plugin: migrate from class Error to C++ exceptions 2016-09-05 11:37:58 +02:00
Max Kellermann 135662d6b0 lib/smbclient/Init: throw std::runtime_error on error 2016-09-05 11:32:20 +02:00
Max Kellermann a69c3c1848 neighbor/Glue: support C++ exceptions 2016-09-05 11:31:23 +02:00
Max Kellermann 50e5244e25 input/Init: support C++ exceptions 2016-09-05 11:28:05 +02:00
Max Kellermann 1c07f197de Filter/Plugin: migrate from class Error to C++ exceptions 2016-09-04 20:07:05 +02:00
Max Kellermann 13c32111a0 Filter/Internal: migrate from class Error to C++ exceptions 2016-09-04 19:38:41 +02:00
Max Kellermann 28c6975732 filter/AutoConvert: use std::unique_ptr 2016-09-04 19:36:50 +02:00
Max Kellermann 12091fcfb1 thread/Util: throw exception on error 2016-09-04 15:15:11 +02:00
Max Kellermann 5598826eaf thread/Util: un-inline the functions
Reduce header clutter.
2016-09-04 15:11:56 +02:00
Max Kellermann 3fea624cca output/Thread: use Close() after error in ReopenFilter()
Now that CloseFilter() may be called again, we can reduce code
duplication.
2016-09-04 15:09:51 +02:00
Max Kellermann 9007dd9ab7 output/Thread: clear Filter pointers in CloseFilter()
This allows calling CloseFilter() multiple times.
2016-09-04 15:09:05 +02:00
Max Kellermann 08166cf330 output/Internal: initialize the Filter pointers
With the configuration "replay_gain_handler none", the Filter pointers
are never initialized, which can crash MPD.

 https://bugs.musicpd.org/view.php?id=4571
2016-09-04 15:05:42 +02:00
Max Kellermann e51b6a6233 Filter/Internal: remove outdated API documentation 2016-09-04 14:42:27 +02:00
Max Kellermann 3887465d80 Log: add FormatError() overload with std::exception 2016-09-04 14:34:47 +02:00
Max Kellermann d84f96a571 fs/io/FileOutputStream: add mode CREATE_VISIBLE 2016-09-04 13:16:37 +02:00
Max Kellermann f600e226da fs/io/FileOutputStream: add mode APPEND_OR_CREATE 2016-09-04 13:16:33 +02:00
Max Kellermann d775f13a03 fs/io/FileOutputStream: merge all classes into one, add enum Mode
Prepare to add more modes.
2016-09-04 12:57:41 +02:00
Max Kellermann b630afdeda fs/io/BufferedOutputStream: add wchar_t overloads 2016-09-04 12:57:41 +02:00
Max Kellermann c39c259078 fs/io/BufferedOutputStream: add Write(char) 2016-09-04 12:57:41 +02:00
Max Kellermann a571c4ba33 tag/Item: remove "packed" attribute, add static_assert on alignment instead
The "packed" attribute triggers a clang 4.0 warning, and it's not
necessary.  All we want is correct allocation of this
dynamically-sized struct.
2016-09-04 12:57:41 +02:00
Max Kellermann 889be6e29d fs/io/FileReader: add methods GetSize(), GetPosition() 2016-08-27 12:20:59 +02:00
Max Kellermann d15f64ae5d fs/io/BufferedReader: add method Reset() 2016-08-27 12:09:57 +02:00
Max Kellermann a07117ea55 fs/io/FileReader: add method Rewind() 2016-08-27 12:09:17 +02:00
Max Kellermann d0dae177cf release v0.19.19
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXvAb+AAoJECNuiljG20USLukP/1dWwG4U3eQllGtwmKYEuGT8
 x8bFImW3zziQgzzQNos8ZyB/7Q9wFDwl90q2Shyg778sk8WgBLVdn1hLhDRyodkg
 iTAbnuBeX0GoQO2vZ62jY/xtsSMwCguNMbJe5Yybq+uZ2EYLQO8NWsvy/qZzZRB6
 9s78IfQodN/vbKg8cJDPP1ZFvlhC+RfrOJbhwkAhh3D0xkpYjumW636ewcpD5Crk
 T+OT035konZEcH2hOy89tleFifo+/nosiJQXL5/RdfIVAy+rWj9HbKMT9Wlb2EO0
 iqvbjfC8rAt4a15Y8l/C42m1xhLFtRvI7O5I5wH8zqwpgRfCuG21Kw49zWFQ9md/
 tX2urKZC6QsvxfHx4J6ot+SFQJB/VZ1fufG1ZBTHVNp7eJ++mWE5pR79EbCLurlj
 x7cN1ZM7wsQfkw8MOsKr+sJqIGkU9sZSHHh3PhEkI83fEssYaAOGtkPuTqU0w/37
 wHV2laFD58SOagVPbQlhIdK6MnkiTR8RvV9j6ERywLnFNMBMiI9j7ij7zoDMKjSU
 E60JzIR4xUPWtQg91BwM5sJdqZw7xybgNBn0rMt+6AoA0CQseAnPRxA9gstrWR1/
 FYRPUzrf9brpvXEsT8R2tXcjNLNYgKzT3GxHEQj1k2MJiVe+1SztiYIi77JPLJfn
 MevaiCy/Ho3ZeQKygxVq
 =GsV+
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.19'

release v0.19.19
2016-08-23 10:27:39 +02:00
Thomas Klausner de0752fd56 system/ByteOrder: gssupport non-x86 NetBSD 2016-08-23 10:15:54 +02:00
Max Kellermann 4204d4928b decoder/ffmpeg: no avcodec_parameters_to_context() with FFmpeg 3.0
This function exists since FFmpeg 3.1.  Fix a build failure with
FFmpeg 3.0.
2016-08-23 10:15:54 +02:00
Earnestly e2f6cc9c9f Don't overwrite ss.format
Currently the switch statement is invalidated by ss.format being overwritten
with the default value of PA_SIMPLE_S16NE which results in white noise during
playback as my server is expected S16LE (S16NE).

Signed-off-by: Earnestly <zibeon@gmail.com>
2016-08-23 10:01:56 +02:00
Max Kellermann 05de0ecec3 decoder/ffmpeg: call avcodec_parameters_to_context()
These bug reports describe problems with some FFmpeg codecs:

 https://bugs.musicpd.org/view.php?id=4564
 https://bugs.musicpd.org/view.php?id=4568
 https://bugs.musicpd.org/view.php?id=4572

According to the FFmpeg bug tracker, a call to
avcodec_parameters_to_context() is required after
avcodec_alloc_context3():

 https://trac.ffmpeg.org/ticket/5781

This requirement was previously undocumented.
2016-08-23 09:59:25 +02:00
Max Kellermann b05beb000f Compiler.h: work around clang 3.9 warning -Wexpansion-to-defined
Check {GCC,CLANG}_VERSION==0 or >0 instead of using defined(), which
may render undefined behavior.
2016-08-23 09:59:25 +02:00
Max Kellermann 093abaad29 Compiler.h: always define CLANG_VERSION 2016-08-23 09:54:09 +02:00
Max Kellermann e84e4169f9 Compiler.h: remove redundant __GNUC__ check
GCC_VERSION>0 implies defined(__GNUC__).
2016-08-23 09:53:17 +02:00
Max Kellermann cd6c5cfd4c Compiler.h: exclude clang from GCC_CHECK_VERSION() 2016-08-23 09:52:14 +02:00
Max Kellermann b855f2fcc2 Chrono: use macro GCC_OLDER_THAN() 2016-08-23 09:51:41 +02:00
Max Kellermann ba69ade024 Compiler.h: add macro CLANG_OR_GCC_VERSION() 2016-08-23 09:48:58 +02:00
Max Kellermann 8748b2dc3f fs/io/BufferedReader: add ReadFull(size_t) 2016-08-16 12:09:04 +02:00
Max Kellermann 5f66af3712 fs/io/BufferedReader: add missing Consume() call 2016-08-16 11:47:31 +02:00
Max Kellermann 31ae50b137 fs/io/BufferedReader: add method ReadFull() 2016-08-16 08:46:44 +02:00
Max Kellermann 87e0459fcc util/WritableBuffer: add method skip_front() 2016-08-16 08:46:30 +02:00
Max Kellermann 07e58ae64f fs/io/FileReader: add missing include 2016-08-16 07:58:44 +02:00
Max Kellermann a88d18148c fs/io/FileOutputStream: change #if to #ifdef 2016-08-16 07:49:30 +02:00
Max Kellermann 1cf43a9dc9 fs/io/FileOutputStream: add missing include 2016-08-16 07:49:01 +02:00
Max Kellermann 196ce8426b fs/io/FileOutputStream: decouple from the FileSystem library 2016-08-15 22:42:44 +02:00
Max Kellermann 6a95c34a81 fs/io/FileOutputStream: use C++11 initializers 2016-08-15 22:34:53 +02:00
Max Kellermann ea0e6d9824 fs/FileSystem: RemoveFile() throws exception on error 2016-08-15 22:25:15 +02:00
Max Kellermann 14d3da0e18 fs/FileSystem: remove unused FOpenModes 2016-08-15 22:21:34 +02:00
Max Kellermann b6b8fb7d73 PlaylistFile: use TruncateFile()
As a side effect, "playlistclear" no longer creates a new playlist if
the given one doesn't yet exist.
2016-08-15 22:19:55 +02:00
Max Kellermann 2bca3cd247 fs/FileSystem: add TruncateFile() 2016-08-15 22:13:38 +02:00
Max Kellermann 22a353b8e3 event/SignalMonitor: fix obsolete nullptr check in SignalCallback() 2016-08-15 12:40:16 +02:00
Max Kellermann 743fa73a01 Merge branch 'v0.19.x' 2016-08-15 12:33:07 +02:00
Max Kellermann a546bfe7d9 decoder/wildmidi: support libWildMidi 0.4 2016-08-15 10:08:35 +02:00
Max Kellermann 25deae6cc7 decoder/wildmidi: move code to wildmidi_output() 2016-08-15 10:07:08 +02:00
Nils Schneider 62000670e3 Support S24_P32/S32/FLOAT sample formats on Pulse
This is based on a patch from Ian Scott in 2014. It was never committed,
so I figured I'd fix the outstanding issue and resubmit it.

https://www.mail-archive.com/mpd-devel%40musicpd.org/msg00139.html
2016-08-15 10:02:29 +02:00
Max Kellermann ac49043fbb output/pulse: move variable declaration down 2016-08-15 10:02:22 +02:00
Jacob Vosmaer 4d6192adcd Use a ScopeLock around condition.wait() 2016-08-07 15:47:21 +02:00
Jacob Vosmaer 9f1ada898e Improve readability of frame completion loop 2016-08-07 14:15:55 +02:00
Jacob Vosmaer 5617521380 Must lock/unlock around wait 2016-08-06 15:25:58 +02:00
Jacob Vosmaer 9835a2545d Do not assume two pops are enough 2016-08-06 15:19:10 +02:00
Jacob Vosmaer c28cefeeb0 output/osx: wait-free render callback
Closes https://bugs.musicpd.org/view.php?id=4537 .

Removed the 'cancel' function because it violates 'single producer,
single consumer'.
2016-08-06 00:08:10 +02:00
Max Kellermann afd5b750dc release v0.19.18
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJXpMKjAAoJECNuiljG20USti8QAJC6Y/wnyBgE8bGGynhNKoIy
 H5GQP9a3iFAiZ4ZBQ6jJAVMhRVzStxqTvYdU8ISbrE9Sw92i37ZaUwvbOcMGjN8G
 vm3oTSsPaQKABuaeNo0vdWDKEUIjXIFzyXL31SnGVCkS3KMLFUcq5p4/9OaFtxiD
 dMshfi8S+g5MLZf1xf6sviTwHTNQJYYMOEGDlq9E21UorwA5jN22dgYRiEoYAPrv
 eOCO+N+N7N3VazIN+Y2L0cU3NtJpRvtv001UcfP0oSb12bysSepCCVc02sYQYIY6
 W0LCjgzAbLX5nxyNDR75cjwPZlVDXhulesUVg/0uEEITdwmd8E3MtAxygsSTth6r
 fNo6NThceoD10T/HgSCaU/vXOV5MNw3oVwc4Q/aoCoPryuNGeN9vDIro3+EaPdsW
 6cfBMTYIU3iWpdNt+WI1mTf2aD4RvWWb0C7kgD6CF2QUm8aBRSHmQAnua0cWvlx9
 SSMhG7p4FXrLAveuqaPfDItsQ9IA8oW9E6nxgD8W7eCHEo+fUa1D8Ymfjl7Qcldb
 WdT2u38PmF7s/z+YwrFWTISwdDieYq/XC7xPibUYDJQzqBmBksB07sJUwVAO6xF2
 YhVlHhhIhYajD4n0VCLuC2QzRgoLEhaNstlK/q01lGZbW4F9/dNuZ2Fe/O+yWsLH
 ksxyC62N4oy10f8/PSp1
 =48Tb
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.18'

release v0.19.18
2016-08-05 18:51:38 +02:00
Max Kellermann d042ab87da decoder/Thread: delete the InputStream on error
Fixes memory leak after stream failure.  See
https://bugs.musicpd.org/view.php?id=4562
2016-08-05 18:15:30 +02:00
Max Kellermann 588303b78d lib/nfs/Manager: add Compare(ManagedConnection, ManagedConnection)
Required for Boost 1.61, which uses that overload in a BOOST_ASSERT().
2016-08-05 18:06:07 +02:00
Max Kellermann 5834843b8a decoder/ffmpeg: fix the AVCodecParameters API check
Turns out the libavcodec version numbers are not linear;  the feature
was added in FFmpeg 3.1 commit 998e1b8, libavcodec 57.14.0; but FFmpeg
3.0 has version 57.48.101.  Ouch!
2016-08-02 19:15:23 +02:00
Max Kellermann 2777a23672 Merge branch 'v0.19.x' 2016-07-29 20:25:59 +02:00
Max Kellermann 762f3afb9d decoder/sidplay: allow building with libsidplayfp instead of libsidplay2
https://bugs.musicpd.org/view.php?id=4558
2016-07-29 19:32:21 +02:00
Max Kellermann 7fb2f15a1a decoder/ffmpeg: check avformat_open_input() return value 2016-07-29 19:32:21 +02:00
Max Kellermann 7456dccd3a decoder/ffmpeg: FfmpegOpenInput() returns Error 2016-07-29 19:32:21 +02:00
Max Kellermann 245f41bb7e decoder/ffmpeg: fix endless recursion in FfmpegScanStream()
Was accidently added by commit cafc266e0
2016-07-29 19:32:21 +02:00
Max Kellermann 9bfb844cfa decoder/sidplay: read the "date" tag 2016-07-29 17:47:08 +02:00
Max Kellermann d790d3ba3c decoder/sidplay: add GetInfoString() 2016-07-29 17:38:04 +02:00
Max Kellermann c3dbc92766 decoder/sidplay: use SidTune::getStatus() 2016-07-29 17:31:34 +02:00
Max Kellermann 0bd25f1e17 decoder/sidplay: log detailed error message 2016-07-29 17:04:38 +02:00
Max Kellermann a4cd7411e8 decoder/sidplay: remove unnecessary error check
The ReSIDBuilder constructor cannot fail.
2016-07-29 17:03:26 +02:00
Max Kellermann bf276f6235 decoder/sidplay: use SidTune::getStatus() 2016-07-29 16:58:58 +02:00
Max Kellermann 071cacc9a4 decoder/sidplay: pass SidTuneMod to get_song_length()
Eliminate duplicate SidTune construction.
2016-07-29 14:56:05 +02:00
Max Kellermann 33f33323af decoder/sidplay: simplify the SidDatabase::length() call 2016-07-29 14:55:58 +02:00
Max Kellermann 388fae2c47 decoder/sidplay: include cleanup 2016-07-29 14:55:28 +02:00
Max Kellermann 9f878b77e9 decoder/sidplay: use class SidDatabase
Remove our own songlength database parser.
2016-07-29 14:55:28 +02:00
Max Kellermann a547d2aaba decoder/sidplay: use config_param::GetBlockPath() 2016-07-29 14:55:28 +02:00
Max Kellermann c013026821 decoder/sidplay: make "songlength_file" local 2016-07-29 14:55:28 +02:00
Max Kellermann 96b48a2404 decoder/sidplay: pass parsed path to get_song_length()
Eliminates duplicate ParseContainerPath() call.
2016-07-29 14:55:28 +02:00
Max Kellermann 9612975c2c decoder/sidplay: merge get_container_name() and get_song_num() 2016-07-29 14:55:28 +02:00
Max Kellermann 41bfd45a2e fs/Path: make IsAbsolute() const 2016-07-29 14:55:28 +02:00
Max Kellermann bbdcbd1f08 fs/Path: add methods GetBase() and GetDirectoryName() 2016-07-29 14:55:28 +02:00
Max Kellermann 6b3c525a9d db/update/ExcludeList: declare exclude_list_domain only if HAVE_GLIB 2016-07-29 14:55:28 +02:00
Max Kellermann 83aed7051c output/shout: rename "encoding" to "encoder"
The user manual specifies "encoder", which is consistent with other
output plugins.  "encoding" should be deprecated.
2016-07-29 10:52:03 +02:00
Max Kellermann 77c6e45e65 Compiler.h: require gcc 4.7 or newer
The ScopeExit library uses C++11 initializers, which gcc 4.6 does not
support.  Let's kill support for this ancient incomplete C++11
compiler, nobody should be using it anymore.
2016-07-29 09:52:23 +02:00
Max Kellermann 8825393660 decoder/ffmpeg: use avcodec_alloc_context3()
This commit suppresses the remaining deprecation warnings with FFmpeg 3.1.
2016-07-29 09:20:36 +02:00
Max Kellermann 2b9246c6ad decoder/ffmpeg: use avcodec_send_packet() and avcodec_receive_frame() on FFmpeg 3.1 2016-07-29 09:20:05 +02:00
Max Kellermann a9edb4de28 decoder/ffmpeg: use AtScopeExit() for safe cleanup 2016-07-29 09:08:14 +02:00
Max Kellermann a076ddf38c util/ScopeExit: new utility library
Similar to boost::scope_exit, but fewer include dependencies.
2016-07-29 09:07:58 +02:00
Max Kellermann 0c809fbb40 Merge branch 'v0.19.x' 2016-07-29 09:00:20 +02:00
Max Kellermann cafc266e0b decoder/ffmpeg: merge avformat_close_input() calls 2016-07-28 20:38:07 +02:00
Max Kellermann a3d020eff9 decoder/ffmpeg: use AVCodecParameters on FFmpeg 3.1
The AVCodecContext attribute is deprecated.
2016-07-28 19:50:25 +02:00
Max Kellermann 8412d94d05 decoder/ffmpeg: add GetCodecParameters()
Preparing for FFmpeg 3.1 support.
2016-07-28 19:49:47 +02:00
Max Kellermann d1c5bb956a decoder/ffmpeg: move code to IsAudio() 2016-07-28 19:49:45 +02:00
Max Kellermann 70986bc120 decoder/ffmpeg: move code to FfmpegSendFrame() 2016-07-28 19:49:18 +02:00
Max Kellermann f31fe8b865 decoder/ffmpeg: include cleanup 2016-07-28 19:49:17 +02:00
Max Kellermann 142a9fe530 decoder/ffmpeg: move code to pcm/Interleave.cxx 2016-07-28 19:49:13 +02:00
Max Kellermann 4dd2ad9b27 decoder/ffmpeg: check for commands earlier
Improve initial seek by not reading/decoding the first frame before
checking for the seek command.
2016-07-28 19:48:27 +02:00
Max Kellermann 62f7375804 decoder/ffmpeg: simplify mpd_ffmpeg_open_input() 2016-07-28 19:48:25 +02:00
Max Kellermann 543296b5ba decoder/ffmpeg: move code to lib/ffmpeg/Init.cxx 2016-07-28 19:48:22 +02:00
Max Kellermann 5fee130d00 decoder/ffmpeg: move code to lib/ffmpeg/LogCallback.cxx 2016-07-28 19:47:49 +02:00
Max Kellermann 073facea70 decoder/ffmpeg: remove obsolete comment 2016-07-28 19:47:47 +02:00
Max Kellermann dbe3b6eee4 decoder/ffmpeg: convert enums to constexpr 2016-07-28 19:47:36 +02:00
Max Kellermann df97049647 decoder/ffmpeg: move struct AvioStream to FfmpegIo.hxx 2016-07-28 19:47:31 +02:00
Max Kellermann 42c5f68362 decoder/ffmpeg: use AVStream::duration
Use the duration of the stream we're actually decoding - not the
"global" attribute AVFormatContext::duration which may differ.
2016-07-28 19:47:24 +02:00
Max Kellermann cc19e760cf decoder/ffmpeg: use more references 2016-07-28 19:45:22 +02:00
Max Kellermann 0ff22a16fa decoder/ffmpeg: move code to lib/ffmpeg/Time.hxx 2016-07-28 19:45:11 +02:00