Commit Graph

1266 Commits

Author SHA1 Message Date
Max Kellermann
dc76eb6139 decoder/Thread: mutex not locked for decoder_run_{file,stream}() 2015-12-31 12:42:02 +01:00
Max Kellermann
55e113c7a7 decoder/Thread: document locking rules 2015-12-31 12:36:32 +01:00
Max Kellermann
b62f5e079e decoder/Thread: use ScopeLock for exception-safety 2015-12-31 12:36:00 +01:00
Max Kellermann
faca8bc02a decoder/Control: Seek() returns Error information 2015-11-11 19:56:08 +01:00
Max Kellermann
76a9049739 decoder/Control: State::ERROR is illegal
The state ERROR can only be entered during decoder initialization, and
Seek() may only be called after initialization has been finished.
2015-11-11 17:46:06 +01:00
Max Kellermann
27bfcda20d decoder/Control: use switch/case in Seek() 2015-11-11 17:46:03 +01:00
Max Kellermann
733989a284 util/StringUtil: move comparison functions to StringCompare.cxx 2015-11-06 09:20:18 +01:00
Max Kellermann
94f850a588 release v0.19.11
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJWL0cEAAoJECNuiljG20USkHkP/0m3kFEEgqauAIbI1t0TkKOp
 2ii5iHZeMAlsxGEc5SX5fFoXM6STbXq/3+OXBf+OnABh9b03o744QAAwh1ei9tiQ
 kMysbN2fbpHkuchx1JfrOU1ad3qfWXQri8csTtx5eRYpgyqF7Mfl1SoY1nkpherd
 j4MVq7MVqBhwCqpAfJvTFTSOlNrJ4bBcvIgGslhFYhRxMRM83KgFS//lHvbXWnOg
 fjYEO34nz0rjCfz6x2r7ZQBLeQVr9n6h24iYhSTnU7Xq9o2ezWlVRIm9YVhxoZKf
 /MRJuAzaHhGID8IvX7dPxdQJ+feUhQXSv8HSjOJBO6R2dqIScE3D6EIBHy8Cj9Bk
 O2D1SgmR+2NnjNz2GUjCIKHm9c9jTgv+rnZ2l8hweS2oUQOPHbCtOoCNAfwyP+/Y
 ms1CavNl7bUuvWrM1ipM2ZK6QfW9P4F1dtmwqtJCsqdGFyQyfACcxqmlkfxhB2vI
 NyvKAOn/TlWWQscF9id3r90sEir/J9e7IJ6oZh+uvyIfOtt8wR/Jm5/H1MA7j3iX
 XmNbe1GY3WHjCH2lRr3tIRKAE8I3HAtBzwhvq/miSESrkEnJ06VMatkoMRQT63gy
 62yaCg+ZWiBRp07ygiedYuGL19pDOhqRjY3U/b/0EHMb9ux083nuUTssqgzzO2OP
 9OPao5CPs4M4QvmiG/wF
 =RdQt
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.11'
2015-10-27 11:05:47 +01:00
Max Kellermann
5719207dfa gme: don't loop forever, fall back to GME's default play length
Fixes http://bugs.musicpd.org/view.php?id=4432
2015-10-26 17:16:20 +01:00
Max Kellermann
a84fbbe327 decoder/gme: free the gme_info_t as early as possible 2015-10-26 17:15:24 +01:00
Max Kellermann
3882c11450 decoder/gme: log the emulator type 2015-10-26 17:00:27 +01:00
Max Kellermann
08f77c2b60 decoder/gme: add option "accuracy" 2015-10-26 16:56:55 +01:00
Max Kellermann
93c97972b9 decoder/gme: call decoder_seek_error() on seek error 2015-10-26 16:32:39 +01:00
Max Kellermann
1958f78cc1 decoder/ffmpeg: fix crash due to wrong avio_alloc_context() call
Allocate the buffer dynamically using av_malloc(), and free
AVIOContext.buffer in the destructor, as mandated by the libavformat
documentation.

Fixes http://bugs.musicpd.org/view.php?id=4446
2015-10-26 13:06:29 +01:00
Max Kellermann
62bfb1a273 decoder/mad: reduce memory usage while scanning tags
Allocate the frame pointers only when actually decoding the file.
2015-10-19 13:12:36 +02:00
Max Kellermann
a7ee64a25b decoder/mpcdec: use SampleTraits<SampleFormat::S24_P32>
Eliminates some duplicate code, and as a side effect, this works
around clang 3.8 compiler warning because a negative value was
shifted.
2015-10-16 18:12:32 +02:00
Max Kellermann
2a58f22649 decoder/mpcdec: use Clamp() 2015-10-16 18:11:42 +02:00
Max Kellermann
356c829b76 util/StringView: new utility class 2015-09-30 22:21:46 +02:00
Max Kellermann
7652a2986b client/Response: new Client wrapper class for writing responses 2015-08-12 08:41:05 +02:00
Max Kellermann
3e9738dc66 decoder/mpcdec: read the bit rate
This was lost in commit 8ead8f7ea, because this was never implemented
for the new API.
2015-08-05 23:33:11 +02:00
Max Kellermann
2ecf57cdd9 decoder/mpcdec: use SampleTraits<SampleFormat::S24_P32> 2015-08-05 23:24:30 +02:00
Max Kellermann
c8b602038e decoder/mpcdec: use Clamp() 2015-08-05 23:24:30 +02:00
Max Kellermann
e384fa226e decoder/mpcdec: make buffer more local
Allow the compiler to invalidate buffer contents.
2015-08-05 23:10:39 +02:00
Max Kellermann
69476b4f21 pcm/Interleave: add optimization for 32 bit samples
Move code from the "vorbis" decoder.
2015-06-22 16:32:06 +02:00
Max Kellermann
eed1a3c239 decoder/ffmpeg: move code to pcm/Interleave.cxx 2015-06-22 14:42:19 +02:00
Max Kellermann
94c037821b decoder/ffmpeg: check for commands earlier
Improve initial seek by not reading/decoding the first frame before
checking for the seek command.
2015-06-22 14:42:19 +02:00
Max Kellermann
e38e8eb636 decoder/vorbis: check STOP before entering the loop 2015-06-22 14:40:51 +02:00
Max Kellermann
90e7ace980 release v0.19.10
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABCAAGBQJVhsF2AAoJECNuiljG20US2OUQAIyDcaUCFgUa2CYa7MftCPGc
 dYJFwf+6Y2fJdSXcogYZmXNKNjFbPAZ4qqGdoNfI5a0rLxMarmL4DyjziAWi3ETB
 MOkZK65Y5ySyyw69e+i/XsOwOn8rm6jDuwHKpT7wVJNjvZ8nA8esvu5b1Ief5LBd
 UwEmn5DtKjA7dErHEYd2YvMK0xm+YmoKXuhmJKAn3sQdCEldgH4T5BCdOqmfrHWX
 BYmNxmP3PU9Tqi7XHTSFZJn6vWiXhOoWr4Cb7K54j49sRV2B4QMWX1CLyK4+Jwmk
 NZwD1IoGtoks5twfMTA9F9dBV/CPAWT69E0LIvaFJwCyoPCEnEi6k41bRAWK7P65
 QwKxdtY/GZnVFpiqXba+wkD6VBa5wmkjS10+cIBhz3CVCEE+N5YacubUw5JieYg3
 kOG2htSF1YP/Mo+IAObO9doQWHnDUavVhhpQ8UyqQ1bDMsmaEpfE16TRmlY/l5wx
 Aor2p6D3c0E0IGpEwjOl6T9pDql4dyTdrRLLXJ6oD9iYv2rDdahctBRdyFZ1mRwX
 oNUz8bfGDrshHVvwjQTr2b4O+w+yc+RSuJcyCGGcn5LakBuiM6vYNYuZzq3Yj/RK
 Wk7RErVsbtY4ZRH06Lf5MSM5TflnrfQmzkUB0rZ0XoDyweoHOHPyzKhvBaKhadNh
 UnEx4kCOvWdjFXUVWH3Q
 =MrVf
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.10'
2015-06-21 16:06:02 +02:00
Max Kellermann
6d6f274648 DecoderAPI: discard unused song tag early
If there's a stream tag, don't let the song tag override it in the
next update_stream_tag() call.
2015-06-21 15:10:55 +02:00
Max Kellermann
9acefcb256 DecoderThread: set Decoder::song_tag only for local files
If the song tag comes from a stream, and MPD playback restarts, MPD
would believe the tag should override the newly received tag.  This
makes the previous tag appear stuck.  This change passes the song tag
only if it's authoritative - i.e. if it's a song file.
2015-06-21 15:02:14 +02:00
Max Kellermann
e4d0293a31 DecoderAPI: "move" the Tag object
Reduce runtime overhead.
2015-06-20 16:06:09 +02:00
Max Kellermann
327a8e6c59 decoder/ffmpeg: skip unwanted samples after seeking
When seeking to the beginning of a packet, skip the samples that come
before the desired time stamp.
2015-06-20 15:01:05 +02:00
Max Kellermann
d11e2724c4 decoder/ffmpeg: use AVSEEK_FLAG_BACKWARD for seeking
Ask FFmpeg to seek to the next packet boundary *before* the seek
position, so we don't miss audio data.  Now we get too much, but we'll
solve that in the next commit.
2015-06-20 14:29:42 +02:00
Max Kellermann
f768ca3a2d decoder/ffmpeg: move code to StreamRelativePts() 2015-06-19 18:56:29 +02:00
Max Kellermann
b31d171ae8 *: doxygen fixups 2015-03-17 11:21:43 +01:00
Max Kellermann
983078992d fs/NarrowPath: new utility class 2015-03-05 10:07:07 +01:00
Max Kellermann
1c90b0c19d *: change C-style prototypes, drop "(void)" 2015-03-03 20:05:08 +01:00
Max Kellermann
ee6e0e16cb DecoderThread: make variables more local 2015-01-31 22:20:38 +01:00
Max Kellermann
eb1733609a decoder/sndfile, ...: update API documentation 2015-01-31 22:17:15 +01:00
Max Kellermann
e2e66404d5 decoder/DsdLib: fix integer overflow in ID3 size calculation 2015-01-30 23:22:49 +01:00
Max Kellermann
3ecb19d0f1 decoder/DsdLib: check size before seeking 2015-01-30 23:19:26 +01:00
Max Kellermann
fd02c87fa2 decoder/DsdLib: don't use InputStream::GetOffset() after seeking
We already know the offset.
2015-01-30 23:00:22 +01:00
Max Kellermann
63ac81c8f5 decoder/DsdLib: pass offset_type t dsdlib_tag_id3() 2015-01-30 22:47:43 +01:00
Max Kellermann
557bee61d5 Merge branch 'v0.19.x' 2015-01-29 22:55:18 +01:00
Max Kellermann
7bf638b0de decoder/DsdLib: use new[] to allocate the ID3 buffer
Don't abort the process if there's not enough memory.  This buffer is
not important and can be large.
2015-01-29 08:24:34 +01:00
Max Kellermann
56662a703c decoder/DsdLib: free ID3 buffer right after id3_tag_parse()
Merge two free() calls.
2015-01-29 08:24:34 +01:00
Max Kellermann
8b5f47d3a3 decoder/DsdLib: raise ID3 tag limit to 1 MB
A bug report was submitted with a 600 kB ID3 tag that could not be
read by MPD.
2015-01-29 08:20:14 +01:00
Max Kellermann
4fa5538e2b config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
2015-01-21 23:56:33 +01:00
Max Kellermann
1c3f5517fa config/Option: convert to strictly-typed enum 2015-01-21 23:30:00 +01:00
Max Kellermann
fe85fa3bea ConfigData: move struct config_param to Param.hxx 2015-01-21 21:23:02 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
412bedb697 Merge branch 'v0.19.x' 2014-12-26 14:40:32 +01:00
Max Kellermann
940cab8620 Merge branch 'v0.18.x' into v0.19.x 2014-12-26 14:28:52 +01:00
Max Kellermann
a56949e9fa decoder/ffmpeg: support interleaved floating point 2014-12-23 20:51:08 +01:00
Max Kellermann
ea96919b80 Merge branch 'v0.19.x' 2014-12-23 20:43:15 +01:00
Max Kellermann
5835afb849 decoder/ffmpeg: fix indent 2014-12-23 10:21:34 +01:00
Max Kellermann
b9c7771830 decoder/DsdLib: add missing stdlib.h include 2014-12-23 10:08:46 +01:00
Jan Brittenson
35db88affe DSF ID3 tags hitting 4k size limit
Here's a change to dynamically allocate the DSD ID3 tag buffer.
Pretty much anything with cover art is going to exceed the existing,
static 4k limit...  Here's a change to dynamically allocate the buffer
and sanity check it at some upper limit.  I rather arbitrarily pulled
256k out of thin air just to keep a corrupt file from causing it to
trying to allocate a buffer larger than available memory.
2014-12-23 09:49:33 +01:00
Max Kellermann
7f3fecbdf5 decoder/ffmpeg: simplify mpd_ffmpeg_open_input() 2014-12-22 22:24:10 +01:00
Max Kellermann
a2c6d5e148 decoder/ffmpeg: move functions into the AvioStream struct 2014-12-22 21:58:25 +01:00
Max Kellermann
7afe63aa06 configure.ac: use MPD_ENABLE_AUTO_PKG_LIB for libgme 2014-12-22 10:28:15 +01:00
Max Kellermann
90b91ead72 decoder/ffmpeg: move code to lib/ffmpeg/Init.cxx 2014-12-21 20:51:41 +01:00
Max Kellermann
1e98e41381 decoder/ffmpeg: move code to lib/ffmpeg/LogCallback.cxx 2014-12-20 18:46:29 +01:00
Max Kellermann
7030e8f050 decoder/ffmpeg: remove obsolete comment 2014-12-19 11:53:58 +01:00
Max Kellermann
74bb514a8c decoder/ffmpeg: convert enums to constexpr 2014-12-19 11:53:58 +01:00
Max Kellermann
46914e486c decoder/ffmpeg: move struct AvioStream to FfmpegIo.hxx 2014-12-19 10:35:10 +01:00
Max Kellermann
f9abc561fb decoder/ffmpeg: remove unnecessary nullptr check for av_free() 2014-12-19 10:33:17 +01:00
Max Kellermann
2e22ff2e36 decoder/ffmpeg: use AVStream::duration
Use the duration of the stream we're actually decoding - not the
"global" attribute AVFormatContext::duration which may differ.
2014-12-19 10:23:05 +01:00
Max Kellermann
8c3be4a5f0 decoder/ffmpeg: skip _scan_stream() if no audio stream was found 2014-12-19 10:21:51 +01:00
Max Kellermann
3fe2f7337c decoder/ffmpeg: remove redundant audio stream check 2014-12-19 10:20:45 +01:00
Max Kellermann
ec24eb1d8e decoder/ffmpeg: use more references 2014-12-19 10:19:19 +01:00
Max Kellermann
ffcaf85609 decoder/ffmpeg: merge avformat_close_input() calls 2014-12-19 09:57:29 +01:00
Max Kellermann
67e2d9f9e1 decoder/ffmpeg: move code to lib/ffmpeg/Time.hxx 2014-12-19 09:41:21 +01:00
Max Kellermann
dd5aa2b483 decoder/ffmpeg: use av_free() instead of av_freep() 2014-12-19 09:23:22 +01:00
Max Kellermann
806494a254 decoder/ffmpeg: add API documentation 2014-12-19 06:41:50 +01:00
Max Kellermann
5c3afd020a decoder/ffmpeg: copy_interleave_frame() returns ConstBuffer 2014-12-18 23:44:56 +01:00
Max Kellermann
190cdfc326 decoder/ffmpeg: copy_interleave_frame() returns Error 2014-12-18 23:39:56 +01:00
Max Kellermann
13b954c765 decoder/ffmpeg: pass AVPacket copy to ffmpeg_send_packet() 2014-12-18 23:24:11 +01:00
Max Kellermann
49f6b50ed3 decoder/ffmpeg: simplify ffmpeg_send_packet() 2014-12-18 23:21:48 +01:00
Max Kellermann
0f2a304d34 decoder/ffmpeg: pass references instead of pointers 2014-12-18 23:08:08 +01:00
Max Kellermann
a142f93dca decoder/ffmpeg: move code to class FfmpegBuffer 2014-12-18 22:24:28 +01:00
Max Kellermann
2dfe2fb22c decoder/ffmpeg: fix crash on out-of-memory
Fixes regression by commit 7c8038e
2014-12-18 22:24:02 +01:00
Max Kellermann
e8564b4c90 decoder/ffmpeg: log detailed error message 2014-12-18 22:07:38 +01:00
Max Kellermann
2fd81b4932 decoder/ffmpeg: remove obsolete comment 2014-12-18 20:19:40 +01:00
Max Kellermann
0cf4c6ffea decoder/ffmpeg: add "pure" attributes 2014-12-18 20:17:15 +01:00
Max Kellermann
8400da9934 release v0.19.7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUkcmtAAoJECNuiljG20USLuwP/3MjssxpUkq6aN1beyNACWJ8
 Zgr/ibDjxYJY+UAHUOycnJQ8WNpgfXNSR4F5jQHznJdpemJCZCeBd2s5yelEdu0C
 SBjJ9FiKPeu8or5N34CPmRQDmDGHv0II4/ySmzlBhH4XRV5JF5li/j4KtAlOCqCT
 GNnlmgn05o+oX4Olpg/id6H7wvny+YDY3p33sJmi+djBnSbJyJNvk9NhAr9n4I7Q
 FfGHbTzRLSZKHa47zzXag30PBj2X8x7NOAcAX7/evQpw9Gud/8CwXKk21kp6L/fv
 RJnj4lLtkj8MRc+8vskZ9EXgYr3yC/cldP8Fw8qsY/t7d8UFUN8qFqpq9O8IPnga
 D4hNpq7VF9ZxMhQtxBiT3cRvjTXBp8J/B7p2YDuYHBhIZh8IPzjDCyF4CzlN/470
 3zTqq/aar93AeI/6MQlpQPBK1DGvrrHBVP3Mj7cCTbx61P7/1xEIxYntRIfJw449
 JRJDJKjdyOY4+Sqm3Agu3WiQlyOzZXmqM3E3FFeul4mUvcOKhfbZxjayYsGlfigA
 MHge1wif2aOe6IU334DUD5V0m61MMoefznEvWUdAZHtdvQox0ovDmwwFRizX2fGc
 rlUhoUOXWjjGbTI2VjXsBklzh8P+MxQ8OiJGw+V4DBI0XL+A2tpqISs9mpCVPwQ0
 T37uc6kdDB99noMuD2cw
 =+4Cz
 -----END PGP SIGNATURE-----

Merge tag 'v0.19.7'
2014-12-17 19:27:59 +01:00
Max Kellermann
9c56c49e73 release v0.18.21
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJUkcgMAAoJECNuiljG20UShwAP/3qGPv1feFJMOQbhHF+K8eL9
 4oeKJAblVR98+jsdu8Z7GidGGXrvIX8pxGWJPLLYSa2naR9/gtTxpiYZPEd2ex4G
 1jbFzI0GmU08I5x9sUPstX4GoDVfWnV3ICYzY7z1VVhlxYXlI+dHOPz61FxaLWYM
 i/H4WR7lvSwyOsYaFtfqZC9SD71XQ0V56yDqaDK6a/NbMg0WQQMghmH0swkEk/FK
 wN6nxEpFpTtOjBLjF51TyNC5JT1lxXDYwxYmrtd6rxkNqhN8duCRXq9IK7MEGync
 LNtHKGMrcXwLBSAPM6GTrY0StCch6fEBhOg0Tr7JQ81BSb/1XKzimbxCCULDwx/P
 /hN4lGr66tudXHFaRQX0GLxRpkpKtanp7+xtZ5AhGh4Wk7YQ62nb8RN3qCc5x2Oi
 cvnK6bewMi7rZoIejAhaXtbKNPho/H5TpE404C+ScnWyEAVtly45xgECNdzllhfk
 k4Kp4rW2CNmHTNbZRFh1Qre2g47a9rhZxoxXx4X0fi6YSruekQC3qjdloom5VN2I
 8d7NloQoJ+wjkYXuZ3EoxdBhbdViZBMg8CP99KFc7sYQTGmYtrKyjZ5EiOAVw3p5
 rHoTrGdZr8aKPMcKQPo4GaTkB9njE4a4l+uVq5SOiRSfpDeRqvhIqOrUz4EOf8Ic
 ryT0jwFGfKhSHG4tz+9K
 =WjqC
 -----END PGP SIGNATURE-----

Merge tag 'v0.18.21' into v0.19.x
2014-12-17 19:19:13 +01:00
Max Kellermann
fa4beeee75 decoder/ffmpeg: detect and fix negative time stamps
Works around assertion failure due to something that appears to be a
(minor) FFmpeg bug.
2014-12-15 00:40:46 +01:00
Rasmus Steinke
7d9aa5b716 vorbiscomments: Remove support for non-standard "album artist" tags.
MPD used both "album artist" and "albumartist" tags and mapped them to one tag.
This could lead to issues, if a file had both tags, causing MPD to send
a list of albumartists instead of a single one.
Since "album artist" is not a standard tag anyway and even its originators
started to use the proper alternative, its time to say goodbye!
2014-12-12 18:28:11 +01:00
Max Kellermann
aea99a1222 decoder/ffpmeg: make variables more local 2014-12-11 10:58:33 +01:00
Max Kellermann
7c8038e2da decoder/ffpmeg: simplify ffmpeg_send_packet() 2014-12-11 10:58:06 +01:00
Max Kellermann
673336297d decoder/ffmpeg: support stream tags 2014-12-11 10:52:40 +01:00
Max Kellermann
ee4b7042ce decoder/ffpmeg: move code to FfmpegScanMetadata() 2014-12-11 10:08:08 +01:00
Max Kellermann
fc1796f3e8 decoder/ffmpeg: support ReplayGain and MixRamp 2014-12-10 13:45:29 +01:00
Max Kellermann
d8926ea5eb decoder/ffpmeg: use forward declarations 2014-12-10 13:42:34 +01:00
Max Kellermann
0c1e428c7d decoder/ffpmeg: rename functions to CamelCase 2014-12-10 13:05:28 +01:00
Max Kellermann
bcd97f5887 decoder/ffmpeg: optimize ffmpeg_scan_dictionary()
Don't scan tag items if the handler doesn't implement the tag()
method.
2014-12-10 09:35:28 +01:00
Max Kellermann
e813c93e08 decoder/mad: convert "const" to "constexpr" 2014-12-09 21:59:11 +01:00
Max Kellermann
f52aefb341 decoder/ffmpeg: make the tag_table constexpr 2014-12-09 21:56:22 +01:00
Max Kellermann
aecb5630cb configure.ac: use MPD_ENABLE_AUTO_LIB for libfaad 2014-12-09 21:36:52 +01:00