Max Kellermann
d5cf41e043
util/UTF8: new library
2014-10-10 22:11:38 +02:00
Max Kellermann
b7a1954c33
TagString: return WritableBuffer<char>
2014-10-10 22:07:19 +02:00
Max Kellermann
6520589a37
TagString: use strndup() for unterminated string
...
Fixes buffer overflow bug.
2014-10-10 22:06:48 +02:00
Max Kellermann
f445b0178a
TagString: remove ISO-Latin-1 fallback
...
MPD handles all strings in UTF-8 internally. Those decoders which
read Latin-1 tags are supposed to implement the conversion, instead of
passing Latin-1 to TagBuilder::AddItem(). FixTagString() is simply
the wrong place to do that, and hard-coding Latin-1 is kind of
arbitrary.
2014-10-10 20:53:08 +02:00
Max Kellermann
f618065f7c
fs/Traits: use value_type
2014-10-10 19:51:44 +02:00
nanotech
f0be48ff90
Main: run the OS X native event loop
2014-10-10 19:51:44 +02:00
Max Kellermann
bb922d577d
storage/nfs: use the libnfs async API
...
Share the NFS connection with the NFS input plugin.
2014-10-09 08:09:08 +02:00
Max Kellermann
990809cc21
lib/nfs/Connection: reduce Error instance allocations
2014-10-09 08:08:17 +02:00
Max Kellermann
bfcc466647
lib/nfs/Glue: add assertion
2014-10-09 07:59:53 +02:00
Max Kellermann
3d2558bde6
StoragePlugin: pass EventLoop to constructor
2014-10-09 07:45:25 +02:00
Max Kellermann
e5ff85b63c
storage/nfs: move code to class MemoryStorageDirectoryReader
...
Read all directory entries into memory and close the struct nfsdir
before returning the StorageDirectoryReader instance. This is what
libnfs does, anyway.
2014-10-07 06:36:11 +02:00
Max Kellermann
f0bb5b84f9
storage/nfs: move code to Copy()
2014-10-07 06:35:53 +02:00
Max Kellermann
07b50f6c69
lib/nfs/Connection: add methods {Open,Read,Close}Directory()
2014-10-07 06:35:50 +02:00
Max Kellermann
61b3aaaa07
lib/nfs/Connection: add method Stat(path)
2014-10-07 06:35:46 +02:00
Max Kellermann
60512ffa09
lib/nfs/Connection: make GetEventLoop() public
2014-10-06 08:47:13 +02:00
Max Kellermann
b1a252a64d
lib/nfs/Base: kludge to reduce number of NFS mounts
...
Creating a NfsStorage sets its own export_name as the "base". Now
NfsFileReader can use this information to derive the export_name to be
mounted, instead of guessing. This solves the "too many connection"
problem on the NFS server while updating the database.
2014-10-05 07:41:50 +02:00
Max Kellermann
6e7a398263
PlaylistStream: use OpenLocalInputStream()
2014-10-02 22:03:02 +02:00
Max Kellermann
44d2d9b1e8
PlaylistStream: pass Path instance to playlist_open_path()
...
Convert filesystem charset to UTF-8 for playlist_list_open_uri().
This fixes one of many remaining charset bugs.
2014-10-02 22:02:11 +02:00
Max Kellermann
8302ed44aa
archive/bzip2: use OpenLocalInputStream()
2014-10-02 22:00:42 +02:00
Max Kellermann
7e12aea1d8
input/Open: use OpenLocalInputStream()
...
Make the "open" method of plugins "file" and "archive" dummy methods
that always fail. Instead, let InputStream::Open() hard-code access
to these two plugins by using OpenLocalInputStream(). This allows
simplifyin the algorithm for falling back to probing archive plugins.
2014-10-02 21:50:14 +02:00
Max Kellermann
20346b0da4
DecoderThread: use OpenLocalInputStream() for local files
2014-10-02 21:48:52 +02:00
Max Kellermann
e0e65cbdf9
TagFile: use OpenLocalInputStream()
2014-10-02 21:43:40 +02:00
Max Kellermann
9d2d58c4b6
input/LocalOpen: new library for opening local files
...
Combines the "file" and the "archive" input plugins.
2014-10-02 21:06:01 +02:00
Max Kellermann
0c461c3859
input/archive: export function OpenArchiveInputStream()
2014-10-02 21:00:38 +02:00
Max Kellermann
0d38bd9b3b
input/file: export function OpenFileInputStream()
2014-10-02 20:44:03 +02:00
Max Kellermann
2f02e49b9f
input/file: generate Error when errno==ENOENT
...
This special case was useless. Fixes the dreaded "Unrecognized URI"
error message when a file does not exist.
2014-10-02 20:16:05 +02:00
Max Kellermann
064e8a7c68
input/file: make the "fd" attribute "const"
2014-10-02 19:55:01 +02:00
Max Kellermann
e4dd269609
input/file: make variables more local
2014-10-02 19:18:58 +02:00
Max Kellermann
19dd59f38c
storage: remove redundant "virtual" keywords
...
"override" implies "virtual".
2014-10-02 19:17:46 +02:00
Max Kellermann
37501d9bc7
input/file: convert to class
2014-10-02 19:14:59 +02:00
Max Kellermann
89f9561d10
storage/Interface: include cleanup
2014-10-01 23:38:17 +02:00
Max Kellermann
0661fd6f7c
lib/nfs/FileReader: postpone the nfs_close_async() call
...
If an async opertion is in progress, nfs_close_async() will make
libnfs crash because the RPC callback will dereference an object that
was freed by nfs_close_async().
2014-10-01 23:10:32 +02:00
Max Kellermann
edd003b62a
lib/nfs/Connection: fix memory leak when cancelling Open()
...
Close the newly allocated file handle passed to the callback.
2014-10-01 23:03:31 +02:00
Max Kellermann
10cc87e422
lib/nfs/Connection: remove Mutex
...
All locks are currenly held from only a single thread (the IOThread)
and thus we don't need the Mutex.
2014-10-01 22:15:06 +02:00
Max Kellermann
0470f648c6
lib/nfs/Connection: add method GetEventLoop()
2014-10-01 22:10:46 +02:00
Max Kellermann
777360149d
lib/nfs/Connection: remove obsolete flag postponed_destroy
2014-10-01 22:10:05 +02:00
Max Kellermann
aa7774b82b
lib/nfs/Connection: remove deprecated move constructor workaround
...
Not used anymore because NfsManager now uses boost::intrusive::set
instead of std::map.
2014-10-01 22:09:37 +02:00
Max Kellermann
d44da875e7
storage/nfs: make a few attributes "const"
2014-10-01 21:14:26 +02:00
Max Kellermann
f9ad73598b
lib/nfs/Manager: use boost::intrusive::map
...
Reduce overhead for storing the key twice, and more overhead while
looking up the connection to remove it after a failure.
2014-10-01 20:49:40 +02:00
Max Kellermann
952fe98796
lib/nfs/Glue: add assertion
2014-10-01 20:44:54 +02:00
Max Kellermann
579912e52f
lib/nfs/Glue: destruct the NfsManager in the I/O thread
...
This allows eliminating the indirection code from the NfsConnection
destructor.
2014-10-01 20:39:50 +02:00
Max Kellermann
1b5ec3e3ca
lib/nfs/Glue: eliminate class NfsGlue
...
It's just a useless wrapper for class NfsManager.
2014-10-01 20:37:25 +02:00
Max Kellermann
fb4e6ac923
lib/nfs/Cancellable: use boost::intrusive::list
...
Reduce Remove() overhead because we don't have to walk the list to
find an iterator by reference.
2014-10-01 19:49:38 +02:00
Max Kellermann
3560dc4be6
Tag: support "AlbumSort"
...
The new tag is supported by all decoders that use the tag name table,
and the ID3v2 tag "TSOA" maps to it.
2014-09-29 18:55:59 +02:00
Max Kellermann
b002ea9a20
storage/nfs: convert file name to UTF-8
...
Assume the configured filesystem character set is also used by the NFS
server.
2014-09-28 18:26:54 +02:00
Max Kellermann
540317ea2b
storage/nfs: use string::append() instead of string::insert()
...
Swap the order of adding the URI and the slash, because appending is
cheaper than inserting.
2014-09-28 18:25:51 +02:00
Max Kellermann
142d1951d2
storage/nfs: move code to UriToNfsPath()
2014-09-28 18:12:20 +02:00
Max Kellermann
cf06ba6d13
fs/AllocatedPath: add method Steal()
2014-09-28 18:12:20 +02:00
Max Kellermann
a8d800572e
fs/AllocatedPath: API documentation grammar fixes
2014-09-28 18:06:18 +02:00
Wieland Hoffmann
5525ea45a4
Add MusicBrainz' Release Track Id tag
...
The Release Track Id uniquely identifies a recording on a release - that
is, even if a recording appears twice on a release (meaning that the
combination of recording and release id are not enough to figure out
which one it is), the release track id will allow differentiating the two.
The tag names are taken from
https://musicbrainz.org/doc/MusicBrainz_Picard/Tags/Mapping
2014-09-27 19:54:12 +02:00
Max Kellermann
3120958a17
pcm: --disable-dsd also disables the dsd2pcm library
2014-09-26 12:17:47 +02:00
Max Kellermann
052726ed50
PcmConvert: eliminate unused local variable "format"
2014-09-26 12:17:37 +02:00
Max Kellermann
8397196fbb
output/alsa: change a few "dsd" to "dop"
2014-09-26 11:07:53 +02:00
Max Kellermann
8547611479
release v0.18.16
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJUJSq1AAoJECNuiljG20US8CAQAJo/4jAPKsba6RVWf4oWo1Tl
1KUVHaqPonboZ+ArexI+eLObRzmzawTdzc1iVAI8KhISaZkfBWvY3PGFbn6GW3xZ
o1GMRkjhps/ZWIXao2qzelITMzEWzKuAPEGdQE2Z3qXDP/bva0QnAJwjm6zfMsrz
qKYDjQlCGkt7s6jw8gbLGrcoPgP+q7s522qb/0gBc620OivufuEeAQquaahY3X+L
PnXGqsNr34Xqw8EeHCahVGvvQeetY0dGTG/EUiLuxgACqRnjnxwgZ1Xem3YSlGgP
KZVmEqepcvLgz7BlLkQrHse4eEcdxmojRP4towUPUOeRKb1LIlDr9AF6LoulGJr4
jCTeOhzRpmh7wo/rh2klMJXSkqqQlu84+jG7d+PW38oweVCO9HekhyfIDWYDJq/+
jndDRMK7pcPl4sBBXPrJNLdGAQZoJDxRD84syEwOmGOL1FgV2KZl1pJ81fOacR5x
BHeRZrtd0iZ97/qZL+wtNskKU21lMjKqv48saF224FhKCtR1iXkVw4fH6U+H3Q1w
8mrghkkMUom6yQ1mL7U2zA3P6yUcpOJIp0OwMLkJc4H7iOY3a21IAsH0KXmn/Z5O
RE+0zSZm4krUg5uoxhhJWbJnORjoexMv1iaR8+uh71qvBI+RwQXjYA94VJ3Rf88/
R4tE+xb0ZY8OvTXGswdF
=y5Hv
-----END PGP SIGNATURE-----
Merge tag 'v0.18.16'
2014-09-26 11:06:11 +02:00
Max Kellermann
ef02b20811
CommandLine: update copyright year
2014-09-26 09:29:18 +02:00
Max Kellermann
8bf46a665e
configure.ac: add option to disable the DSD decoders
...
Allow building a smaller MPD binary for people who don't need DSD.
2014-09-26 09:29:18 +02:00
Max Kellermann
c4fca2aa61
playlist/embcue: change name string to "embcue"
...
The name "cue" was listed twice in "mpd --version".
2014-09-26 09:29:18 +02:00
Max Kellermann
45310d0cf6
decoder/mp4v2: add tag table
2014-09-24 23:29:10 +02:00
Max Kellermann
032e435490
decoder/mpg123: support ID3v2, ReplayGain and MixRamp
2014-09-24 22:53:50 +02:00
Max Kellermann
78c43edcac
decoder/mpg123: make variables more local
2014-09-24 22:53:39 +02:00
Max Kellermann
f32d34b965
decoder/flac: pass VorbisComment to flac_parse_mixramp()
2014-09-24 22:50:28 +02:00
Max Kellermann
8a7ff6a6fd
decoder/flac: move code to tag/MixRamp.cxx
2014-09-24 22:44:58 +02:00
Max Kellermann
6c48aa5fae
decoder/mad: move code to tag/MixRamp.cxx
2014-09-24 22:40:34 +02:00
Max Kellermann
d82547acd3
decoder/flac: pass VorbisComment to flac_parse_replay_gain()
2014-09-24 22:34:08 +02:00
Max Kellermann
441f9cc2ee
tag/ReplayGain: add VorbisComment parser
...
Move code from the Vorbis and FLAC decoder plugins.
2014-09-24 22:21:13 +02:00
Max Kellermann
9f4fc8ad33
tag/ReplayGain: move code to template function
2014-09-24 22:19:55 +02:00
Max Kellermann
d1e31261fe
decoder/{vorbis,flac}: move duplicate code to tag/VorbisComment.cxx
2014-09-24 21:50:42 +02:00
Max Kellermann
05dd9acba8
tag/ApeReplayGain, decoder/mad: move duplicate code to tag/ReplayGain.cxx
2014-09-24 21:50:34 +02:00
Max Kellermann
9270485723
Merge branch 'v0.18.x'
2014-09-24 21:49:20 +02:00
Max Kellermann
cbdaf4827f
CommandLine: make all OptionDefs "constexpr"
2014-09-22 09:10:17 +02:00
Max Kellermann
f2c28d287a
DecoderBuffer: struct to class
2014-09-22 08:49:14 +02:00
Max Kellermann
90c228abca
DecoderBuffer: convert functions to methods
2014-09-22 08:32:44 +02:00
Max Kellermann
505e6bec9e
decoder/faad: use DecoderBuffer references
2014-09-22 08:30:25 +02:00
Max Kellermann
ee027f237b
decoder/faad: allocate DecoderBuffer on stack
2014-09-22 08:29:07 +02:00
Max Kellermann
3ae0d6f421
DecoderBuffer: export the struct
...
Eliminates the functions _new() and _free().
2014-09-22 08:18:58 +02:00
Max Kellermann
13b66a77c7
DecoderBuffer: make "decoder" const
2014-09-21 14:02:39 +02:00
Max Kellermann
ed70836057
DecoderBuffer: convert pointer to reference
2014-09-21 13:50:27 +02:00
Max Kellermann
a68e52c2e3
DecoderBuffer: use class DynamicFifoBuffer
2014-09-21 13:39:26 +02:00
Max Kellermann
ea37b89753
decoder/adplug: log version number
2014-09-21 13:22:56 +02:00
Max Kellermann
5d89aa06f7
decoder/adplug: move the buffer into the loop
2014-09-21 13:20:30 +02:00
Max Kellermann
ead034e638
decoder/sndfile: include cleanup
2014-09-21 13:15:53 +02:00
Max Kellermann
a294838bcd
decoder/audiofile: fix indent
2014-09-19 23:57:09 +02:00
Max Kellermann
1c03d1e87d
decoder/sndfile: remove obsolete code comment
2014-09-19 23:00:12 +02:00
Max Kellermann
f8804c8a56
decoder/sndfile: remove debug printf()
2014-09-19 22:49:31 +02:00
Max Kellermann
dd1cec4196
decoder/sndfile: log detailed sf_open_virtual() error message
2014-09-19 21:51:24 +02:00
Max Kellermann
d1a8a4481e
decoder/sndfile: support float and 16 bit samples
...
Support these PCM formats natively, instead of letting libsndfile
convert everything to 32 bit.
2014-09-19 21:44:16 +02:00
Max Kellermann
5921ffaa36
decoder/sndfile: move sf_readf_int() call to sndfile_read_frames()
2014-09-19 21:42:06 +02:00
Max Kellermann
cf47b68c1e
decoder/sndfile: add sndfile_sample_format()
...
Prepare for other sample formats.
2014-09-19 21:06:44 +02:00
Max Kellermann
eeb8d0dbcd
db/proxy: support empty values in VisitUniqueTags()
...
Workaround for assertion failure in PrintUniqueTag().
2014-09-18 17:22:31 +02:00
Max Kellermann
b6fa22bd84
OutputThread: retain negative mix ratio
...
Fixes MixRamp breakage.
2014-09-18 13:50:23 +02:00
Andrzej Rybczak
a0ef27a0cd
command/list: reset used size after the list has been processed
2014-09-18 09:15:39 +02:00
Thomas Guillem
74fcbb382f
android/Bridge: add shutdown()
...
Break the mainloop and terminate run call.
2014-09-16 18:25:45 +02:00
Thomas Guillem
9836b1dddd
CurlInputPlugin: fix crash after second init call
...
The second time init was called, http_200_aliases pointed to a freed pointer
and leaded to a SEGFAULT.
2014-09-16 18:25:25 +02:00
Max Kellermann
e304d0f8ee
thread/Posix{Cond,Mutex}: don't ues PTHREAD_*_INITIALIZER on NetBSD
...
On NetBSD, PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER are
not compatible with C++11 "constexpr" (see Mantis ticket 0004110). As
a workaround, don't ues "constexpr", and use the functions
pthread_mutex_init(), pthread_mutex_destroy(), pthread_cond_init() and
pthread_cond_destroy() instead. This adds some runtime overhead, but
is portable to POSIX implementations that have awkward initializer
macros.
2014-09-13 11:26:17 +02:00
Max Kellermann
a464dc681a
release v0.18.14
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJUEdhhAAoJECNuiljG20USwKkP/1MIm6J2ydXEP81RD/3llz6h
2t8EK94cEIdb6bA6goBI0Pipz7YAtmjgfnDRW90AvFcxNuVt87esxG82gVOiosvo
7LByehQ2kq/w0evILWy8X1eAvqIk/PvG6T/pZcPrrj7kHrZaIOXh0SVTZ5NLq7HC
drunwHQxgVntB/410h7BKEFbg1qWHPGxfTyf6qJsZPkHfr5QcgbHrYN7QCr1eUv9
mARx4Nxo9MXuiqOJOS7ck80V68nbnFdxjNXSflUkl94O0MfiPc741Snbe7qnHI91
I+BQYCBExKzoqFszuuRZQjxFpJalg4Y/9/stn6+dYemtC3WpreGHogweUBlPZ5if
wJRL/A/zHAY0xE/hohiEqY6pHZWmVolbumtp7LfNR7dejOetn0IPW+KnFnjYec21
qkJG/mq8fHStdQMTzp5NDoqh8VrPaBAAhjgP3suZY2wZ5xfbLXHk/HNKdQLvX8s3
Vv4wcDNsfbOJ/1ZTBo/nqceTkOyHrov5cDSotYnO1hs963vyk3LFwY2IRCgPdOR0
7o77JmKHZnzZSw60CIT6Mf1+rx38x++Rq3UGDYuH4B4L4VqXv2WrUp32w1VzHQVO
Dcd/dxwW/sB1SwMdi5J4tIBJCSn5mF7yvBPR0PB5NiZiX1YB6hEqmaXYfwLCqujo
xyWy8gPJbmYw6XJPmw6A
=3azu
-----END PGP SIGNATURE-----
Merge tag 'v0.18.14'
2014-09-11 19:26:58 +02:00
Max Kellermann
c14a00eec9
decoder/ffmpeg: use memset() to initialize AVProbeData
2014-09-09 19:07:46 +02:00
Max Kellermann
219c42522f
decoder/ffmpeg: pass MIME type to ffmpeg/libav version 11
...
That attribute was uninitialized before, which could crash
libavformat.
See Debian bug 760669
2014-09-07 22:05:33 +02:00
Max Kellermann
e3a0f15837
Decoder*: add more assertions
2014-09-07 21:52:34 +02:00
Max Kellermann
a6bb27483b
DecoderThread: clear the pipe when handling late SEEK
...
See code comment. Fixes assertion failure in
decoder_command_finished().
2014-09-07 21:50:00 +02:00
Max Kellermann
7ada7def9e
decoder/audiofile: fix crash after seeking
...
Log call was added to the wrong branch.
Fixes regression by commit ca1a1149
2014-09-06 19:32:10 +02:00
Max Kellermann
223c129b6b
output/pulse: simplify _wait_for_operation()
...
Eliminate the duplicate pa_operation_get_state() call.
2014-09-05 11:16:09 +02:00
Max Kellermann
421c4ae907
protocol/ArgParser: fix integer overflow in parse_range()
...
Casting std::numeric_limits<unsigned>::max() to "long" leads to an
overflow if sizeof(unsigned)==sizeof(long), and the result will be -1.
This happens on some 32 bit architectures, for example ARM and WIN32.
Workaround: use std::numeric_limits<int>::max(), which is the largest
signed integer. Since sizeof(long)>=sizeof(int), this will never
overflow.
Fixes Mantis ticket 0004080.
2014-09-04 17:37:31 +02:00
Max Kellermann
60589fc1cb
input/nfs: auto-reconnect if failed while paused
2014-09-02 21:27:07 +02:00
Max Kellermann
5121316036
input/async: add method IsPaused()
2014-09-02 20:02:56 +02:00
Max Kellermann
43da1686da
nfs/Connection: check for disappearing libnfs socket
2014-08-31 19:33:08 +02:00
Max Kellermann
6d643f92b7
nfs/Connection: use only BroadcastError()
...
Since BroadcastError() calls BroadcastMountError(), there's no need to
check mount_finished here.
2014-08-31 19:32:41 +02:00
Max Kellermann
559a01f585
nfs/Connection: nfs_get_fd() can return -1
...
While reconnecting to the NFS server, the socket is -1, because there
is no socket. Fixes a potential crash (assertion failure).
2014-08-31 19:08:26 +02:00
Max Kellermann
ba8e3f11e2
input/nfs: notify client on error
...
Fixes hanging NFS client.
2014-08-31 18:26:32 +02:00
Max Kellermann
fd8a53ca3d
nfs/Connection: use nfs_get_error() for mount error
2014-08-31 17:44:35 +02:00
Max Kellermann
8707aafaf7
nfs/Connection: fix assertion failure
2014-08-31 17:39:33 +02:00
Max Kellermann
e5a28bfd8d
output/alsa, pcm: rename "DSD over USB" to "DoP"
...
The standard has been renamed since the early draft that was
implemented in MPD.
2014-08-31 16:12:26 +02:00
Max Kellermann
6e04d66a35
release v0.18.13
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJUAxsyAAoJECNuiljG20USmRAP/2J/+kV5TRfqr7acFKh/aqip
RAefHTvHpYuAUDOi3WDVSZcmMnaYGKslZhbXhqchbRfR2oMwYhR+5gHIoxOp+EcL
09UF1fJfUnjg6B2zz6tggIWR53Dwxckg4xEaKtI2Wi3Gz+9Q/CiNlpWLJc0ONA5e
9gcz8pNK3oN0Em9c1KXahZKArzGdOGeytfSI3PLE+QnRiEyEDz1+StxIuyl72vr4
ar2EMa9Vdvb7ouNK0g8WqaEOzYyNDXhklIqc+zALQJGThY1xj6OCfQ8JVagJhzwB
UDuYfX1FylkN8LhF5pNzH1F0ANMozWcqeZlLLph6vuKkVBD7WUX4X1t82bwUlFDB
ppdA5pPkiXsqYnuhHML4GqL7LlI2wsMxUHK7v+A9+9hfGN9HIoFyOSLBjB1pyI93
yi8IPOq2a1BJQfQ2c69693ZS7WPxU6vOFKucKrk9PBlr2900SlvpMzIpZr1PMnGV
hoU8eLHOIW86wi5Ea2ycFbFyI1ZoyrKJmzcVJjPjZUT05jDV6bA2Gi1IG6gIhX1q
DiBfXUre+GISkLS4r8GcbG1FIXcv7fGjZ6Vols5di8lpYQ5oBu5aw2TEf8zukrHC
LzPRa2l6Mhe2OI7a/mmTaEYDINgCL//46hOU5mIbmB0XZS8Jf+D1/HBzqKpeqO7f
idENtbelqQdSsR5UU+R0
=c2vC
-----END PGP SIGNATURE-----
Merge tag 'v0.18.13'
2014-08-31 15:03:34 +02:00
Max Kellermann
a26ead035a
PlaylistControl: use SeekSongOrder(current) to keep current song
...
The "current" attribute is a "song order", not a "song position".
This is usually the same - except in random mode. Fixes Mantis ticket
0004073.
2014-08-31 14:44:20 +02:00
Max Kellermann
704be54c3a
PlaylistControl: move code to new method SeekSongOrder()
2014-08-31 14:23:06 +02:00
Max Kellermann
2406152576
output/alsa: fix endless loop at end of file in dsd_usb mode
2014-08-31 14:01:57 +02:00
Max Kellermann
af260b5a64
output/{alsa,oss}: add assertions
2014-08-31 14:00:09 +02:00
Max Kellermann
26bef5d209
DecoderAPI: use std::min()
2014-08-31 08:27:51 +02:00
Max Kellermann
cd6e0ff88a
MusicChunk: remove special case for num_frames==0
...
Simply return an empty WritableBuffer, not a nulled one.
2014-08-31 08:26:03 +02:00
Max Kellermann
2ca979425f
MusicChunk: copy AudioFormat only when chunk is empty
2014-08-31 08:25:17 +02:00
Max Kellermann
8d822ebdb4
PlaylistMapper: pass the Storage::MapUTF() result to playlist_open_remote()
...
Finally allows loading playlist files on a storage plugin. Commit
297e2747
attempted to implement this, but failed due to this bug.
2014-08-30 01:02:24 +02:00
Max Kellermann
bc5b5afcbf
decoder/sndfile: refactor frame_to_time()
2014-08-30 00:53:14 +02:00
Max Kellermann
b373c53ce4
*: add missing Compiler.h includes
...
Necessary for "final" on gcc 4.6.
2014-08-30 00:46:52 +02:00
Max Kellermann
bc4b89c21a
Chrono: workaround for gcc 4.6 constexpr problems
2014-08-30 00:41:56 +02:00
Max Kellermann
e10c287c93
PlayerControl: make settings "const"
2014-08-30 00:28:02 +02:00
Max Kellermann
ce42d53a09
PlayerControl: update include guard
2014-08-30 00:27:01 +02:00
Max Kellermann
a4f9d6d98b
output/alsa: fix signed/unsigned comparison warning
2014-08-30 00:27:01 +02:00
Max Kellermann
eebd03701a
db/simple: fix build failure without zlib
2014-08-30 00:25:12 +02:00
Max Kellermann
d5287682d1
ArgParser: allow fractional seconds in ParseCommandArg(SongTime)
2014-08-29 23:46:38 +02:00
Max Kellermann
7c567e3cbd
CrossFade: pass total_time as SignedSongTime instance
2014-08-29 23:41:34 +02:00
Max Kellermann
58352ea69d
db/Stats: use std::chrono::duration for the total duration
...
Use milliseconds precision to reduce rounding errors.
2014-08-29 23:25:03 +02:00
Max Kellermann
de64b35359
db/upnp: use DatabaseStats::Clear()
2014-08-29 23:24:49 +02:00
Max Kellermann
7df8e1eab2
db/Count: use std::chrono::duration for the total time
...
Use milliseconds precision to reduce rounding errors.
2014-08-29 23:18:40 +02:00
Max Kellermann
8b62127770
decoder/gme: fix song duration
...
The unit of gme_info_t::length is milliseconds, not centiseconds.
2014-08-29 23:03:29 +02:00
Max Kellermann
3158955198
TagHandler: pass SongTime to duration()
2014-08-29 22:52:04 +02:00
Max Kellermann
d9d97bd17b
DecoderAPI: pass SignedSongTime to decoder_initialized()
2014-08-29 21:40:15 +02:00
Max Kellermann
94f6380d69
Chrono: add methods FromScale()
2014-08-29 21:38:08 +02:00
Max Kellermann
2ee821656f
Chrono: rename ToScale() parameter
2014-08-29 21:38:08 +02:00
Max Kellermann
7556abb92d
decoder/faad: bit_rate==0 is an error
2014-08-29 21:38:08 +02:00
Max Kellermann
9d3a85d434
MusicChunk: use SignedSongTime for the time stamp
2014-08-29 13:20:58 +02:00
Max Kellermann
147d301f10
MultipleOutputs: use SignedSongTime for elapsed_time
2014-08-29 13:20:58 +02:00
Max Kellermann
75a89c5983
PlayerThread: use SongTime for elapsed_time
2014-08-29 13:20:58 +02:00
Max Kellermann
2289968634
PlayerControl: use SignedSongTime for the song duration
2014-08-29 13:20:58 +02:00
Max Kellermann
ca252804c6
DecoderControl: use SignedSongTime for the song duration
2014-08-29 13:20:58 +02:00
Max Kellermann
7c25d83f1c
Tag: use SignedSongTime for the song duration
2014-08-29 13:20:58 +02:00
Max Kellermann
8ce30c6a69
Chrono: convert SongTime to SignedSongTime implicitly
2014-08-29 13:20:58 +02:00
Max Kellermann
9fcaff749f
Chrono: add SignedSongTime::FromS(unsigned)
2014-08-29 12:50:41 +02:00
Max Kellermann
3ac1475262
Chrono: add methods ToS(), RoundS()
2014-08-29 12:23:09 +02:00
Max Kellermann
ad64bab5b2
Chrono: add method SignedSongTime::Negative()
2014-08-29 12:18:13 +02:00
Max Kellermann
f02998b106
DecoderControl: use std::chrono::duration for start_ms and end_ms
2014-08-28 13:08:44 +02:00
Max Kellermann
127fe6ecf0
PlaylistEdit: pass std::chrono::duration to SetSongIdRange()
2014-08-28 13:03:18 +02:00
Max Kellermann
888ab0c89c
db/simple/Song: use std::chrono::duration for start_ms and end_ms
2014-08-28 13:03:18 +02:00
Max Kellermann
2efd8ef52d
db/LightSong: use std::chrono::duration for start_ms and end_ms
2014-08-28 13:03:18 +02:00
Max Kellermann
6ad933982f
DetachedSong: use std::chrono::duration for start_ms and end_ms
2014-08-28 13:03:18 +02:00
Max Kellermann
854258f376
Chrono: override operator+ and operator-
...
Make sure we return the correct type. This obsoletes the cast
constructor trick.
2014-08-28 13:03:18 +02:00
Max Kellermann
26f2d7fbae
DecoderControl: update API documentation
2014-08-28 13:03:18 +02:00
Max Kellermann
3952920492
Playlist: use std::chrono::duration for Seek*()
2014-08-28 06:42:19 +02:00
Max Kellermann
c2001a7259
Chrono: add class SignedSongTime
2014-08-28 06:42:04 +02:00
Max Kellermann
78f911ac19
Chrono: add methods IsZero(), IsPositive()
2014-08-28 06:42:04 +02:00
Max Kellermann
0f2a7226fb
PlayerControl: use std::chrono::duration for Seek()
2014-08-27 19:07:16 +02:00
Max Kellermann
f8d0ebe92f
PlayerThread: check if total_time is valid before using it
2014-08-27 19:06:50 +02:00
Max Kellermann
ba6ba7d4be
DecoderControl: use std::chrono::duration for Seek()
2014-08-27 18:48:43 +02:00
Max Kellermann
58e6f660f3
Chrono: add implicit conversion operator from std::chrono::duration
2014-08-27 18:47:14 +02:00
Max Kellermann
cd482ca655
Chrono: add method ToDoubleS()
2014-08-27 18:41:33 +02:00
Max Kellermann
e43b56eb38
Chrono: add template parameter to ToScale()
2014-08-27 18:41:33 +02:00
Max Kellermann
0c2d767f6f
DecoderAPI: use std::chrono::duration for decoder_seek*()
...
For type safety and code readability.
2014-08-26 22:27:04 +02:00
Max Kellermann
02e697032f
decoder/pcm: use integer seek times
2014-08-26 22:05:02 +02:00
Max Kellermann
07dc262690
decoder/dsf: use integer seek times
2014-08-26 22:00:16 +02:00
Max Kellermann
6bf8d5b936
decoder/dsdiff: use integer seek times
2014-08-26 21:53:50 +02:00
Max Kellermann
93858bf262
decoder/wildmidi: use integer seek times
2014-08-26 11:41:48 +02:00
Max Kellermann
f64da46a98
decoder/wavpack: use integer seek times
2014-08-26 11:39:58 +02:00
Max Kellermann
2052a029ee
decoder/vorbis: use integer seek times
2014-08-26 11:38:39 +02:00
Max Kellermann
c6aafff701
decoder/sndfile: use integer seek times
2014-08-26 11:36:20 +02:00
Max Kellermann
26f0f92210
decoder/opus: use integer seek times
2014-08-26 11:34:56 +02:00
Max Kellermann
bdc4ae2b86
decoder/opus: remove redundant decoder_timestamp() call
...
After seeking, the MPD core automatically refreshes the timestamp, and
thus discards the value from decoder_timestamp().
2014-08-26 11:34:24 +02:00
Max Kellermann
9ca9341384
decoder/mpg123: use integer seek times
2014-08-26 11:31:57 +02:00
Max Kellermann
7f4f8b7c7d
decoder/mpcdec: use integer seek times
2014-08-26 11:31:49 +02:00
Max Kellermann
8870526457
decoder/flac: use integer seek times
2014-08-26 11:30:21 +02:00
Max Kellermann
f057e1e17a
decoder/audiofile: use integer seek times
2014-08-26 11:29:22 +02:00
Max Kellermann
8561c9c5a6
DecoderAPI: add decoder_seek_where_frame()
2014-08-26 11:27:41 +02:00
Max Kellermann
23199719d9
decoder/mp4v2: use integer seek times
2014-08-26 11:20:15 +02:00
Max Kellermann
a606ef0700
decoder/ffmpeg: use integer seek times
2014-08-26 11:15:53 +02:00
Max Kellermann
a234de1ee3
decoder/gme: use integer seek times
2014-08-26 11:15:40 +02:00
Max Kellermann
d266898617
decoder/modplug: use integer seek times
2014-08-26 11:11:36 +02:00
Max Kellermann
69b5929c5a
decoder/mad: use integer seek times
...
Avoid roundtrips to floating point.
2014-08-26 11:07:47 +02:00
Max Kellermann
316c72a4ae
DecoderAPI: add decoder_seek_where_ms()
...
Move to fixed-point integers instead of floating point.
2014-08-26 11:02:02 +02:00
Max Kellermann
9da88eec3e
decoder/mad: move duplicate code to RecoverFrameError()
2014-08-26 10:52:17 +02:00
Max Kellermann
f10d9996d2
decoder/mad: simplify if/else chain
2014-08-26 10:52:17 +02:00
Max Kellermann
58ec9d3a73
decoder/mad: make variables more local
2014-08-26 10:34:04 +02:00
Max Kellermann
4a503ba1ad
decoder/mad: simplify "return", eliminate check
...
This check was redundant, because we could only exit the loop when
ret==DECODE_OK.
2014-08-26 10:30:22 +02:00
Max Kellermann
2d096a569a
output/alsa: fix coding style
2014-08-26 10:25:59 +02:00
Max Kellermann
e44ea5038e
output/alsa: merge Init() into Configure()
2014-08-26 10:22:35 +02:00
Max Kellermann
b111aa0111
ZeroconfAvahi: fix coding style
2014-08-26 10:04:27 +02:00
Max Kellermann
773d24ebf7
ZeroconfAvahi: remove "goto"
2014-08-26 10:03:35 +02:00
Max Kellermann
bd371af0b3
ZeroconfAvahi: remove unused flag "avahi_running"
...
This flag is never read.
2014-08-26 10:02:06 +02:00
Max Kellermann
9d79c72c17
output/alsa: add API documentation
2014-08-26 09:37:30 +02:00
Max Kellermann
a86aaef4d0
output/alsa: support native DSD playback
...
Translate SampleFormat::DSD to SND_PCM_FORMAT_DSD_U8, which was added
to alsa-lib 1.0.27.1.
2014-08-26 07:11:53 +02:00
Max Kellermann
e463244db3
output/alsa: move alsa_configure() into the class
2014-08-26 07:10:16 +02:00
Max Kellermann
9e10b75f55
PcmExport: remove obsolete API documentation
2014-08-26 07:10:16 +02:00
Max Kellermann
294091ce60
output/alsa: remove obsolete macros
2014-08-26 05:53:15 +02:00
Max Kellermann
da6dd2dc92
decoder/mad: don't reset the xing struct
...
Not necessary.
2014-08-25 10:32:40 +02:00
Max Kellermann
40b9de66c7
decoder/mad: remove unused flag "found_xing"
2014-08-25 10:31:55 +02:00
Max Kellermann
aac985951a
decoder/mad: convert enums/macros to constexpr
2014-08-24 21:06:50 +02:00
Max Kellermann
662cc5fe20
decoder/mad: make variables more local
2014-08-24 20:57:47 +02:00
Max Kellermann
42af040fbd
StateFile: configurable interval
2014-08-24 13:24:20 +02:00
Max Kellermann
d383d617c2
StateFile: make "path" const
2014-08-24 13:24:20 +02:00
Max Kellermann
c84508ae9f
Merge branch 'v0.18.x'
2014-08-24 13:20:35 +02:00
Max Kellermann
f06fe1ea98
event/TimeoutMonitor: really reset "active" flag before invoking OnTimeout()
...
The previous commit was broken. D'oh!
2014-08-24 13:19:50 +02:00
Max Kellermann
77f2cd6513
Merge branch 'v0.18.x'
2014-08-24 13:15:17 +02:00
Max Kellermann
d16fb79708
event/TimeoutMonitor: reset "active" flag before invoking OnTimeout()
...
The IsActive() method returned true even if the timer was not active,
after it completed once. This broke the state file timer, and the
state file was not saved periodically.
2014-08-24 13:13:12 +02:00
Max Kellermann
8808aad529
decoder/dsdiff: implement seeking
2014-08-23 15:27:21 +02:00
Max Kellermann
6d7eaba845
decoder/dsdiff: refactor the main decoder loop
...
Check for STOP before decoding the first chunk. This reduces the
command latency.
2014-08-23 15:25:40 +02:00
Max Kellermann
4259b17b91
decoder/dsdiff: add local variable "remaining_bytes"
...
Remember the chunk's total size.
2014-08-23 15:21:08 +02:00
Max Kellermann
828ea700e8
decoder/dsdiff: don't skip remaining bytes
...
Nobody cares.
2014-08-23 15:19:34 +02:00
Max Kellermann
7f22685fa3
decoder/dsdiff: eliminate local variable "buffer_samples"
2014-08-23 15:17:31 +02:00
Max Kellermann
40db9dff3b
decoder/dsdiff: support only one "DSD" chunk
...
Eliminate the loop from dsdiff_stream_decode(). It makes the code
complex, real-world files with multiple DSD chunks are outside of the
specification, and the "chunk_size" variable would be bogus anyway.
2014-08-23 15:14:16 +02:00
Max Kellermann
fa82264604
pcm/PcmDsd: remove "lsbfirst" support
...
Unused. Bit reversing is done in the decoder.
2014-08-23 14:46:34 +02:00
Max Kellermann
ae467aa42e
pcm/dsd2pcm: add license headers
...
Obtained from the Mercurial repository at
https://code.google.com/p/dsd2pcm/
2014-08-23 14:42:23 +02:00
Thomas Klausner
c38f29ce56
system/ByteOrder: <endian.h> is a non-standard header that only Linux provides.
2014-08-23 14:27:44 +02:00
Max Kellermann
67cc09416f
decoder/dsf: implement seeking
2014-08-23 14:00:38 +02:00
Max Kellermann
f2a75fbfc7
decoder/dsf: refactor the main decoder loop
...
Check for STOP before decoding the first chunk. This reduces the
command latency.
2014-08-23 13:57:57 +02:00
Max Kellermann
b1fb09e183
decoder/dsf: make the buffer more local
...
This allows the compiler to discard buffer contents between two
iterations.
2014-08-23 13:55:52 +02:00
Max Kellermann
cd0082c630
decoder/dsf: eliminate pointless return statement
2014-08-23 13:54:07 +02:00
Max Kellermann
f78527d1e3
decoder/dsf: use the block count internally
2014-08-23 13:51:08 +02:00
Max Kellermann
1f642238a7
decoder/dsf: don't skip remaining bytes
...
Nobody cares.
2014-08-23 13:50:36 +02:00
Max Kellermann
6fe06cad98
decoder/dsf: count the blocks, not the remaining bytes
...
Prepare refactoring the whole plugin to use blocks instead of bytes.
A block is the smallest addressable unit, and it will simplify the
seeking code.
2014-08-23 13:44:53 +02:00
Max Kellermann
2335fdbb5a
decoder/dsf: allow channel setups other than stereo
...
This finishes the multi-channel support. Development of the feature
was started with commit 02cc77cd8
2014-08-23 13:40:21 +02:00
Max Kellermann
1b6f7c3eb7
decoder/dsf: eliminate another hard-coded stereo mode assumption
...
When calculating the upper bound using the "sample count" format
header, don't assume it's stereo.
2014-08-23 13:39:00 +02:00
Max Kellermann
67f0d26d17
decoder/dsf: fix big-endian bugs
2014-08-23 13:35:29 +02:00
Max Kellermann
8574bcd494
decoder/dsf: compare with InputStream::GetRest() instead of ..GetSize()
2014-08-23 13:26:17 +02:00
Max Kellermann
02cc77cd82
decoder/dsf: fix multi-channel files
...
The plugin was horribly bugged for files that were not stereo.
2014-08-22 07:30:32 +02:00
Max Kellermann
d8782ce5fd
decoder/dsf: simplify dsf_to_pcm_order()
...
Don't pass the buffer size to the function, as it's known at compile
time. Use "restrict" on the pointer arguments, and merge the two
loops, which allows the compiler to optimize this loop with a few SSE2
instructions.
2014-08-22 06:58:08 +02:00
Max Kellermann
dedc2986c6
decoder/dsf: fix noise at end of malformed file
...
Read one block at a time. This discards the last partial block, which
cannot be interleaved anyway. Previously, uninitialised memory was
used to interleave the last block, which generated some noise.
2014-08-21 17:46:25 +02:00
Max Kellermann
74cdc0005a
decoder/dsf: eliminate temporary buffer
...
Convert into a second buffer that gets passed to decoder_data()
without copying back to the first buffer.
2014-08-21 17:15:29 +02:00
Max Kellermann
a756cd9565
decoder/dsf: add constant DSF_BLOCK_SIZE
2014-08-21 17:12:43 +02:00
Max Kellermann
ae27c3f4c5
decoder/dsf: use size_t loop variables when the limit is a size_t
2014-08-21 17:09:49 +02:00
Max Kellermann
6d41f36266
decoder/dsf: use memcpy()
2014-08-21 13:09:14 +02:00
Max Kellermann
57cbcdf2ec
decoder/dsf: make the "scratch" buffer local
...
This allows the compiler to discard buffer contents between two
function calls.
2014-08-21 13:05:35 +02:00
Max Kellermann
455fd180b1
Merge branch 'v0.18.x'
2014-08-21 12:52:27 +02:00
Max Kellermann
78abcd7df7
decoer/dsdiff: fix endless loop on malformed file
...
Same bug as in the previous commit.
2014-08-21 12:48:03 +02:00
Max Kellermann
23dce21647
decoer/dsf: fix endless loop on malformed file
...
When the data chunk size is not a multiple of the frame size, the last
partial frame lead to an endless loop. We fix this by checking
chunk_sze>=frame instead of chunk_sze>0. This way, the partial frame
is simply skipped.
2014-08-21 12:37:22 +02:00
Max Kellermann
e6177c3349
decoder/dsf: remove unused attribute "id3_size"
2014-08-20 09:46:42 +02:00
Max Kellermann
e2adb82e29
decoder/DsdLib: use offset_type instead of uint64_t
2014-08-19 22:39:44 +02:00
Max Kellermann
bb472206de
InputStream: move typedef offset_type to Offset.hxx
...
Reduce header dependencies.
2014-08-19 22:29:52 +02:00
Max Kellermann
d87cf5146e
InputStream: CheapSeeking() returns false only for HTTP
...
Seeking on NFS or SMB is cheap. Actually, only HTTP streams are
expensive to seek. This enables a few features on NFS/SMB files, for
example Ogg tags.
2014-08-19 21:39:12 +02:00
Max Kellermann
87eb5cbced
InputStream: move code to ExpensiveSeeking()
2014-08-19 21:38:18 +02:00
Max Kellermann
181edf4b53
InputStream: make offset_type unsigned
2014-08-19 21:23:03 +02:00
Max Kellermann
dfa53cb88e
InputPlugin: remove typedef offset_type
...
Has been moved to class InputStream long ago.
2014-08-19 21:22:23 +02:00
Max Kellermann
d079cda174
InputStream: allow GetSize() only if KnownSize()
2014-08-19 21:02:00 +02:00
Max Kellermann
4265e71d6f
InputStream: add constant UNKNOWN_SIZE
2014-08-19 21:00:50 +02:00
Max Kellermann
f66a72c66b
input/proxy: use KnownSize()
2014-08-19 21:00:32 +02:00
Max Kellermann
9be90bd1c9
decoder/wavpack: add local reference variables
2014-08-19 20:58:08 +02:00
Max Kellermann
106e535577
decoder/sndfile: check InputStream::KnownSize()
2014-08-19 20:57:25 +02:00
Max Kellermann
194be51f05
decoder/pcm: check InputStream::KnownSize()
2014-08-19 20:57:00 +02:00
Max Kellermann
a862e363ea
decoder/mpcdec: check InputStream::KnownSize()
2014-08-19 20:55:51 +02:00
Max Kellermann
2e64afca27
decoder/modplug: check InputStream::KnownSize()
2014-08-19 20:53:02 +02:00
Max Kellermann
51cda0be2a
decoder/mad: check InputStream::KnownSize()
2014-08-19 20:44:29 +02:00
Max Kellermann
4da3291157
decoder/ffmpeg: check InputStream::KnownSize()
2014-08-19 20:44:29 +02:00
Max Kellermann
52edabf2cb
decoder/faad: remove unnecessary cast to size_t
2014-08-19 20:44:29 +02:00
Max Kellermann
43a1a0f3ab
decoder/faad: remove size!=0 check
...
Since we already checked InputStream::KnownSize(), we can assume that
GetSize() returns a valid value, and this check is obsolete.
2014-08-19 20:44:29 +02:00
Max Kellermann
e88524f274
decoder/faad: check InputStream::KnownSize()
...
Replace the bogus GetSize() check and call GetSize() only when
necessary.
2014-08-19 20:44:29 +02:00
Max Kellermann
7a929fcd27
decoder/faad: call GetSize() only when needed
2014-08-19 20:44:29 +02:00
Max Kellermann
7087fdf6c0
decoder/DsdLib: make variables more local
2014-08-19 20:44:29 +02:00
Max Kellermann
67093a5143
decoder/DsdLib: use fixed-length ID3 buffer
...
Variable-length arrays are not allowed in C++.
2014-08-19 20:42:40 +02:00
Max Kellermann
3f34016888
decoder/DsdLib: check InputStream::KnownSize()
2014-08-19 20:24:33 +02:00
Max Kellermann
1307633a84
decoder/dsf: check InputStream::KnownSize()
2014-08-19 20:24:09 +02:00
Max Kellermann
1a53f07d80
decoder/dsf: remove unnecessary ID3 offset check
...
If the offset is out of range, the seek will simply fail. Not a
problem.
2014-08-19 20:23:36 +02:00
Max Kellermann
672f678ed6
InputStream: use KnownSize() in assertion
2014-08-19 11:59:19 +02:00
Max Kellermann
b924568f79
decoder/audiofile: check InputStream::KnownSize()
...
The plugin assumes that the size is known, but does not verify it at
runtime.
2014-08-19 11:58:15 +02:00
Max Kellermann
e6e9c21275
input/ffmpeg: use av_strerror()
...
Generate more detailed error messages.
2014-08-18 20:35:34 +02:00
Max Kellermann
636f5d4a1d
{input,decoder}/ffmpeg: move ffmpeg_domain to lib/ffmpeg/Domain.cxx
...
Eliminate duplicate definition (in input plugin and decoder plugin).
2014-08-18 10:12:37 +02:00
Max Kellermann
41a4b280ee
input/ffmpeg: update offset after seeking
2014-08-18 09:52:53 +02:00
Max Kellermann
27139bf41f
input/ffmpeg: refactor error code path
2014-08-18 09:52:25 +02:00
Max Kellermann
12ba1957d0
input/ffmpeg: use "auto"
2014-08-18 09:47:28 +02:00
Jurgen Kramer
9b9d189a33
decoder/dsf: Allow up to DSD512. Enable DSD rates based on Fs=48kHz
2014-08-16 18:40:53 +02:00
Jurgen Kramer
7c3af4f56f
Report bitrate for DSF and DSDIFF DSD decoders
2014-08-16 18:38:44 +02:00
Max Kellermann
880ce080b7
decoder/dsf: fix indent
2014-08-16 18:38:15 +02:00
Max Kellermann
6e84a03a35
PlayerThread: rename player_create() to StartPlayerThread()
2014-08-16 10:33:19 +02:00
Max Kellermann
a9f6556454
Merge branch 'v0.18.x'
2014-08-16 08:25:10 +02:00
Max Kellermann
2722211ba3
pcm/SoxrResampler: add missing string.h include
2014-08-16 08:25:06 +02:00
François Revol
e2e5cddcaa
icu: include strings.h for strcasecmp
...
Again, POSIX says strcasecmp is not in string.h.
2014-08-16 07:53:08 +02:00
François Revol
40280fa6cf
util: Fix header for strcasecmp
...
According to POSIX and both OSX and Linux manpages,
strcasecmp comes from strings.h, not string.h.
Most OSes also have them available in string.h,
but we just fixed the headers on Haiku and it now
only provides them in strings.h.
We might want to fall back to string.h for other
OSes though...
cf.
http://pubs.opengroup.org/onlinepubs/009695399/functions/strcasecmp.html
http://linux.die.net/man/3/strcasecmp
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/strcasecmp.3.html
2014-08-16 06:51:13 +02:00
Max Kellermann
8b7718fbdc
encoder/shine: require libshine 3.1, adapt to new API
...
The "written" argument to shine_encode_buffer() and shine_flush() was
changed from "long" to "int", which breaks API and ABI compatibility.
This is a big deal, and it doesn't seem worthwile to keep support for
the (broken) 3.0 release.
2014-08-13 18:49:44 +02:00
Max Kellermann
fe9299ceff
decoder/ffmpeg: use avcodec_descriptor_get() to determine codec name
...
In version 11, both ffmpeg and libav deprecate
AVCodecContext::codec_name. The function avcodec_descriptor_get() has
been introduced long ago.
2014-08-13 18:40:39 +02:00
Max Kellermann
b44957ad91
PcmExport: add missing <iterator> include
...
For the range-based loop on a ConstBuffer object.
2014-08-13 13:00:37 +02:00
Max Kellermann
069895d26b
PcmDsdUsb: use class ConstBuffer
2014-08-12 22:21:24 +02:00
Max Kellermann
0e756e4377
PcmExport: use class ConstBuffer
2014-08-12 22:19:53 +02:00
Max Kellermann
7244dc4511
Filter: FilterPCM() returns ConstBuffer
...
API simplification. We can now avoid abusing a "size_t*" as
additional return value.
2014-08-12 16:40:51 +02:00
Max Kellermann
56f61a6d59
PcmConvert: Convert() returns ConstBuffer
2014-08-12 16:36:07 +02:00
Max Kellermann
4d5f610029
Filter: update API documentation
2014-08-12 16:05:37 +02:00
Max Kellermann
c94b4466d5
MusicChunk: rename struct to MusicChunk
2014-08-12 15:56:41 +02:00
Max Kellermann
61f9e79ec9
MusicChunk: update API documentation
2014-08-12 15:56:11 +02:00
Max Kellermann
cf797657ed
AllCommands: close connection after syntax error
...
Stop HTTP clients from exploiting MPD via forged POST requests.
2014-08-12 15:33:45 +02:00
Max Kellermann
c597538b40
util/HugeAllocator: implement on Windows
2014-08-11 23:06:45 +02:00
Max Kellermann
43f964e28d
db/simple: check for I/O errors in Load()
2014-08-11 22:54:46 +02:00
Max Kellermann
8283f23651
fs/io/TextFile: add method Check()
2014-08-11 22:53:48 +02:00
Max Kellermann
7cc25f91ff
fs/io/Reader: add "nonnull" attribute
2014-08-11 22:49:08 +02:00
Max Kellermann
5d2506e697
SongFilter: new filter "modified-since"
2014-08-11 22:38:58 +02:00
Max Kellermann
2e122e1509
db/simple: compress the database file using gzip
2014-08-11 21:48:25 +02:00
Max Kellermann
486b5b6bfc
fs/io/TextFile: use AutoGunzipReader
...
Several MPD subsystems can now read gzipped files; for example, the
database file can be gzipped.
2014-08-11 21:48:25 +02:00
Max Kellermann
88a2f128ec
fs/io/AutoGunzipReader: new class
2014-08-11 21:48:25 +02:00
Max Kellermann
45c139cfb3
fs/io/PeekReader: new utility class
2014-08-11 21:48:25 +02:00
Max Kellermann
3a111e5d74
fs/io/GzipOutputStream,GunzipReader: move zlib_domain to src/lib/zlib/Domain.cxx
2014-08-11 21:48:25 +02:00
Max Kellermann
2ccfb71d12
util/CharUtil: add ToLowerASCII()
2014-08-11 18:42:05 +02:00
Max Kellermann
e8a5a9b1e8
Merge branch 'mp4v2' of github.com:ekroth/mpd
2014-08-09 00:10:04 +02:00
Andrée Ekroth
ec3568bd97
decoder/Mp4v2: fix crash with undefined error
...
When no track is found the error is now properly set.
Previously the calling function tried to log an undefined
error, which resulted in a crash. MPD falls back to
ffmpeg for unsupported tracks, such as ALAC.
This should fix issue 4051.
2014-08-08 23:24:26 +02:00
Max Kellermann
a67a881715
input/GunzipInputStream: new class
2014-08-08 20:11:29 +02:00
Max Kellermann
7a048f004d
Merge branch 'id-3919' of git://github.com/ekroth/mpd
2014-08-07 22:52:46 +02:00
Andrée Ekroth
330b6a0482
decoder/Mp4v2: add MP4v2 decoder plugin
...
This plugin uses the MP4v2 library to play mp4/m4a files.
It is limited to file_decode.
2014-08-07 21:01:38 +02:00
Max Kellermann
aa2e4d92e0
fs/io/BufferedReader: new class to replace class TextFile
...
The new class is pluggable, to prepare for gzipped database files.
For now, the TextFile class remains, and will be refactored away
later.
2014-08-07 19:38:25 +02:00
Max Kellermann
0ea66a1275
fs/io/Reader: new interface
2014-08-07 19:38:25 +02:00
Max Kellermann
aafff8fd5c
fs/output, fs/TextFile: move to fs/io/
2014-08-07 19:38:25 +02:00
Max Kellermann
5ac2a69940
input/TextInputStream: move ReadBufferedLine() to util/TextFile.hxx
2014-08-07 19:38:25 +02:00
Max Kellermann
e88dd9b08b
util/DynamicFifoBuffer: make GetCapacity() and Clear() public
2014-08-07 19:21:09 +02:00
Max Kellermann
bbea6564fc
fs/output/FileOutputStream: use open_cloexec()
...
Support operating systems that don't have O_CLOEXEC.
2014-08-07 18:16:11 +02:00
Max Kellermann
1ca8d7ad45
TextInputStream: don't strip
...
Let the caller decide whether to strip. Only remove \n and \r
(end-of-line markers).
2014-08-07 16:45:43 +02:00
Max Kellermann
67958f7fa7
util/{Static,Foreign}FifoBuffer: lazy shift
...
Reduce the number of unnecessary memmove() calls.
2014-08-07 16:11:00 +02:00
Max Kellermann
ab9c527274
util/StaticFifoBuffer: fix indent
2014-08-07 16:08:55 +02:00
Max Kellermann
36ff991960
TextInputStream: move code to ReadBufferedLine()
...
Look at the buffer first, before trying to read from the file. This
reduces overhead because we don't refill the buffer after every line.
2014-08-07 16:08:02 +02:00
Max Kellermann
59d38f876a
util/StringUtil: add StripRight() overload with "end" argument
2014-08-07 16:08:02 +02:00
Max Kellermann
5c5c6a965c
LogBackend: use StripRight()
...
Eliminate duplicate code.
2014-08-07 16:08:02 +02:00
Max Kellermann
74aafe6a10
util/StringUtil: use IsWhitespaceOrNull() in StripRight()
...
The null byte is whitespace, too.
2014-08-07 16:08:02 +02:00
Max Kellermann
f860a2fbd6
util/StringUtil: move code to StripRight()
2014-08-07 16:08:02 +02:00
Max Kellermann
87bcf739ee
util/StringUtil: rename strchug_fast() to StripLeft()
2014-08-07 16:08:02 +02:00
Max Kellermann
db6db51742
util/CharUtil: add IsWhitespaceFast()
2014-08-07 16:08:02 +02:00
Max Kellermann
981be7956b
util/CharUtil: make IsWhitespace*() "constexpr"
2014-08-07 16:08:02 +02:00
Max Kellermann
8c10aa575c
util/CharUtil: fix indent
2014-08-07 16:08:02 +02:00
Max Kellermann
17b316b94b
fs/StandardDirectory: pass writable string to ParseConfigLine()
...
Eliminate the std::string overhead.
2014-08-07 16:07:52 +02:00
Max Kellermann
8921b4f9d1
event/BufferedSocket: fix inversed buffer check
...
This was broken by commit 84d20d9e
, which deleted the "!" from the
check.
2014-08-07 16:07:48 +02:00
Max Kellermann
c3f111a56c
event/BufferedSocket: fix inversed buffer check
...
This was broken by commit 84d20d9e
, which deleted the "!" from the
check.
2014-08-07 16:03:44 +02:00
Max Kellermann
cf16d81fa4
util/ForeignFifoBuffer: add method Swap()
2014-08-07 09:02:24 +02:00
Max Kellermann
2beb763b4f
util/ForeignFifoBuffer: add method MoveFrom()
2014-08-07 08:53:02 +02:00
Max Kellermann
69ae879c58
input/TextInputStream: return char*
...
Revert to the old API before commit e9e55b08
, removing unnecessary
bloat.
2014-08-07 00:06:02 +02:00
Max Kellermann
08fee9a284
util/ForeignFifoBuffer: add method GetAvailable()
2014-08-06 22:55:59 +02:00
Max Kellermann
f89da17827
util/DynamicFifoBuffer: move code to new base class ForeignFifoBuffer
2014-08-06 17:39:07 +02:00
Max Kellermann
ea26da0be7
util/FifoBuffer: rename to StaticFifoBuffer
2014-08-06 17:29:05 +02:00
Max Kellermann
1f3d3970f6
db/update/InotifySource: remove FifoBuffer
...
Eliminate support for partial reads. The Linux kernel will never
return partial results, so this buffering was unnecessary.
2014-08-06 17:20:03 +02:00
Max Kellermann
c9a71a7176
fs/GzipOutputStream: new class wrapping zlib
2014-08-06 16:35:10 +02:00
Max Kellermann
14c538c9c7
Win32Main: move to win32/
2014-08-02 08:48:30 +02:00
Max Kellermann
9fb351a139
*Save, *State: use the OutputStream API instead of FILE*
2014-07-30 22:17:01 +02:00
Max Kellermann
0d0ccacdf3
fs/OutputStream: new infrastructure for writing to files
2014-07-30 22:12:02 +02:00
Max Kellermann
c8858f85d8
util/Error: add method FormatLastError()
2014-07-30 22:10:31 +02:00
Max Kellermann
d1bc46ffad
util/Error: add SetLastError() overload with "DWORD code" parameter
2014-07-30 22:08:26 +02:00
Max Kellermann
32e5848f34
util/Error: add "printf" attributes
2014-07-30 22:02:46 +02:00
Max Kellermann
be36c0769a
TagId3: fix printf string parameter
2014-07-30 22:02:46 +02:00
Max Kellermann
f9e63dfd65
util/DynamicFifoBuffer: fix typo in API documentation
2014-07-30 20:53:09 +02:00
Max Kellermann
fa05dac5ae
StateFile: use nullptr instead of NULL
2014-07-30 18:45:14 +02:00
Max Kellermann
430dd3ae05
encoder/opus: use nullptr instead of NULL
2014-07-30 18:45:00 +02:00
Max Kellermann
664fc76ac7
system/Resolver: use nullptr instead of NULL
2014-07-30 18:44:40 +02:00
Max Kellermann
37d6cc07a7
pcm: use nullptr instead of NULL
2014-07-30 18:44:20 +02:00
Max Kellermann
d79b6cd8dc
playlist/extm3u: use nullptr instead of NULL
2014-07-30 18:44:03 +02:00
Max Kellermann
82ecebb393
Main: don't require mpd.conf on Android
...
Don't fail to start if mpd.conf does not exist; just use default
values.
2014-07-30 10:22:22 +02:00
Max Kellermann
12b5494906
db/proxy: implement Update()
2014-07-29 23:35:09 +02:00
Max Kellermann
aa0f06d6b7
db/Interface: add virtual method Update()
...
For database plugins that don't use the UpdateService.
2014-07-29 23:31:27 +02:00
Max Kellermann
0c47685e02
OtherCommands: split handle_update()
2014-07-29 23:29:57 +02:00
Max Kellermann
d8558a3af3
util/Cast: add "const" overload
2014-07-14 17:08:57 +02:00
Max Kellermann
72eedb1c98
util/Cast: add missing include
2014-07-14 17:08:41 +02:00
Max Kellermann
3c5cf9500d
util/Cast: fix indent
2014-07-14 16:44:43 +02:00
Max Kellermann
7a1f3177c9
util/Cast: reimplement as template without macro
2014-07-14 16:24:07 +02:00
Max Kellermann
f8da8b0261
util/Cast: add const overloads
2014-07-14 16:02:02 +02:00
Max Kellermann
393cb7fd7d
util/Cast: suppress "unused function" warning by using "inline"
2014-07-14 15:58:12 +02:00
Max Kellermann
e74e1256d4
util/Cast: fix indent
2014-07-14 15:57:48 +02:00
Max Kellermann
96abd70c13
decoder/dsdiff: move artist/title/id3 offsets out of DsdiffMetaData
...
They are only used inside dsdiff_read_metadata_extra().
2014-07-12 20:51:25 +02:00
Max Kellermann
1f9d9c3176
Merge branch 'v0.18.x'
2014-07-12 20:51:22 +02:00
Max Kellermann
94efeb2845
decoder/dsdiff: simplify dsdlib_skip() call
2014-07-12 20:51:00 +02:00
Max Kellermann
a73834436f
decoder/dsdiff: simplify loop condition, merge branches
2014-07-12 20:46:24 +02:00
Max Kellermann
85f4aeca05
decoder/dsdiff: ignore garbage null byte at end of file
...
Failure to read another chunk header is not fatal. Continue to read
metadata.
2014-07-12 20:41:26 +02:00
Max Kellermann
7db84a961a
decoder/dsdiff: fix metadata parser bug (uninitialized variables)
2014-07-12 20:41:26 +02:00
Max Kellermann
74e95e88d8
PlaylistSong: always merge tags and LastModified
2014-07-12 19:41:04 +02:00
Max Kellermann
80d9baa9e8
QueueSave: use the long format to save partial songs
...
Previously, only streams were saved with range and tags, but this is
necessary for all "partial" songs (e.g. CUE tracks).
2014-07-12 19:36:39 +02:00
Max Kellermann
751995ab95
QueueCommands: new command "rangeid"
...
Manipulates the playback range of a queued song.
2014-07-12 18:55:41 +02:00
Max Kellermann
5ca6e2910a
PlaylistSong, CueParser: don't override Tag::time
...
Now that Song::GetDuration() is used (which considers start_ms and
end_ms), we don't need to override the Tag's duration value.
2014-07-12 18:54:20 +02:00
Max Kellermann
071d05465a
SongPrint: use DetachedSong::GetDuration()
...
Fixes the bogus duration of the last track in a CUE sheet.
2014-07-12 18:41:15 +02:00
Max Kellermann
11a9536271
TagPrint: split tag_print()
...
Add one method that prints only the tag values, but not the song
duration.
2014-07-12 17:42:38 +02:00
Max Kellermann
41a7203c28
Tag: add class const_iterator and methods begin(), end()
...
Enables using range-based "for".
2014-07-12 17:22:39 +02:00
Max Kellermann
543a58bb87
DecoderBuffer: implement _skip() using decoder_skip()
2014-07-12 02:26:38 +02:00
Max Kellermann
b2b95cad20
DecoderBuffer: add method _need()
...
Move code from the FAAD decoder plugin.
2014-07-12 02:23:48 +02:00
Max Kellermann
eabec967ec
DecoderBuffer: remove unused method _is_full()
2014-07-12 02:23:36 +02:00
Max Kellermann
e42b152037
decoder/faad: eliminate the adts_find_frame() loop
...
This loop is completely unnecessary. We just need to find the first
ADTS frame and feed it into NeAACDecInit().
2014-07-12 01:51:39 +02:00
Max Kellermann
da599e3f1a
decoder/faad: split faad_stream_decode()
...
Eliminate duplicate cleanup code.
2014-07-12 01:47:07 +02:00
Max Kellermann
4c7b0b935b
DecoderBuffer: remove unused method _is_empty()
2014-07-12 01:28:37 +02:00
Max Kellermann
c400876df1
Merge branch 'v0.18.x'
2014-07-12 01:27:18 +02:00
Max Kellermann
a960e2ef48
decoder/faad: estimate song duration for remote files
...
Previously, MPD tried to slurp the whole song file, count the number
of frames and calculate the song duration from that. That however is
extremely expensive for remote files, and will delay playback for a
long time. Workaround: check only the first 128 frames and try to
extrapolate from here. Fixes Mantis ticket 0004035.
2014-07-12 00:37:00 +02:00
Max Kellermann
4fe272a7fb
DecoderBuffer: add method _available()
2014-07-12 00:35:32 +02:00
Max Kellermann
a7d9f248ea
DecoderBuffer: add method _get_stream()
2014-07-12 00:23:22 +02:00
Max Kellermann
06aa689383
decoder/faad: bail out early if sample rate is invalid
2014-07-12 00:23:11 +02:00
Max Kellermann
835b0c44cd
decoder/faad: use adts_check_frame() in faad_song_duration()
...
Eliminate more duplicate code.
2014-07-12 00:18:02 +02:00
Max Kellermann
54b6f8a4ae
decoder/faad: test "seekable" after ADTS frame check
...
Don't bother to check for ADIF just because the stream is not
seekable.
2014-07-12 00:17:51 +02:00
Max Kellermann
18787ebe8f
decoder/faad: move code to faad_decoder_new()
...
Merge some duplicate code.
2014-07-12 00:17:43 +02:00
Max Kellermann
47e8fcf37e
decoder/faad: remove unnecessary read
...
Eliminate some overhead when the caller doesn't need the buffer.
2014-07-12 00:17:30 +02:00
Max Kellermann
5958b78459
DecoderBuffer: add "pure" attributes
2014-07-12 00:16:41 +02:00
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
Max Kellermann
542e7feba8
input/rewind: include cleanup
2014-05-21 18:47:22 +02:00
Max Kellermann
dc085e0bd2
input/rewind: work around assertion failure
...
Caused by commit 0b4fa41a
2014-05-21 18:47:12 +02:00
Max Kellermann
7c9517343c
ThreadInputStream: include cleanup
2014-05-12 19:04:32 +02:00
Max Kellermann
0b4fa41aff
InputStream: "protect" attributes
2014-05-12 18:59:46 +02:00
Max Kellermann
e138e2c880
input/cdio: convert to class
2014-05-12 18:59:25 +02:00
Max Kellermann
0d6345e98b
input/cdio: move initialization code to constructor
...
Make attributes const, don't allow partial initialization.
Instantiate the CdioParanoiaInputStream object at the end of
input_cdio_open().
2014-05-12 18:54:05 +02:00
Max Kellermann
a84bcf597d
input/cdio: handle cdio_open() failure
2014-05-12 18:53:47 +02:00
Max Kellermann
4bbd4ba855
input/cdio: initialize lsn_relofs in constructor
2014-05-12 18:48:16 +02:00
Max Kellermann
9e5b56b475
input/cdio: initialize attribute "buffer_lsn"
2014-05-12 18:47:27 +02:00
Max Kellermann
dd383037fd
input/cdio: remove unused attribute "trackno"
2014-05-12 18:41:45 +02:00
Max Kellermann
3cd24c0a51
release v0.18.11
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJTcPbuAAoJECNuiljG20US+LsQAI5LcUiQ2AxfDdXfEkIW+ryQ
U5htp4RAAizVFEAdgzdDOoHBVefkvwij6G9ND9WAbJRsUOZs62XwlnOFaB/uQPhd
VvoNIQLmuUNxltF1itaCTJ0UJkXi6ObVExpwMScGI242uUmoNnxwsWxDxyy2s4bn
On/OwT64zTOsPTjkYGdfGncwx4dhQc2KJvGGD6y/lMhxUnn3NoKG/VOgleN4ALcL
KQ0SFQOFbUHJcvMXYdMzhe426d7GiHzFVIfdU16yJz47/xHDmaM+VVJQCOF68rrw
kyb2POxR4VXhPMfIleF2RiCopvDGSvQfUE3jhQjKBgZE2NeFeI/5N6JcWbZgFJ/J
4ez3DcjSD1Oeoz6gzaq1QybCku4EZTvPa6Kbb5/84JNKmVdb/JowGF0L18bwTbGv
y5D5HN3zTdmBXwsiDnTNDtuwaSejvIDTN1k4AkdQ9mLMIMT+13NHLBs1rDE2JnlG
3xhXrIvwhUBdE1A4uFj8duzk11EWzNI+ltJBRnG8uEzAJxpv5Khiwmj2GciS6s5r
wp1YUIUA0BhrEgrtoTdE7x13lXkDrmydcJ5kA0kArJFQALliE7kivyg1gtrcNRj1
7fDRAb9QOxaJrrsJzM9f9pDaIttHRjRvurFtikD90oaRE1g+6ygeScmYJDPhPjvU
R6PxzvsMCn8kJFWq2ARg
=Ubmu
-----END PGP SIGNATURE-----
Merge tag 'v0.18.11'
2014-05-12 18:38:45 +02:00
Max Kellermann
41507d8129
icu/Collate: use u_strFoldCase() instead of ucol_getSortKey()
...
Turns out ucol_getSortKey() does not what I thought it does.
2014-05-12 14:43:30 +02:00
Max Kellermann
317a98a5a9
icu/Collate: UCharFromUTF8() returns WritableBuffer<UChar>
2014-05-12 14:39:40 +02:00
Max Kellermann
1395794923
icu/Collate: initialize error_code
...
Fixes the broken "search" command.
2014-05-12 14:13:09 +02:00
Max Kellermann
073e9d06ec
mixer/software: keep attribute "volume" in the 0..100 range
...
The attribute must be 0..100 and not 0..1024. Previously, the code
was inconsistent.
2014-05-12 12:46:14 +02:00
Max Kellermann
fd1b04932a
InputStream: remove attribute "plugin"
2014-05-11 18:25:55 +02:00
Max Kellermann
d4b625b48e
InputStream: make various methods abstract
...
Replace InputPlugin attributes.
2014-05-11 17:14:49 +02:00
Max Kellermann
82337dec44
InputStream: add virtual destructor
...
Replaces the method Close().
2014-05-11 17:12:50 +02:00
Max Kellermann
f1d0700252
input/plugins: make InputStream the base class
...
Prepare for adding virtual methods.
2014-05-11 17:12:50 +02:00
Max Kellermann
e1383a2d8e
input/rewind: convert to class
2014-05-11 17:12:50 +02:00
Max Kellermann
6773adc771
InputStream: convert to class
2014-05-11 15:34:48 +02:00
Max Kellermann
0adcda387a
PlaylistCommands: remove redundant playlist_load_spl() call
...
This case is handled already by playlist_open_in_playlist_dir() (via
playlist_mapper_open()). And the call didn't work anyway.
2014-05-10 19:02:33 +02:00
Max Kellermann
fc1664d9fc
PlaylistMapper: use map_spl_utf8_to_fs()
...
Eliminates some overhead and some duplicate code, and fixes a serious
bug: the old code did not append the ".m3u" suffix, and thus the
"load" command was completely broken for stored playlists. D'oh!
2014-05-10 19:00:46 +02:00
Max Kellermann
70bd35abe2
decoder/OggUtil: allow skipping up to 32 kB after seek
...
Fixes missing song length on high-latency Opus files.
According to tests with 320 kbit/s opus files with 60ms packets, we
need to skip up to 29 kB.
2014-04-29 11:56:05 +02:00
Max Kellermann
bc2a1160b8
db/Count: implement grouping
2014-04-27 22:27:43 +02:00
Max Kellermann
75542e8f5d
db/Count: add constructor
2014-04-27 22:27:28 +02:00
Max Kellermann
fcb55f841a
DatabasePrint: move PrintSongCount() to Count.cxx
2014-04-26 22:59:21 +02:00
Max Kellermann
0efb67b51e
DeferredMonitor: fix race condition when using GLib event loop
...
Turns out the lock-free code using atomics was not thread-safe. The
given callback could be invoked by GLib before the source_id attribute
was assigned. This commit changes the DeferredMonitor class to use a
Mutex to block the event loop until source_id is assigned. This bug
does not exist in the 0.19 branch because it does not use the GLib
main loop anymore.
2014-04-26 22:11:23 +02:00
Max Kellermann
154e601f4e
db/Helpers: split library
2014-04-25 18:39:21 +02:00
Max Kellermann
4cca75b2e1
DatabasePrint: refactor variable/function names
2014-04-25 18:36:07 +02:00
Max Kellermann
6d616e55ae
LogInit: fix file descriptor leak in SIGHUP handler
2014-04-25 12:31:06 +02:00
Max Kellermann
95b1a640b6
DatabaseCommands: disallow "grouping" by the selected tag
...
Fixes assertion failure.
2014-04-25 11:28:17 +02:00
Max Kellermann
ecc12c9ba1
db/Helpers: move code to tag/Set.cxx
2014-04-24 18:32:23 +02:00
Max Kellermann
9e50993c13
db/Helpers: move TagSet to dedicated header
2014-04-24 18:18:26 +02:00
Max Kellermann
b32ec857b1
db/Helpers: use set::emplace()
2014-04-24 18:17:07 +02:00
Max Kellermann
0de42d56fc
DatabasePrint: eliminate printAllIn(), printInfoForAllIn()
2014-04-24 18:09:39 +02:00
Max Kellermann
6378ad69bb
DatabasePrint: merge adjacent client_printf() calls
2014-04-24 18:07:12 +02:00
Max Kellermann
9616e9bf3b
DatabasePrint: pass const SearchStats reference
2014-04-24 18:06:46 +02:00
Max Kellermann
7c8b73bffb
DatabasePrint: use unsigned counts
2014-04-24 18:06:26 +02:00
Max Kellermann
ae178c77bd
DatabaseCommands: "list" allows grouping
2014-04-24 11:38:49 +02:00
Max Kellermann
2220651253
TagBuilder: add method AddEmptyItem()
2014-04-24 11:38:48 +02:00
Max Kellermann
7fdd801479
DatabaseCommands: simplify the handle_list() argument parser
2014-04-24 11:38:48 +02:00
Max Kellermann
27002ad1ea
db/Helpers: "list" on album artist falls back to the artist tag
2014-04-24 10:48:52 +02:00
Max Kellermann
986dd2fac1
db/Helpers: move code to CheckUniqueTag()
2014-04-24 10:47:53 +02:00
Max Kellermann
3965b490a9
db/Helpers: use reference instead of pointer
2014-04-24 10:31:19 +02:00
Max Kellermann
b999e16406
SongFilter: convert argv to ConstBuffer
2014-04-24 09:59:59 +02:00
Max Kellermann
7fb9bebd46
util/{Const,Writable}Buffer: add front(), back(), pop_{front,back}(), shift()
2014-04-24 09:50:19 +02:00
Max Kellermann
3b8a9dd6ec
util/{Const,Writable}Buffer: add typedef reference_type
2014-04-24 09:47:59 +02:00
Max Kellermann
c9aec3e866
DatabaseCommands: fix crash on "list base"
...
The string "base" is understood by locate_parse_type(), but not by
listAllUniqueTags(). The special tag type LOCATE_TAG_BASE_TYPE causes
a crash in PrintUniqueTag().
2014-04-24 08:19:08 +02:00
Max Kellermann
1d1f8be260
DatabasePrint: convert "type" to unsigned
2014-04-24 08:18:41 +02:00
Max Kellermann
38e6c0ad3f
DatabaseCommands: clarify compatibility comment
2014-04-24 08:11:06 +02:00
Max Kellermann
7ecf4ad54d
input/nfs: add missing string.h include
...
For strrchr(). Fixes build failure.
2014-04-23 12:53:19 +02:00
Max Kellermann
1c02b4b9f4
release v0.18.10
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJTRoKFAAoJECNuiljG20UScmgP/3bXQLBVqnGdMEzJio9qfTqz
inqbuaR8FrOSQFT5ULpYYipcjiqxCpG2ooE2M083F3wXDHF8u+j0S84NEvHQjv0T
WvA5EOOeEJS0o0gREZb8onO8NVwH+f1r4x34PAc4QbSeROiAiJRPmfTOZBDTaQkZ
Fy4CGte9UqLvUG10Jxpn1DgcBBeoge9Ruzm+drBLHh53lAfKZH6z9u23htNc4PH0
WMN3/orL7KZNxMtX37zqQDhkbPv2RjCWc0JJ8yxBzw3r/qG53GkmCBsStub6wKIi
iPgkoKXii+FAlg1oRmvVNELmOUDjhnBj8+g7q6WgJGpYqdcSCQBRIBnPPRn6Tfw3
wS7MtGoH7M4yihOfeburIzN0JiD4dtcnA7CrA9ghWt3C0Hci9Q/eni7xHgAuJ7Gp
fD0aEGeaQiQZC8r1UYkgvPuc+CXpsjPcpoN2TlYwDJ3VPQcikHVqTUkJxf5rEGbL
h5K0jhW/TzgT0quozd50w52X/n5J76X8oEng08271OPMlF+6gawGA2/AeDsomRTp
n8OPVutpyaGE3gKGYLGKj3cEnP15tQyt3U0kiU+ccG7osEPXr8JU/A4fipqcrwnN
lwejiIKzfZBU68kwS+gtQLiBncT3oh5tEiLJNzYYpPCF0wkDYt2u/rhRxnVjRoXO
5B9PRaOPuJ5N+6O2hGNS
=qsUE
-----END PGP SIGNATURE-----
Merge tag 'release-0.18.10'
2014-04-10 13:49:20 +02:00
Marcello Desantis
95ac6071b9
decoder/sndfile: work around libsndfile bug on partial read
2014-04-09 23:58:56 +02:00
Weng Xuetian
3a4e667078
PlaylistEdit: don't interrupt playback when current song gets deleted
2014-04-09 23:10:14 +02:00
Max Kellermann
afdefefbe4
icu/Collate: fix memory leak in IcuCaseFold()
2014-04-09 20:09:34 +02:00
Max Kellermann
5360c0c588
IOThread: make io_thread_get() "const"
2014-04-05 09:26:45 +02:00
Max Kellermann
74a05a7f53
pcm/Neon: explicit rounding
...
Convert to 31 bit first, then right-shift with rounding to 16 bit.
2014-03-19 06:54:06 +01:00
Max Kellermann
a68acf5c66
util/ConstBuffer: add FromVoid(), ToVoid() to "void" specialization
...
Provide the full API.
2014-03-18 12:09:17 +01:00
Max Kellermann
ce18c36ed9
decoder/ffmpeg: handle unknown stream start time
2014-03-18 09:16:09 +01:00
Max Kellermann
8e39cf62e7
decoder/ffmpeg: pass AVSEEK_FLAG_ANY to av_seek_frame()
...
This corrects a major mistake from commit 724a59aa
- there was one
small thing that commit was supposed to do, and it failed.
AV_TIME_BASE is not a seek flag.
2014-03-18 09:10:36 +01:00
Max Kellermann
707d379b97
input/mms: move blocking I/O to thread
2014-03-16 11:48:46 +01:00
Max Kellermann
88a0a48b03
input/BufferedInputStream: new wrapper for moving plugin to thread
2014-03-16 10:26:40 +01:00
Max Kellermann
d51b90a880
thread/Thread: make the destructor non-virtual
...
The class does not have any virtual methods, and thus the (debug-only)
destructor does not need to be virtual.
2014-03-16 10:26:23 +01:00
Max Kellermann
e9912bcf8a
input/alsa: don't initialize "seekable=false", "size=-1"
...
These are the default values already.
2014-03-16 09:52:17 +01:00
Max Kellermann
b55e1dcb5e
pcm/Neon: make neon_x4_b() variadic
2014-03-16 09:30:50 +01:00
Max Kellermann
6f4775a8ee
pcm/Neon: apply bit shift during float->int conversion
...
Avoid multiplication. This is a speedup of 20%.
2014-03-16 09:05:30 +01:00
Max Kellermann
c7e2f558a0
input/curl: use CircularBuffer
...
Replaces its own weird buffering code.
2014-03-16 00:35:28 +01:00
Max Kellermann
328860c8ba
util/CircularBuffer: add method GetSpace()
2014-03-16 00:28:42 +01:00
Max Kellermann
89ac111853
util/CircularBuffer: add method GetSize()
2014-03-16 00:27:18 +01:00
Max Kellermann
3d4f588a7f
util/CircularBuffer: rename GetSize() to GetCapacity()
2014-03-15 23:12:20 +01:00
Max Kellermann
8f74bf314d
input/curl: add method CurlInputStream::Open()
2014-03-15 22:56:05 +01:00
Max Kellermann
0dd5ebbdbe
input/curl: move _seek() into the CurlInputStream class
2014-03-15 22:42:37 +01:00
Max Kellermann
2ae60767a3
input/curl: move _easy_init() into the CurlInputStream class
2014-03-15 22:38:46 +01:00
Max Kellermann
64f31f70f9
input/curl: pass std::string&& to HeaderReceived()
...
Code simplification.
2014-03-15 22:02:59 +01:00
Max Kellermann
23eacbd132
input/curl: move code to CurlInputStream methods
2014-03-15 20:43:37 +01:00
Max Kellermann
e9f16fca96
input/curl: rename "error" to "error_buffer"
2014-03-15 20:43:17 +01:00
Max Kellermann
3d30de91f3
input/curl: rename struct input_curl to CurlInputStream
2014-03-15 20:38:08 +01:00
Max Kellermann
f68d2f7c7f
system/fd_util: export fd_set_cloexec()
2014-03-15 20:03:31 +01:00
Max Kellermann
f660d30138
util/CircularBuffer: new buffer class
2014-03-15 18:35:52 +01:00
Max Kellermann
7d353bbe2a
configure.ac: always define _GNU_SOURCE on Linux
...
Make sure glibc gives us all features.
2014-03-15 18:27:09 +01:00
Max Kellermann
5696f91a1e
pcm/PcmFormat: ARM NEON optimizations for float->s16
...
This is nearly 4 times faster than the "portable" algorithm.
2014-03-15 11:41:01 +01:00
Max Kellermann
bb6ee71f08
pcm/PcmFormat: don't use WritableBuffer
...
The previous commit eliminated the need for that.
2014-03-14 23:23:16 +01:00
Max Kellermann
0d0642fd67
pcm/PcmFormat: instantiate FloatToInteger<S32>
...
.. instead of reusing FloatToInteger<S24> and converting from S24 to
S32 in-place.
2014-03-14 23:21:20 +01:00
Max Kellermann
08e6cf3dd2
pcm/PcmFormat: eliminate more duplicate code with templates
...
Refactor the conversion functions to classes and pass an instance to
the new function AllocateConvert().
2014-03-14 20:54:09 +01:00
Max Kellermann
044134eba0
pcm/PcmFormat: eliminate local variable "bits"
2014-03-14 20:53:22 +01:00
Max Kellermann
9fa6fa522e
pcm/PcmFormat: remove obsolete AllocateFromFloat() overload
2014-03-14 20:53:14 +01:00
Pete Beardmore
d0cd98a63a
MultipleOutputs: ensure input_audio_format is zero-initialised
...
-fixes SIGABRT when mpd is started from a previously paused state
-regression introduced by commit: f5a923b9d1
:
'OutputAll: convert to class, move instance to class Partition'
-input_audio_format was previously declared using the static modifier
ensuring it was zero-initialised by default
-the current default-initialised input_audio_format contains garbage at
runtime which allows the AudioFormat.IsDefined() 'fail fast' test in
MultipleOutputs::Update to pass and the SIGABRT follows in
AudioOutput::Open when passed the invalid input_audio_format struct
-switching AudioFormat.IsDefined() for AudioFormat.IsValid() is an
alternative workaround
2014-03-14 20:27:21 +01:00
Max Kellermann
88eae9dabb
command/{storage,file}: suppress bogus format warnings on WIN32
2014-03-14 08:58:43 +01:00
Max Kellermann
f2f1801c25
db/proxy: check connect error before initializing SocketMonitor
...
Fixes crash bug because mpd_connection_get_async() was called without
a connection.
2014-03-06 13:35:42 +01:00
Max Kellermann
a9e351e00d
decoder/gme: fix memory leak in container_scan()
2014-03-06 13:12:39 +01:00
Pete Beardmore
9da57e7458
PulseOutputPlugin: avoid locking mainloop object from within mainloop thread
...
-fixes regression introduced by:
'8d6fedf8177d0d2ced81e6d93d35c368b2ac69db [PATCH] Mixer: add class MixerListener'
-listener.OnMixerVolumeChanged() called GetVolume() which attempted to acquire
the lock but as per 'pa_threaded_mainloop_lock()' documentation:
This function may not be called inside the event loop thread. Events that are
dispatched from the event loop thread are executed with this lock held
-this patch seperates the underlying action of GetVolume() into a new
GetVolumeInternal() function, to be called only when the lock is already held, as
is the case for the listener.OnMixerVolumeChanged() call
2014-03-05 17:17:41 +00:00
Pete Beardmore
3a3fb98f79
PulseOutputPlugin: set icon name
2014-03-04 15:18:30 +00:00
Max Kellermann
503ed9c331
release v0.18.9
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJTEwdzAAoJECNuiljG20USkFYP/i1PaM7O20e2EPE7ELhffk1I
PEL6WiuCxfEHP+JbH/RPy/CdyKIqx3TTeaktXzOJmCcU+5fAgbpIwfK689ZjpE7Y
U+7aPfGudfjYTxM/bigEo+1XAIYWJCJ2IlopN0lRIZSquUm8rfxosqsNzJFrhwsK
40Ps36XdpYUA3z9dugyJjeKQETkjJa5Y55C1yml5RRUz+yPqyiPelm0dSlx3Ggce
KpmNZfp8g8/stwb08iw+qk+cNKP75eJwPdFmQrsc91QxP1oW7ERWhiICA0ZtqaNe
T0Ld5+wZ6uTJSztQiUsWrJYS1yKix5q1Za8tyFr3a9NPI+iIjsALXqU9k7zmZ6Id
GK0Xr9Noo1o80QeGkd60nJyCQXbEU/V0p9D/QiDVei+IvK6mbxF3y2gPA7wobgrC
KEDgsJZ+0fjmgdx+eb8ydg0uIwHrk04u0YKukUqA3bkNS/PUEICPqblcg8Spf89I
RMdjq2HFcpkaIwGvryfHIbTNUbonAziMzmiJ0WQA1FCD3x1WELvBf09GzAsUEoFX
Be0Co15rODOByo5ryZvSJv5BCr2RuCPwzNF+V26nMaKK7EloQWmbO0rpkRLVRk81
qo1JmElm6SyeE3kHqVW/NyrPxLtd7VngV+z9hXr95szUjCjMv/MK169r4jumLTex
RLyPDkhkQLDIijamhjfZ
=nX0n
-----END PGP SIGNATURE-----
Merge tag 'release-0.18.9'
2014-03-02 11:46:07 +01:00
Max Kellermann
47ea69233b
output/alsa: remove the obsolete Raspberry Pi workaround
...
Has been superseded by the previous commit.
2014-03-02 11:22:04 +01:00
Max Kellermann
a884e37de1
output/alsa: call snd_pcm_prepare() after snd_pcm_drop()
...
Don't wait for an optimistic write to fail. This is an improved
workaround for the infamous Raspberry Pi bug (see commit af991765
).
It works much better and comes without the negative side effects. The
old workaround is now obsolete.
2014-03-02 11:12:25 +01:00
Max Kellermann
0102a8665a
event/SignalMonitor: fix build failure due to missing signal.h include
2014-03-02 10:21:31 +01:00
Max Kellermann
d77c83f4ba
Main: auto-configure state file on Android
2014-03-02 00:35:37 +01:00
Max Kellermann
8cf3ac200b
Main: use getExternalStorageDirectory() for locating mpd.conf
2014-03-02 00:24:31 +01:00
Max Kellermann
2bf2f34b12
InputPlugin: allow init() to soft-fail
...
Add enum InputResult which is a tri-state. Input plugins may now fail
and just become unavailable.
2014-03-02 00:17:32 +01:00
Max Kellermann
7453c26ec4
thread/Name: fall back to prctl()
2014-03-01 23:58:59 +01:00
Max Kellermann
b059ba69d6
output/sles: support stereo
2014-03-01 23:05:44 +01:00
Max Kellermann
36ca57a54e
fs/StandardDirectory: add GetUserCacheDir()
...
Move code from CreateConfiguredDatabase() and add XDG support. This
implements an automatic Linux fallback for the setting "db_file" if
none was specified.
2014-03-01 22:51:51 +01:00
Max Kellermann
b8f1850bba
db/Configured: store database file in cache directory
...
Add class Context which wraps the Android/Java Context class and add a
JNI wrapper for method Context.getCacheDir().
2014-03-01 22:20:28 +01:00
Max Kellermann
5268f55344
java/File: add method ToAbsolutePath() returning AllocatedPath
2014-03-01 20:53:39 +01:00
Max Kellermann
e44c9a000d
android/Environment: fix copyright header
...
Stole my own code from another project :-)
2014-03-01 20:22:22 +01:00
Max Kellermann
07c1ba1f5e
TagId3: disable charset conversion without GLib
2014-03-01 19:18:50 +01:00
Max Kellermann
14168eadb2
Main: inline mpd_main() on Android
2014-03-01 19:09:31 +01:00
Max Kellermann
58771fc41c
Android: obtain music directory from Environment.getExternalStoragePublicDirectory()
2014-03-01 18:48:20 +01:00
Max Kellermann
1e06c66c77
java: new helper library for the Android port
2014-03-01 18:48:20 +01:00