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
Max Kellermann
47360ec906
decoder/ffmpeg: use av_free() instead of av_freep()
2016-07-28 19:45:07 +02:00
Max Kellermann
087a9938d2
decoder/ffmpeg: add API documentation
2016-07-28 19:45:05 +02:00
Max Kellermann
26d8e41a6b
decoder/ffmpeg: copy_interleave_frame() returns ConstBuffer
2016-07-28 19:45:01 +02:00
Max Kellermann
750ae1d3f3
decoder/ffmpeg: copy_interleave_frame() returns Error
2016-07-28 19:44:42 +02:00
Max Kellermann
f8a9a7a108
decoder/ffmpeg: simplify ffmpeg_send_packet()
2016-07-28 19:44:39 +02:00
Max Kellermann
eb192137d6
decoder/ffmpeg: copy the AVPacket in ffmpeg_send_packet()
...
Revert commit 70495aad
by rewriting it. Turns out, in old FFmpeg
versions, copying the AVPacket is necessary.
2016-07-28 19:42:25 +02:00
Max Kellermann
c25b464f37
decoder/ffmpeg: move code to class FfmpegBuffer
2016-07-27 17:31:02 +02:00
Max Kellermann
710b48d410
decoder/ffmpeg: log detailed error message
2016-07-27 17:28:12 +02:00
Max Kellermann
5e77a8199d
decoder/ffmpeg: remove obsolete comment
2016-07-27 17:28:12 +02:00
Max Kellermann
6637db086b
decoder/ffmpeg: add "pure" attributes
2016-07-27 17:28:12 +02:00
Max Kellermann
a271a55da7
decoder/ffpmeg: make variables more local
2016-07-27 17:28:12 +02:00
Max Kellermann
6eeec6cbfa
decoder/ffpmeg: simplify ffmpeg_send_packet()
2016-07-27 17:22:13 +02:00
Max Kellermann
5e3f3b0400
decoder/ffpmeg: rename functions to CamelCase
2016-07-27 17:18:58 +02:00
Max Kellermann
923c402f69
decoder/ffmpeg: optimize ffmpeg_scan_dictionary()
...
Don't scan tag items if the handler doesn't implement the tag()
method.
2016-07-27 17:17:14 +02:00
Jacob Vosmaer
ad80acb22a
output/osx: remove incorrect memset behavior
...
In e068d62
I added code that zeros the remainder of the output buffer
if there are not enough input frames available. I have now learned
that we can signal to the caller of the render callback how much data
is in the output buffers. In practice, the input buffer is so large
that it does not matter so much how we handle input buffer underruns,
but I suppose that saying 'there is no data' is better than 'here is
some silence for you'.
2016-07-22 20:58:37 +02:00
Max Kellermann
bd8414f8ea
Merge branch 'osx-channelmap' of git://github.com/jacobvosmaer/MPD
2016-07-14 09:19:24 +02:00
Max Kellermann
44219d5e91
decoder/flac: refactor flac_convert() to class FlacPcmImport
2016-07-11 23:34:55 +02:00
Max Kellermann
b9de3270f6
decoder/flac: specialize "stereo" for all bit depths
2016-07-11 23:33:34 +02:00
Max Kellermann
590d6faeb0
decoder/flac: convert flac_convert_*() to templates
2016-07-11 23:27:57 +02:00
Max Kellermann
62e96e9a58
decoder/flac: pass number of frames to flac_convert()
2016-07-11 23:24:48 +02:00
Max Kellermann
1c818ef0a0
decoder/flac: improve warning message about unsupported bit depth
2016-07-11 23:13:33 +02:00
Max Kellermann
d6ce2e3671
decoder/flac: move functions into struct FlacDecoder
2016-07-11 23:11:22 +02:00
Max Kellermann
85b6a52662
decoder/flac: use C++11 initializers
2016-07-11 22:44:39 +02:00
Max Kellermann
0246082b9b
decoder/flac: move position code to FlacDecoder::GetDeltaPosition()
2016-07-11 22:38:26 +02:00
Max Kellermann
3b031c6ba5
decoder/flac: throw exception on FLAC__stream_decoder_new() failure
2016-07-11 22:38:03 +02:00
Max Kellermann
74740ca50b
decoder/flac: add class FlacStreamDecoder wrapping a FLAC__StreamDecoder*
2016-07-11 22:37:55 +02:00
Max Kellermann
631baa7120
decoder/flac: eliminate redundant FlacDecoder attributes
2016-07-11 22:37:52 +02:00
Max Kellermann
657d6edff7
decoder/flac: add FlacInput getter methods
2016-07-11 22:37:49 +02:00
Max Kellermann
737c5a9549
decoder/flac: rename struct flac_data to FlacDecoder
2016-07-11 22:37:46 +02:00
Jacob Vosmaer
4cd9abe632
output/osx channel_map feature
2016-07-09 18:29:35 +02:00
Max Kellermann
b67e7df38e
release v0.19.17
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJXgCv6AAoJECNuiljG20USR3cP/RALB4qlhecMo6H8VwZvfjiA
FHfhBKfdpHM3U3EEIZc1zxwHIdWk1yELtmx298vmJbWUifpYAYarXF5497tZf2XE
AVfhTltEJEd7xB5ZULnEScM1aHzMZm5HRcHwM1UqNCsXP7PT8fmpk7gw19pKOChT
h8V3+tpC403lCIcHcJGlkuzgZvKIZDs73g7a0+4GxD9XRAPwnMYRl3Cfd8QjKT/U
r67AcOwQlS6hWJFs0K1JjOQwfwbRq2YmuOmFJua6n8O6CI/7t4h3faSQ0V/5qjFd
k/pAMRtX6mz3mjVhZv4cuMy+QILWlxUNwLBIwtxSfbwcFKrN0vtIRG8O9622hTs2
+mvYiVboWABk6hnukiDAfki96jWYHlsCJR5oIK9DZ4nBe5RVp0r9Nq/ook2AW2it
6VgYIDBI5zS/blyJzXtzDVWEtSmLFxm21JSl+jHfWDtL6/rQGimdVOFkRw40oCBz
seYb5kIbilrg6xq1KiBMT+EWmXMf+q+3YWQsu01blXGYGPhpUqhIr0h/qUfWAqMs
fwIsoxsTrkQQjEWb6YWupPrdOLZ+kTAyaK+7v8B8JmzS/H3SohusMPUZKsQXl82s
5LJVLtVxB9WRRmpfSoYqfk7CkTHOktCzVmiHb/FYUYElS9VKmJYYU8XQ25snCoZ6
bYtERsH28q8rrpkWWEXP
=IXD5
-----END PGP SIGNATURE-----
Merge tag 'v0.19.17'
release v0.19.17
2016-07-09 00:46:09 +02:00
Max Kellermann
ab95027fc6
decoder/flac: suppress warning at end of stream
...
This is required if a stream ands without another chained FLAC file.
2016-07-08 23:19:47 +02:00
Max Kellermann
ed3bc4ab63
decoder/flac: move code to FlacInitAndDecode()
2016-07-08 23:03:49 +02:00
Max Kellermann
68064f1aa6
decoder/flac: move duplicate code to flac_data::Initialize()
2016-07-08 22:44:23 +02:00
Max Kellermann
475ac76a5f
decoder/flac: late "total_frames" initialization
2016-07-08 22:43:31 +02:00
Max Kellermann
79d4f8674c
decoder/flac: remove "duration" parameter from flac_decoder_initialize()
...
It's always 0.
2016-07-08 22:41:19 +02:00
Max Kellermann
e42eed4d4c
decoder/flac: remove pointless check
2016-07-08 22:41:19 +02:00
Max Kellermann
4a7042e847
decoder/flac: handle unknown duration correctly
...
If the duration is unknown, pass SignedSongTime::Negative(), as
documented for decoder_initialized().
2016-07-08 22:33:49 +02:00
Max Kellermann
7f36923eb4
decoder/flac: pass SignedSongTime to decoder_initialized()
2016-07-08 22:32:23 +02:00
Max Kellermann
2ca8d69126
decoder/flac: document flac_data::position
2016-07-08 22:20:16 +02:00
Max Kellermann
70367d70c8
decoder/flac: remove obsolete sub-song support
...
This is obsolete because it has been moved to the MPD core.
2016-07-08 21:59:30 +02:00
Jacob Vosmaer
e068d62ac6
output/osx rewrite render callback
2016-07-08 15:36:42 +02:00
Max Kellermann
e6389ff5a1
client/ClientRead: call Break() before Close()
...
Referencing the attribute "partition" is illegal after Close(),
because Close() deletes "this".
2016-07-07 13:54:04 +02:00
Max Kellermann
b46cf57d98
event/BufferedSocket: OnSocketReady() returns true after close
...
Fixes use-after-free bug (https://bugs.musicpd.org/view.php?id=4548 ).
2016-07-07 13:52:20 +02:00
Max Kellermann
6f59d71e07
decoder/API: check initial_seek_running in _check_cancel_read()
...
The "seeking" flag is not set for the initial seek, and so
decoder_read() could be canceled when another SEEK was emitted during
initial seek.
This fixes several seek problems, for example the one reported for the
FLAC decoder plugin:
https://bugs.musicpd.org/view.php?id=4552
2016-07-06 15:46:04 +02:00
Max Kellermann
f9130f42a2
decoder/flac: try to recover from seek error()
...
libFLAC API documentation suggests that FLAC__stream_decoder_flush()
should be called to recover from FLAC__STREAM_DECODER_SEEK_ERROR.
2016-07-05 19:29:56 +02:00
Max Kellermann
faf2eeaa99
decoder/flac: evaluate all possible FLAC__stream_decoder_get_state() values
...
Stop after all fatal errors. This fixes assertion failures in
libFLAC.
2016-07-05 19:27:40 +02:00
Max Kellermann
1c7de0b4ac
output/shout: remove pointless memset() call
2016-07-05 18:02:35 +02:00
Max Kellermann
58487e484f
filter/route: use PcmSilence()
2016-07-05 18:01:29 +02:00
Max Kellermann
104075f3e0
PlayerThread: use PcmSilence() in SendSilence()
...
No change for regular PCM, but DSD uses 0x69 now.
2016-07-05 18:01:29 +02:00
Max Kellermann
b8097eaf2e
pcm/Volume: move silence pattern to Silence.cxx
2016-07-05 17:52:53 +02:00
Max Kellermann
5eb0cbc887
PlayerThread: make chunk allocation error non-fatal in SendSilence()
...
Fixes abort after seeking on fast machines.
2016-07-05 17:44:45 +02:00
Max Kellermann
1a4a6f3807
filter/Observer: fix memory leak
2016-07-04 15:25:21 +02:00
Max Kellermann
a012b25335
filter/convert: fix no-op check
...
Commit 3a212412
changed the meaning of out_audio_format, but I forgot
to apply this to ConvertFilter::FilterPCM().
See https://bugs.musicpd.org/view.php?id=4551
2016-07-04 15:17:03 +02:00
Jacob Vosmaer
2fdbae3e1f
Remove braces
2016-07-03 16:45:23 +02:00
Jacob Vosmaer
87e06793c2
Get rid of GetMacOSStatusCommentString
2016-07-03 14:06:53 +02:00
Jacob Vosmaer
8cc451a2e2
Use error.Set instead of error.Format
2016-07-03 13:36:35 +02:00
Jacob Vosmaer
723c2c7fa9
Remove some debugging code
2016-07-03 13:18:44 +02:00
Jacob Vosmaer
4dd2c5cdd5
Convert device name from CFStringRef to char*
2016-07-03 12:59:19 +02:00
Jacob Vosmaer
bdc257b40e
Add debug statements
2016-07-02 23:44:21 +02:00
Jacob Vosmaer
4728f7c697
Use AudioComponent instead of Carbon Component
2016-07-02 23:35:44 +02:00
Max Kellermann
07228ff56a
tag/Id3Load: use offset_type instead of off_t
2016-07-02 14:00:52 +02:00
Max Kellermann
a61f153df7
system/Error: add missing include
2016-07-02 13:59:47 +02:00
Max Kellermann
34e91850d9
decoder/pcm: assume that audio/L16 is big-endian
...
See https://bugs.musicpd.org/view.php?id=4547
2016-07-01 21:34:56 +02:00
Max Kellermann
ba8e579e9b
pcm/Volume: use 0x69 to generate DSD silence
2016-07-01 21:22:21 +02:00
Max Kellermann
072e39c9cf
filter/ReplayGain: skip PcmVolume if a mixer is set
...
Previously, volume was applied twice: once by PcmVolume, and again by
the hardware mixer.
2016-07-01 21:17:52 +02:00
Max Kellermann
3a21241248
filter/FilterInternal: split class Filter, add class PreparedFilter
...
For easier state management inside filter plugins.
2016-07-01 21:04:24 +02:00
Max Kellermann
5c75096bcd
pcm/Volume: remove assert() from destructor
...
While this assert() was useful when we had to track the object's state
manually, there was no practical purpose other than verifying old
code, and it complicates our new C++ code.
2016-07-01 21:04:24 +02:00
Max Kellermann
a43b0f5253
mixer/software: move Filter management to the AudioOutput
2016-07-01 18:23:53 +02:00
Max Kellermann
d93271e86d
mixer/software: use C++11 initializers
2016-07-01 14:06:08 +02:00
Dimitris Papastamos
4a6df9f961
output/sndio: Remove unused attribute
...
The variable is actually used in this function.
2016-06-24 09:11:36 +02:00
Dimitris Papastamos
a43ae2369b
output/sndio: Add 24-bit 4-byte packed audio format support
2016-06-24 09:11:30 +02:00
Dimitris Papastamos
9a049de859
output/sndio: No need to use a loop in Play()
...
This is a left-over from the previous version of the code
that was retrying on EINTR.
2016-06-24 09:10:57 +02:00
Dimitris Papastamos
58b8398aa0
output/sndio: Use size_t instead of ssize_t
...
Some minor style fixes as well.
2016-06-23 11:11:42 +02:00
Max Kellermann
645751f680
output/Init: use C++11 initializers
2016-06-22 18:44:00 +02:00
Dimitris Papastamos
26c0924461
sndio: Eliminate remaining goto usage to conform to MPD style
2016-06-22 16:10:46 +02:00
Dimitris Papastamos
d4f801a8e9
sndio: Fix segmentation fault when audio card is removed
...
This can happen if you remove an external audio card or if you stop
sndiod(8) while playing a song.
sio_write() will retry internally if it fails with errno == EINTR
so no need to handle that.
2016-06-22 16:10:38 +02:00
Dimitris Papastamos
8406864963
sndio: Allow tweaking application buffer size
...
It defaults to 250 ms.
2016-06-22 16:09:57 +02:00
Max Kellermann
85ef034fd0
filter/ReplayGain: use C++11 initializers
2016-06-22 12:43:47 +02:00
Max Kellermann
59141f62bb
filter/route: use std::array
2016-06-22 12:24:55 +02:00
Dimitris Papastamos
d68cadba7b
sndio: No need to use a timer so get rid of it
2016-06-22 11:28:58 +02:00
Max Kellermann
1207fd1f16
output/sndio: remove unnecessary initialization
2016-06-22 11:01:37 +02:00
Dimitris Papastamos
8aa61e230c
sndio: Add option to select output device
2016-06-22 11:00:06 +02:00
Max Kellermann
2c7bda8a3b
output/sndio: define SIO_DEVANY if it is undefined
...
Fixes build failure on Debian Wheezy.
2016-06-22 10:58:44 +02:00
Dimitris Papastamos
d58c5dd398
sndio: Implement sndio_test_default_device()
2016-06-22 10:54:59 +02:00
Dimitris Papastamos
171da7a347
Add sndio output plugin
2016-06-22 08:44:47 +02:00
Max Kellermann
3fd70a769a
event/SignalMonitor: remove unused function SignalMonitorGetEventLoop
2016-06-20 10:48:34 +02:00
Max Kellermann
4280f84535
event/SignalMonitor: use BoundMethod instead of raw function pointer
2016-06-20 10:46:36 +02:00
Max Kellermann
c3d9c32615
util/BindMethod: add nullptr constructor and bool operator
2016-06-20 10:36:37 +02:00
Max Kellermann
a938b609b9
util/BindMethod: document the default constructor
2016-06-20 10:36:09 +02:00
Max Kellermann
d3c7fac606
thread/Thread: throw std::system_error on error
2016-06-17 19:11:20 +02:00
Max Kellermann
fea3f6cc72
thread/Thread: use C++11 initialisers
2016-06-17 19:11:19 +02:00
Max Kellermann
aee5966e1c
input/thread: use C++11 initialisers
2016-06-17 19:10:39 +02:00
Max Kellermann
95e53ac0a0
input/alsa: rebase on AsyncInputStream
...
Use the snd_pcm_t only in the IOThread, and reuse code that is
well-known to work.
2016-06-17 18:36:54 +02:00
Max Kellermann
5d11759f7d
input/async: use class DeferredCall
2016-06-17 18:31:58 +02:00
Max Kellermann
829616534e
event/DeferredCall: new class supposed to replace DeferredMonitor
...
Comes with a callback pointer instead of a virtual method, which
allows multiple instances in one class.
2016-06-17 18:26:29 +02:00
Max Kellermann
863f4d8366
util/BindMethod: new utility class for callbacks
...
Replaces the old BoundMethod template.
2016-06-17 18:20:19 +02:00
Max Kellermann
bdd0c3686d
input/async: use class HugeAllocation
2016-06-17 18:06:02 +02:00
Max Kellermann
91769d536d
util/HugeAllocator: add class HugeAllocation
2016-06-17 18:01:13 +02:00
Max Kellermann
9500343d85
util/HugeAllocator: add "noexcept"
2016-06-17 17:59:45 +02:00
Max Kellermann
ef053035d0
util/HugeAllocator: throw std::bad_alloc on error
2016-06-17 17:57:40 +02:00
Max Kellermann
8b903626c2
release v0.19.16
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJXXuZbAAoJECNuiljG20USSegP/1gYoDyp4vDDCcRBNZkr3hlE
VbFyEz06/chfUTCRWFxtM6ghVMzSpqv7I8wDA8zv22NTkForVWD3gjimtJqJ/R4w
aT7QMZJmJUIH0Uf+dRp98YRG7m5S1Y5JkKEYu4oxQOECxbNMPd+ilbb6wwr2pYZ/
k2ks+oyYtPgqtWlriIbJMwXOyQEfqNCJgzxUzC2U6idVALYpj+5aK+VTY4Nk1YXw
nLAu8TT40jNYFfss0bDYBzQbm/82m8Q9JIkmoOpX/3WaRaCjaVza7IvRKgDPZutJ
mmrtu5SJ+QgLQLaXvav84KwtXhDbJu4zEbC7tUL0LGSmzbpiiz2DSUJP2jQ0C6nS
wgcACFkHGBLOjKNbjDB1eUhS7ouzxTGgPlsMC89254R7XQP/5EV9H3Quxb48Bxq7
PuW6nNHytppfAIZP18X62oL8hpSgwK1zLe34jzayJlkGIg5O1he4FcJQykvlzrjm
fBvL+hX3TM9exfASQujNXVgxFGPmgb37bE2aQyxZunE1DltJWfHyOhdme9vCuEcB
acz8gR/jcp8OKe4RCEdD1g86CSW2wlMfKfnzuwPPhcw0L3kz6OYcjRr2oMae7uG0
/NFw+PcdHcVKXjiRoJsdCvtN+jRtJhCUn314IskgyKad/UNcELbo7WDBUqHC36Wg
ncM6Sis4oal4jPXJ2JoE
=6ee1
-----END PGP SIGNATURE-----
Merge tag 'v0.19.16'
release v0.19.16
2016-06-13 19:03:59 +02:00
Max Kellermann
4ecd325371
decoder/flac: log seek errors
2016-06-13 18:37:45 +02:00