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
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
7ecf4ad54d
input/nfs: add missing string.h include
...
For strrchr(). Fixes build failure.
2014-04-23 12:53:19 +02: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
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
c7e2f558a0
input/curl: use CircularBuffer
...
Replaces its own weird buffering code.
2014-03-16 00:35:28 +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
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
4ba7427fa0
util/{Const,Writable}Buffer: add operator[]
2014-03-01 07:49:13 +01:00
Max Kellermann
7757e59e78
input/curl: include cleanup
2014-02-22 00:18:29 +01:00
Max Kellermann
d761d8b168
input/nfs: move nfs_domain to lib/nfs/Domain.cxx
2014-02-08 14:24:47 +01:00
Max Kellermann
fe7c6fee34
ArchivePlugin: pass Path to open()
2014-02-08 13:25:44 +01:00
Max Kellermann
9906daeca7
ArchivePlugin: rename struct archive_plugin to ArchivePlugin
2014-02-08 13:22:13 +01:00
Max Kellermann
c8f0c7e9ed
*/smbclient: protect all libsmbclient calls with a mutex
...
libsmbclient is not thread-safe nor reentrant. We must protect all
function calls with a global mutex, unfortunately.
2014-02-06 22:19:59 +01:00
Max Kellermann
e4322a716c
input/nfs: new plugin using libnfs
2014-02-06 18:37:27 +01:00
Max Kellermann
86ca5b3f16
input/smbclient: move code to lib/smbclient/Init.cxx
2014-01-25 23:29:42 +01:00
Max Kellermann
9b1fbdbca6
ConfigGlobal: add config_find_block()
...
Merge duplicate code.
2014-01-24 16:55:17 +01:00
Max Kellermann
97391fd4b9
DespotifyUtils, Expat: move to lib/
2014-01-24 16:44:36 +01:00
Max Kellermann
f8bfea8bae
Input*: move to input/
2014-01-24 16:33:33 +01:00
Max Kellermann
197b503f3e
Config*: move to config/
2014-01-24 00:20:01 +01:00
Max Kellermann
4aa6d39fd8
archive/*: move to archive/plugins/
2014-01-24 00:09:37 +01:00
Max Kellermann
77041e2cd2
input/alsa: fix memory leak
...
Don't duplicate the MIME type when it gets passed to a std::string.
2014-01-14 22:38:30 +01:00
Max Kellermann
049abef2d4
input/despotify: change name to "despotify"
...
The name "spt" didn't make much sense for this plugin.
2014-01-13 22:35:30 +01:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Max Kellermann
2071070f39
DespotifyUtils: return Tag, not pointer
2014-01-08 19:49:27 +01:00
Max Kellermann
89a78a5f3c
DespotifyUtils: pass const ds_track reference
2014-01-08 19:49:21 +01:00
Max Kellermann
bc23a6bb05
tag/TagBuilder: overload Commit() returning a Tag object
2014-01-08 19:49:08 +01:00
Max Kellermann
ac1983eae3
tag/TagBuilder: rename Commit() to CommitNew()
2014-01-08 19:48:55 +01:00
Steven O'Brien
33c5fc95b4
input/AlsaInputPlugin: remove unnecessary alsa s/w param setting to fix high CPU load issue
2014-01-08 14:00:42 +01:00
Max Kellermann
27ca0db7a6
util/Alloc: new library replacing GLib's g_malloc()
2014-01-07 23:35:18 +01:00
Steven O'Brien
f39a34ccfa
input/AlsaInputPlugin.cxx: use I/O thread to poll for available data
...
[mk: modified to use MultiSocketMonitor instead of SocketMonitor]
2014-01-06 18:27:44 +01:00
Max Kellermann
793962c5b8
event/SocketMonitor: don't close the socket automatically
...
Users now have to call Close() explicitly. This simplifies using the
class, as most users have automatic socket management already, and
Steal() had to be used often.
2014-01-06 18:26:55 +01:00
Max Kellermann
5465647c2e
input/smbclient: new input plugin
2013-12-29 01:25:27 +01:00
Max Kellermann
64e898f6db
release v0.18.6
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
iQIcBAABAgAGBQJSuWnsAAoJECNuiljG20US3qwP/0WGxzRFU2/dLzX6KG5/n+8R
LqVeX7Ap7vLncA2UQQ2BiddPtF0u9lJOnex64pYCkwwpr4JBmkBa6kTKVGbbXDv5
/tuHeUJk/aWhBJ8Qz/rxmNFBW6tNGlhf+7FVt8vHQqvHn7tWWKRlsQNk6Pd4gGM/
UiMyuA8EtfTJZACPRRZK26H7g7EKIjsGt6vwiuWAh3MxGHWL5R2chuP5Mapi1U4U
Qa1YOUAHlChRxGT+LmNMyKlgq+mqltbKQj+pOLPFuT6Q6BqgZp2Ept5Svod/JamC
yCFRGWYsmRxZ0ZOhtRZACfm/yNzyIhkkvgW8FqM6tINOPrwL2MwAJVMVH3DZM7Aj
/8ltz0OH2s9x9sUfOtxQkK/3bJpBwaDnl+dFQtGIFwigvYLR2Jv2Bl1zQO6+zICu
bdbJS+IcOrElxTnxfir0CVEDysifUQ7/ZSQkwDqpF+RI8E07ZMZZLmXk3S2yX6Fx
6dCwdfIsBAotF7RYsdn4cmRaSEx6Ze+aQr0l5yLh+5sKPEdDRSMrBEnCgPGU94ub
VNl3Cp3dtq5kuSfJ90Mk0QzwVd/kCdKZKBMcTX2zv38NLcX0LCSylM4K9yCi+GR2
gvgAJq9cmbmTEN3+grVdApNx0sqNFrD6pB27KhUKWD0VYypPu7yPPptkOWzSldbz
8JGa8lryMbRmgiXVyivp
=Z823
-----END PGP SIGNATURE-----
Merge tag 'release-0.18.6'
2013-12-24 12:20:24 +01:00
Max Kellermann
3c4cd9d08b
input/alsa: fix build with gcc 4.6
2013-12-21 21:21:25 +01:00
Steven O'Brien
35f85ddd86
add draft ALSA input plugin
...
I've created an elementary input plugin that plays sound from the
soundcard, so you can use MPD to listen to anything connected to the
line-in jack, or to Video4Linux FM radio cards that send audio through
the soundcard. There has been a small number of posts here in the
past requesting line-in input, so here is a first, simplistic stab at
it.
The patch adds a new sheme, alsa://, which causes mpd to play data
read directly from a souncdard. It defaults to hw:0,0, but you can
pass any ALSA device name in the URI. So, using mpc for example:
mpc add alsa://
mpc play
will play from device hw:0,0.
To use a diffferent device:
mpc add alsa://hw:1,0
2013-12-19 23:25:50 +01:00
Max Kellermann
97fc001180
input/cdio: fix typo in #include path
...
Broken by commit 3b0fea5f
2013-12-17 08:58:00 +01:00
Max Kellermann
527a6003e2
input/despotify: don't log "eof" flag after setting it
2013-12-14 13:58:28 +01:00
Max Kellermann
26c731a382
input/despotify: convert to class
2013-12-14 13:49:56 +01:00
Max Kellermann
c7b1038a9d
Merge branch 'v0.18.x'
2013-12-14 12:37:16 +01:00
Denis Krjuchkov
0a6c4c31b2
fs/Traits: split PathTraits type into PathTraitsFS and PathTraitsUTF8
2013-12-05 03:53:43 +06:00
Max Kellermann
308fdf6e9a
input/curl: use class TagBuilder
2013-12-03 13:14:11 +01:00
Max Kellermann
af4133e3c9
Util/StringUtil: add StringStartsWith()
...
Replaces GLib's g_str_has_prefix().
2013-11-28 18:48:35 +01:00
Max Kellermann
f90abe9530
include cleanup using iwyu
2013-11-28 11:50:54 +01:00
Gaetan Bisson
3b0fea5fae
input/cdio_paranoia: support libcdio-paranoia 0.90
2013-11-27 08:25:17 +01:00
Max Kellermann
d6247902ec
input/curl: work around stream resume bug (fixed in libcurl 7.32.0)
2013-11-23 12:13:41 +01:00
Max Kellermann
a566c28a49
input/curl: add global variable "curl_version"
2013-11-23 12:08:46 +01:00
Max Kellermann
2eddb63a83
input/curl: dump version number
2013-11-23 12:02:39 +01:00
Max Kellermann
f33acf8758
input/cdio_paranoia: add setting "default_byte_order"
...
Allows big-endian users to configure the fallback byte order to
little-endian. Without this setting, MPD assumes native byte order if
the CD drive can't decide.
2013-11-07 18:17:54 +01:00
Max Kellermann
899c2bb9cc
input/curl: unregister removed sockets from epoll
...
Fixes a crash bug. See code comment.
2013-11-07 01:10:07 +01:00
Max Kellermann
01891f8815
input/curl: fix bug with redirected streams
...
Migrate from the old curl_multi_perform() API to the newer
curl_multi_socket_action() API (since CURL 7.16).
This allows working around a bug with HTTP redirections with epoll:
when CURL closes a socket and the new one happens to have the same
file number, MPD did not have a chance to remove the old one from
epoll and subsequently attempted to use EPOLL_CTL_MOD, which was not
allowed by epoll, because it's a new socket now.
2013-11-06 19:14:22 +01:00
Max Kellermann
adb68450ce
input/curl: move code into class CurlMulti
...
Move all global variables there, and keep just one global variable:
the pointer to the CurlMulti instance. Prepares for the next commit.
2013-11-06 19:07:10 +01:00
Max Kellermann
2520f6fe49
input/curl: remove the global list of requests
...
Unused.
2013-11-06 19:06:14 +01:00
Max Kellermann
c9278bfcdf
input/curl: don't abort all requests on curl_multi_perform() error
...
Eliminate some complicated code that's not worth the trouble.
2013-11-06 19:06:02 +01:00
Max Kellermann
8b838ff9ea
input/curl: use CURLOPT_PRIVATE
...
Replaces the loop in input_curl_find_request().
2013-11-06 19:05:45 +01:00
Max Kellermann
8555b65c50
*: update copyright year to 2013
2013-10-30 23:37:06 +01:00
Max Kellermann
20597b3632
*: use nullptr instead of NULL
2013-10-28 23:58:17 +01:00
Max Kellermann
93deb84499
input_stream: rename struct to InputStream
2013-10-23 23:12:02 +02:00
Max Kellermann
c4d4011c63
InputInternal: remove obsolete library
2013-10-23 23:10:27 +02:00
Max Kellermann
c0421a57da
input/curl: don't use GLib's typedef "gushort"
2013-10-21 09:54:21 +02:00
Max Kellermann
8f1ec1dfdf
util/NumberParser: utilities for parsing numbers from ASCII strings
2013-10-21 09:48:31 +02:00
Max Kellermann
0e4d2e7277
Util/ASCII: add function StringEqualsCaseASCII()
...
Replaces GLib's g_ascii_strcasecmp().
2013-10-20 23:09:51 +02:00
Max Kellermann
59f8144c50
*: use nullptr instead of NULL
2013-10-19 18:19:03 +02:00
Max Kellermann
5a7c931293
input/cdio: use class AllocatedPath
2013-10-19 17:48:46 +02:00
Max Kellermann
0a213ddf03
input/curl: use std::string for meta_name
...
Automatic memory management.
2013-10-19 17:24:21 +02:00
Max Kellermann
1434e5a22e
decoder/gme,input/curl,...: use static buffers instead of g_strdup_printf()
2013-10-19 17:15:17 +02:00
Max Kellermann
b39ab76118
Util/CharUtil: new library replacing g_ascii_isX()
2013-10-19 15:36:47 +02:00
Max Kellermann
bd5a70c712
input/curl: use MultiSocketMonitor constants instead of GLib
2013-10-18 08:30:44 +02:00
Max Kellermann
b3611524f4
fs/Path: move definitions to struct PathTraits
2013-10-17 23:23:25 +02:00
Max Kellermann
05de2e998c
InputStream: use int64_t instead of goffset
...
Decouple some more from GLib.
2013-10-17 10:45:10 +02:00
Max Kellermann
24780d99e6
input_plugin: rename struct to "InputPlugin"
2013-10-17 10:20:57 +02:00
Max Kellermann
1b8a1d4140
ArchiveLookup: return const strings
2013-10-17 00:36:52 +02:00
Max Kellermann
5e26e2ab1d
system/ByteOrder: new library for byte ordering / endianess
...
Replacing GLib macros.
2013-10-16 22:09:44 +02:00
Max Kellermann
fa13a6616f
Archive*: move archive_domain to ArchiveDomain.cxx
...
Merge duplicate symbol.
2013-10-15 23:24:54 +02:00
Max Kellermann
25c208d81d
input/*: don't allocate attribute "mime"
...
This was a memory leak, because "mime" was a std::string which created
another copy and discarded the allocated buffer.
2013-10-15 22:49:23 +02:00