Max Kellermann
9d9697b366
DecoderBuffer: add method _clear()
2014-07-12 00:15:35 +02:00
Max Kellermann
6585e18571
decoder/faad: check sample_rate, not frames_per_second
...
Checking the integer is faster, easier and more reliable.
2014-07-11 23:12:08 +02:00
Max Kellermann
6f1b4292f0
decoder/faad: make variables more local
2014-07-11 22:52:31 +02:00
Max Kellermann
ef9ef03b1f
decoder/faad: use MAX_CHANNELS
...
.. instead of declaring a new constant.
2014-07-11 22:40:28 +02:00
Max Kellermann
c4bea3dfe4
decoder/sndfile: implement scan_stream() instead of scan_file()
2014-07-11 22:09:35 +02:00
Max Kellermann
eaa9a1e33b
decoder/sndfile: make variables more local
2014-07-11 22:03:26 +02:00
Max Kellermann
3e19298c9e
decoder/sndfile: support more tag types
2014-07-11 22:03:13 +02:00
Max Kellermann
2a96ce97ee
decoder/sndfile: add str_type to TagType table
2014-07-11 21:57:41 +02:00
Max Kellermann
8cfe901391
decoder/sndfile: move code to sndfile_handle_tag()
2014-07-11 21:56:02 +02:00
Max Kellermann
30f1ee7a1f
decoder/sndfile: log libsndfile version on startup
2014-07-11 21:53:03 +02:00
Max Kellermann
46ff830daa
PlaylistEdit: fix typo in code comment
2014-07-11 21:37:06 +02:00
Max Kellermann
828cd6fd0b
Merge branch 'v0.18.x'
2014-07-11 21:33:50 +02:00
Max Kellermann
ecb67a1ed1
decoder/sndfile: use decoder_read_full()
...
Replaces the loop in sndfile_vio_read(), eliminating duplicate and
fragile code.
2014-07-11 21:18:44 +02:00
Max Kellermann
0ef843f138
decoder/sndfile: use decoder_read()
...
.. instead of InputStream::LockRead(). The former is cancellable.
2014-07-11 21:18:44 +02:00
Max Kellermann
eb79d83051
decoder/sndfile: log seek errors
2014-07-11 21:18:44 +02:00
Max Kellermann
ca1a11493d
decoder/audiofile: log seek errors
2014-07-11 21:18:44 +02:00
Max Kellermann
69bb086ba5
decoder/audiofile: fix typo in comment
2014-07-11 21:18:44 +02:00
Max Kellermann
11a5ee821b
PlaylistEdit: postpone UpdateQueuedSong() when adding multiple songs
...
Implement a "bulk" edit mode that postpones both UpdateQueuedSong()
and OnModified(). This way, the playlist version gets incremented
only once. More importantly: when adding multiple songs to a queue
that consists of only one song, the first song that got added will
always be played next. By postponing this choice, all newly added
songs get a chance to become the next song. Fixes the second (and
last) part of Mantis ticket 0004005.
2014-07-11 20:22:35 +02:00
Max Kellermann
a8a85143f6
QueueCommands: make "result" more local
2014-07-11 20:22:35 +02:00
Max Kellermann
e2cc328eef
Playlist: randomize next song when enabling "random" mode while not playing
...
Don't restore the current song after shufflung when MPD is stopped
(but still remembers the current song internally). Fixes the first
part of Mantis ticket 0004005.
2014-07-11 19:41:39 +02:00
Max Kellermann
344d10a8e3
PlaylistControl: update code comment
2014-07-11 19:29:25 +02:00
Max Kellermann
681643ea9e
input/curl: options "verify_peer" and "verify_host"
2014-07-11 16:39:42 +02:00
Mantas Mikulėnas
cd289843f7
fs/StandardDirectory: look for cache dir in environment, not user-dirs
...
The XDG cache directory is part of the "base directories" spec like
$XDG_CONFIG_HOME, not "user directories".
2014-07-11 08:09:19 +02:00
Max Kellermann
b123392592
input/async: more API documentation
2014-07-10 10:33:43 +02:00
Max Kellermann
ccbb5c3e01
decoder/audiofile: log libaudiofile errors
2014-07-10 09:37:43 +02:00
Max Kellermann
49b63e084f
decoder/audiofile: make variables more local
2014-07-10 09:26:12 +02:00
Max Kellermann
107321e385
decoder/audiofile: implement scan_stream() instead of scan_file()
2014-07-10 09:23:56 +02:00
Max Kellermann
1d214b4aed
decoder/audiofile: use audiofile_get_duration() in _stream_decode()
2014-07-10 08:35:24 +02:00
Max Kellermann
2e1347aba4
decoder/audiofile: split audiofile_get_duration()
2014-07-10 08:31:41 +02:00
Max Kellermann
9ddb5931fb
decoder/audiofile: remove unused Error variable
2014-07-09 20:03:11 +02:00
Max Kellermann
913064d6cc
Merge branch 'v0.18.x'
2014-07-09 20:02:07 +02:00
Gustavo Zacarias
fb45b8a5c9
playlist/plugins/DespotifyPlaylistPlugin: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 19:54:35 +02:00
Gustavo Zacarias
f5c9056430
output/plugins/httpd/HttpdClient: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 19:54:35 +02:00
Gustavo Zacarias
0e39b59700
decoder/plugins/FlacIOHandle: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 19:54:35 +02:00
Max Kellermann
552af5455e
decoder/dsdlib: use decoder_skip()
...
Reduce duplicate code.
2014-07-09 19:42:36 +02:00
Max Kellermann
8759bc1b41
decoder/dsdlib: pass unsigned offsets to dsdlib_skip*()
2014-07-09 19:39:10 +02:00
Joff
09384df32c
decoder/dsd: use decoder_read_full() where appropriate
...
Addresses Mantis ticket 0004015.
[mk: use decoder_read_full() only when needed, and a few formal
changes]
2014-07-09 19:18:36 +02:00
Max Kellermann
20538516b9
decoder/audiofile: use decoder_read_full()
...
Works around WAV stream playback bug, because libaudiofile does not
like partial reads (Mantis 0004028).
2014-07-09 19:05:20 +02:00
Max Kellermann
0759421d11
DecoderAPI: add function decoder_read_full()
...
Move code from the "mad" plugin.
2014-07-09 19:03:58 +02:00
Max Kellermann
bf7417981f
DecoderAPI: add function decoder_skip()
...
Move code from the "mad" plugin.
2014-07-09 19:03:31 +02:00
Max Kellermann
bc6472bb9e
decoder/audiofile: use decoder_read()
...
.. instead of InputStream::LockRead(). The former is cancellable.
2014-07-09 18:57:50 +02:00
Gustavo Zacarias
d4bd947bf5
playlist/PlsPlaylistPlugin: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 17:41:31 +02:00
Gustavo Zacarias
d8e8eabf60
output/HttpdClient: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 17:41:31 +02:00
Gustavo Zacarias
a70443af31
decoder/OpusDecoderPlugin: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 17:41:31 +02:00
Gustavo Zacarias
3f221e2edb
decoder/AudiofileDecoderPlugin: fix build failure due to missing stdio.h include
...
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
2014-07-09 17:41:31 +02:00
Max Kellermann
56504534d8
thread/{Mutex,Cond}: relicense to BSD-2
2014-07-02 20:09:39 +02:00
Max Kellermann
80a45c91f9
thread/GLib{Mutex,Cond}: remove obsolete classes
2014-07-02 20:09:39 +02:00
Max Kellermann
3f695fdfaf
lib/nfs/Connection: include poll.h
2014-06-30 10:22:08 +02:00
Christoph Tieben
88433bca22
Added Comment/Description to decoder/plugins/XiphTags.cxx
2014-06-27 21:14:55 +02:00
Christoph Tieben
34689eb2d2
decoder: vorbis, flac, opus: honor DESCRIPTION= tag in Xiph-based files as a comment to the song
...
(see https://www.xiph.org/vorbis/doc/v-comment.html for Details)
2014-06-27 21:14:17 +02:00
Max Kellermann
211aea1441
util/ConstBuffer: add method skip_front()
2014-06-26 22:25:03 +02:00
Max Kellermann
74a46788cd
util/ConstBuffer: wrap assert() in NDEBUG check
...
Fixes build failure because assert.h was not included.
2014-06-26 13:31:48 +02:00
Max Kellermann
7213c26798
util/ConstBuffer: add method Contains()
2014-06-23 22:30:01 +02:00
Max Kellermann
fa1fb47d75
Merge branch 'v0.18.x'
2014-06-23 10:13:50 +02:00
Max Kellermann
848ed14788
db/proxy: fall back to recursive walk on old libmpdclient/MPD
...
Error message was 'too few arguments for "find"' because the "base"
constraint was not supported, and no other constraints remained.
2014-06-23 09:18:11 +02:00
Max Kellermann
4c8a5dfb05
db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3
2014-06-23 09:17:35 +02:00
Max Kellermann
b9eeb6e6eb
db/proxy: use mpd_song_get_{start,end}() only with libmpdclient >= 2.3
2014-06-23 08:57:51 +02:00
Max Kellermann
d5fa2af353
input/async: use IsEOF() instead of !open for "ready" check
...
Checking "!open" did not work with the NFS plugin because that plugin
does not close the file automatically, unlike CURL.
2014-06-21 14:13:31 +02:00
Max Kellermann
a877926f08
Revert "AsyncInputStream: fix assertion failure in AppendToBuffer()"
...
This reverts commit 966c4244cb
.
The commit was bad, because the bug was really in
NfsInputStream::DoRead(); see previous commit.
2014-06-21 14:07:15 +02:00
Max Kellermann
3e4e6f7ced
input/nfs: never read more than space available in buffer
...
Avoids off-by-one bug and obsoletes the bug fix in commit 966c4244
2014-06-21 14:06:31 +02:00
Max Kellermann
936eb43c0e
db/proxy: initialize LightSong::real_uri
...
Fixes potential crash.
2014-06-21 12:37:23 +02:00
Max Kellermann
eb8fd07900
lib/nfs/Manager: gcc 4.7 compatibility hack
...
std::map::emplace() is only available from gcc 4.8 on.
2014-06-17 10:35:34 +02:00
Max Kellermann
c99559dbe9
input/nfs: use the asynchronous libnfs API
...
More robust and cancellable.
2014-06-17 03:21:25 +02:00
Max Kellermann
966c4244cb
AsyncInputStream: fix assertion failure in AppendToBuffer()
2014-06-17 03:21:11 +02:00
Max Kellermann
81283f8bcb
AsyncInputStream: reset "paused" when seeking
...
May cause assertion failure.
2014-06-17 03:20:49 +02:00
Max Kellermann
8b84e5b3f9
input/curl: hold mutex while writing to postponed_error
2014-06-17 02:32:17 +02:00
Max Kellermann
e1d5ddb478
input/AsyncInputStream: add method IsBufferFull()
2014-06-17 02:32:17 +02:00
Max Kellermann
2da0322329
command: make argc unsigned
2014-06-16 19:50:34 +02:00
Max Kellermann
fefb35c782
Directory: eliminate attribute "have_stat"
...
Check for 0 in "device" and "inode" instead.
2014-06-16 19:46:35 +02:00
Max Kellermann
b2433a664c
TagPool: move code to tag_value_slot_p()
2014-06-16 19:26:26 +02:00
Max Kellermann
adad4279f3
TagPool: convert macro to constexpr
2014-06-16 19:18:10 +02:00
Max Kellermann
3ca0a39a35
db/simple: use class boost::intrusive::list
...
Remove the C list_head library and use type-safe C++ instead.
2014-06-16 18:39:16 +02:00
Max Kellermann
3364c1b893
ClientList: use class boost::intrusive::list
...
Eliminate extra allocations for the std::list node instances.
2014-06-11 09:27:17 +02:00
Max Kellermann
507d8fdc6f
ClientList: add typedef List
2014-06-10 23:21:09 +02:00
Max Kellermann
31e29e62f4
zeroconf/Avahi: call dbus_shutdown() during shutdown
...
Make valgrind happy.
2014-06-10 23:21:09 +02:00
Max Kellermann
dfcb572985
Main: delete the Storage instance on shutdown
2014-06-10 23:21:09 +02:00
Max Kellermann
1d324176d1
lib/icu/Init: call u_init() and u_cleanup()
...
Make valgrind happy.
2014-06-10 23:21:09 +02:00
Max Kellermann
37b3190752
lib/icu: add IcuInit(), IcuFinish()
2014-06-10 23:21:09 +02:00
Max Kellermann
dc14ac7a8f
thread/Util: relicense to BSD-2
2014-05-31 12:11:53 +02:00
Max Kellermann
fb52a24da3
input/async: add offset/size comparison to IsEOF()
2014-05-24 15:19:22 +02:00
Max Kellermann
fbafb19657
input/curl: move code to AsyncInputStream
...
New base class for other InputStream implementations that run in the
I/O thread.
2014-05-24 14:36:28 +02:00
Max Kellermann
6c4438d8a9
input/curl: call SetReady() only if not yet ready
...
Fixes assertion failure.
2014-05-24 14:36:25 +02:00
Max Kellermann
be00737ced
input/curl: include cleanup
2014-05-24 12:43:48 +02:00
Max Kellermann
07b93dcf80
InputStream: make Seek() always absolute
...
Remove the "whence" parameter that is not actually necessary, and only
complicates the InputStream implementations.
2014-05-22 13:52:00 +02:00
Max Kellermann
374c6a27db
decoder/vorbis: make VorbisInputStream::input_stream a reference
2014-05-22 13:52:00 +02:00
Max Kellermann
36c9e95969
decoder/vorbis: add VorbisInputStream constructor
2014-05-22 13:52:00 +02:00
Max Kellermann
a3142ee4e6
decoder/vorbis: rename struct vorbis_input_stream to VorbisInputStream
2014-05-22 13:52:00 +02:00
Max Kellermann
437caeb90f
decoder/vorbis: add "restrict" to pointers in vorbis_interleave()
...
Allows more compiler optimizations.
2014-05-22 13:52:00 +02:00
Max Kellermann
af49cace8d
decoder/vorbis: log libvorbis version on startup
2014-05-22 13:52:00 +02:00
Max Kellermann
13b78d0d89
decoder/wavpack: move code to WavpackInput::ReadBytes()
2014-05-22 12:54:56 +02:00
Max Kellermann
65c135b451
decoder/wavpack: convert WavpackInput attributes to references
2014-05-22 12:52:33 +02:00
Max Kellermann
ec162f265f
decoder/wavpack: move wavpack_input_init into struct WavpackInput
2014-05-22 12:47:20 +02:00
Max Kellermann
ba99696771
decoder/wavpack: wavpack_open_wvc() returns WavpackInput*
2014-05-22 12:36:55 +02:00
Max Kellermann
4eeea640f4
DecoderAPI: add function decoder_open_uri()
...
Move and refactor code from the Wavpack decoder plugin.
2014-05-22 12:35:20 +02:00
Max Kellermann
631b635652
decoder/wavpack: rename struct wavpack_input to WavpackInput
2014-05-22 10:52:34 +02:00
Max Kellermann
49695d47d3
input/curl: relock mutex in error paths
2014-05-21 19:00:47 +02:00
Max Kellermann
5cec477131
input/curl: pass remaining size to CircularBuffer::Append()
2014-05-21 18:59:51 +02:00
Max Kellermann
a5d0300787
input/curl: move code to IcyInputStream
2014-05-21 18:47:49 +02:00
Max Kellermann
09b84c51ee
input/rewind: move code to class ProxyInputStream
2014-05-21 18:47:49 +02:00
Max Kellermann
c42e412c0a
input/InputStream: move Open() to Open.cxx
...
Allow compiling test programs with only selected plugins.
2014-05-21 18:47:32 +02:00