Commit Graph

8166 Commits

Author SHA1 Message Date
Max Kellermann 9a4b572d34 db/upnp: getTagValue() returns string pointer
Reduce bloat.
2014-01-14 13:42:08 +01:00
Max Kellermann ddc75cc46b db/upnp/Directory: merge m_containers and m_items
There is no use in duplicating these containers.  It only means that
we have to search both, duplicating the code.
2014-01-14 13:37:21 +01:00
Max Kellermann dafd0bc49a db/upnp: pass const reference to getTagValue() 2014-01-14 13:37:05 +01:00
Max Kellermann 2cb912e4f4 db/upnp: Namei() returns error when no object was found
Don't fail silently.
2014-01-14 12:34:49 +01:00
Max Kellermann 91a513e87d db/upnp/Directory: eliminate one std::string copy with std::move() 2014-01-14 12:27:21 +01:00
Max Kellermann efdb41f2a6 db/upnp/Object: add attribute "name"
Call titleToPathElt() only once for each object.
2014-01-14 12:22:37 +01:00
Max Kellermann 26b850c15c db/upnp: use std::replace() in titleToPath() 2014-01-14 12:15:21 +01:00
Max Kellermann 9941735ae7 db/upnp: pass std::string to titleToPathElt() 2014-01-14 12:03:36 +01:00
Max Kellermann 29e5dc4413 db/upnp: don't sanitize the title tag
We need this only for path names.
2014-01-14 12:00:58 +01:00
Max Kellermann 3a660c5527 db/upnp/WorkQueue: remove unused attributes "high", "low" 2014-01-14 11:49:42 +01:00
Max Kellermann 738991494a db/upnp/WorkQueue: initialize "ok" to false, eliminate redundant checks 2014-01-14 11:48:19 +01:00
Max Kellermann ee4c3ff1b8 db/upnp/WorkQueue: remove IsOK() check from put()
Not necessary, not worth the check.
2014-01-14 11:46:18 +01:00
Max Kellermann 60486bcc46 db/upnp/WorkQueue: remove redundant n_workers_exited check from IsOK() 2014-01-14 11:43:18 +01:00
Max Kellermann 79eed5182e db/upnp/WorkQueue: include cleanup 2014-01-14 11:41:28 +01:00
Max Kellermann 5de0f3f36a db/upnp/WorkQueue: remove unnecessary "waiting" attributes 2014-01-14 11:38:48 +01:00
Max Kellermann 9f316e11bd db/upnp/WorkQueue: remove unused method waitIdle()
Contrary to setTerminateAndWait()'s documentation, the method does
wait for worker threads to exit via pthread_join().
2014-01-14 11:31:49 +01:00
Max Kellermann c6d8f6da70 db/upnp/WorkQueue: use array instead of std::list
Reduce bloat further.
2014-01-14 11:23:13 +01:00
Max Kellermann 73fd98b82e db/upnp/WorkQueue: use std::list instead of std::unordered_map
Reduce bloat.
2014-01-14 11:11:08 +01:00
Max Kellermann 6cb725391d db/upnp/WorkQueue: rename attributes 2014-01-14 11:07:06 +01:00
Max Kellermann c13facdaca db/upnp/WorkQueue: pass reference to take() 2014-01-14 11:07:00 +01:00
Max Kellermann e259474362 db/upnp/WorkQueue: remove unused method qsize() 2014-01-14 11:06:55 +01:00
Max Kellermann 7740855a78 db/upnp/WorkQueue: remove unused "szp" parameter from take() 2014-01-14 11:06:43 +01:00
Max Kellermann d605170f9f db/upnp/WorkQueue: remove unused statistics 2014-01-14 10:51:33 +01:00
Max Kellermann 4734af747b OutputThread: use real-time priority 2014-01-14 09:59:04 +01:00
Max Kellermann 5d17731b73 UpdateGlue: let the update thread run at "idle" priority
The update thread should not affect the rest of the system, therefore
set "idle" priority, and let it only run when nobody else is using the
resources.
2014-01-14 09:09:52 +01:00
Max Kellermann 07a7fde825 Merge branch 'shine' of git://github.com/ekroth/mpd 2014-01-13 22:54:15 +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 7c60b50a39 CommandLine: print list of database plugins 2014-01-13 22:31:55 +01:00
Max Kellermann 4f83c60296 copyright year 2014 2014-01-13 22:31:55 +01:00
Andrée Ekroth cd5817b67e encoder/shine: fix segfault workaround
Initializing and closing the Shine library without
writing any data results in a segmentation fault.
The current workaround writes zeroes if there was
no actual data.
2014-01-13 22:28:29 +01:00
Max Kellermann a4d580a6f8 db/upnp: add fallback for emplace()
The method emplace() was added in gcc 4.8.  This commit restores
compatibility with gcc 4.7.
2014-01-13 22:24:48 +01:00
Max Kellermann ca43e634b5 db/upnp: use std::function for the libupnp callback
Replaces the bloated std::map.
2014-01-13 22:24:02 +01:00
Max Kellermann 85324f80fe db/upnp: fix "upnp:class" parser
"upnp:class" is an element, not an attribute of element "item".  This
fixes a regression from commit 65ebfb16
2014-01-13 22:23:00 +01:00
Andrée Ekroth 56a7fcf189 encoder/shine: remove unnecessary buffer
Now writes to the de-interleaved buffers directly,
instead of writing to an intermediate fifo buffer.

Fix indentation and 80 char width lines.
2014-01-13 17:55:12 +01:00
Max Kellermann 8cd15a02cd release v0.18.7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJS08NxAAoJECNuiljG20USYMYP/06XGbNmMoNy00DMMPVMGgfi
 yvsBAM1kXTgh4/vE5LOZRJoXW8HY/p284TnTbjZWW/56c2RFbJblp4Bya28WtZTU
 kAVpYD/8ClAHjZjVpZyvKq3G/U3IsM/EP3to8UnVRfoPRSr9LrOiT03TXnpWW5eO
 CgrYqRwEf/XuqftmX/KarVEN/IRB1SxhZkcKLfagyW0nuulSwq5aR8tgR0wSu4qf
 Yt+e1NQ2N3hJqINdV0Yb+wb2WAWK7jA6T5zw3ukalIp77/EnwvxD7VhnDKA4E4/8
 6Y6MtkDb1KjweFXqRlMScEEZ7Xtvfa8fDkbXGV09jpcKBtN+M59L4+VP5ZC1d8bZ
 VDoHOqIwpLsszdhP8/LidYgjkPf3tTjY9jCYmF15cu/E6PIHlrhcc1zD1yOps8bm
 DFGFqjcct2hkCqovYFSnZGwHwfcOp/KjSVkoALxcmcw3KZDAuo8zhtH65O14UYdb
 LGwotGQOnjDrWyd+Mt6eNyVY65GWuzNYazuCVsDcJqGM66sXIsfXgGKpOtTByAGU
 0fYCq6apreGKhNXHoYeNwD5OhbffXWobA8nSWJhyeUu0FGMyNDbX/OET/5d2SCr1
 Tm2+DVcBiNxgd4Bc6ddHgzsIem4LzS8VZx07VAwONP5oD4+eCj9wcx5S+0VrKNr9
 kld5H4FLAb5fJfcRvKLm
 =XVhH
 -----END PGP SIGNATURE-----

Merge tag 'release-0.18.7'
2014-01-13 11:52:35 +01:00
Max Kellermann 05ad335ae9 release v0.18.7 2014-01-13 11:39:27 +01:00
Andrée Ekroth ea771c17c5 Shine encoding plugin
This encoding plugin features a fixed-point mp3 encoder,
with faster encoding on architectures without a FPU.

Right now the encoder is limited to stereo and 16 bit depth.
The bitrate and sample rate can be modified in audio_output.

audio_output {
        type            "httpd"
        name            "My shine stream"
        encoder         "shine"
        port            "8000"
        format          "44100:16:2"
        bitrate         "320"  # default: 128
}
2014-01-13 11:14:19 +01:00
Max Kellermann 7faeb2ff2b configure.ac: reject libmpcdec SV7 in configure script
Look for symbol "mpc_demux_init" which does not exist in SV7.  This
avoids build failures when SV7 was found by configure.ac.
2014-01-11 21:02:12 +01:00
Max Kellermann 65ebfb16c9 db/upnp/Directory: parse item_class in StartElement
Don't add to the std::map.
2014-01-11 01:40:21 +01:00
Max Kellermann 44a65fc5de db/upnp/Object: add attribute "url"
Don't store in the std::map.
2014-01-11 01:36:08 +01:00
Max Kellermann f031eb1ef2 db/upnp/Directory: parse duration
Don't put all <res/> attributes to the attributes map; parse the
"duration" attribute as soon as we receive it, and store it in an
integer attribute.  This reduces bloat.
2014-01-11 01:31:13 +01:00
Max Kellermann b50d79542c db/upnp: move stringToTokens() to Util.cxx 2014-01-11 01:30:05 +01:00
Max Kellermann 8351543c0f db/upnp: move lazy Open() call to new class LazyDatabase
Generic approach for the workaround.
2014-01-11 01:25:22 +01:00
Max Kellermann 8add78ed5e db/upnp/discovery: convert std::strings to const char *
Reduce bloat.
2014-01-11 01:21:54 +01:00
Max Kellermann 4b3a3d6faa db/upnp: remove unnecessary Mutex 2014-01-11 01:16:35 +01:00
Max Kellermann 71d012fa61 db/proxy: forward "idle" events
Send "idle" to the other MPD whenever there's nothing else to do and
forward incoming "idle database" events to all our MPD clients.
2014-01-11 01:11:19 +01:00
Max Kellermann 114df1f137 DatabasePlugin: add interface DatabaseListener
Allow database plugins to announce that they have been modified.
2014-01-11 01:01:54 +01:00
Max Kellermann 00adf7ff17 db/proxy: move code to Disconnect() 2014-01-11 00:46:33 +01:00
Max Kellermann 3f0415fa24 UpdateGlue: move stats_invalidate() call to Instance::DatabaseModified() 2014-01-11 00:46:33 +01:00
Max Kellermann 348d0c944e Stats: lazy initialization
Ask the DatabasePlugin for stats when the first client requests them,
not at startup.
2014-01-10 23:42:46 +01:00