Commit Graph

466 Commits

Author SHA1 Message Date
Max Kellermann
684a3d30a6 command: move code to *Commands.cxx 2012-08-29 17:42:06 +02:00
Max Kellermann
c852970cf6 Makefile.am: distribute DatabaseCommands.hxx 2012-08-29 17:41:22 +02:00
Max Kellermann
488c1eb87b test/test_queue_priority: fix SIGABRT 2012-08-25 10:24:34 +02:00
Max Kellermann
695ffedef9 Makefile.am: swap libdb_plugins.a and -lmpdclient order
With some linkers, it is important to specify the static library
first, and then libmpdclient.  Fixes linker failures.
2012-08-22 13:54:31 +02:00
Max Kellermann
2bd344549b queue: duplicate all song objects
Make sure the queue "owns" all song objects, so nobody else can free
them.
2012-08-15 23:10:00 +02:00
Max Kellermann
a6ac0f8965 DatabasePlugin: add method VisitUniqueTags()
Optimize the ProxyDatabase by invoking "list" on the peer, instead of
visiting all songs.
2012-08-15 23:02:27 +02:00
Max Kellermann
affe21f7c1 db_visitor: delete obsolete header 2012-08-15 22:57:20 +02:00
Max Kellermann
efccb6ac82 Merge branch 'v0.17.x' 2012-08-15 01:04:34 +02:00
Max Kellermann
e291f3d257 decoder/fluidsynth: remove throttle (requires libfluidsynth 1.1)
The libfluidsynth API is now sane, and does not require real-time
decoding.
2012-08-15 00:29:38 +02:00
Max Kellermann
7d27d2ea5e Merge branch 'v0.17.x' 2012-08-14 23:58:54 +02:00
Max Kellermann
a869dfea85 timer: use monotonic clock if available 2012-08-14 19:07:31 +02:00
Max Kellermann
f794b1e1aa output_all: add basic GError support 2012-08-08 22:48:59 +02:00
Max Kellermann
8c425c758c decoder_control: add GError attribute 2012-08-08 22:38:16 +02:00
Max Kellermann
050ba302cb song: use C++ compiler 2012-08-08 21:08:37 +02:00
Max Kellermann
21792386d8 time_print: new library, function time_print()
Implements error checking for the gmtime_r() call, which was missing
in two code locations.
2012-08-08 09:27:12 +02:00
Max Kellermann
63a2ac21e1 ProxyDatabasePlugin: new database plugin using libmpdclient
Implementation incomplete, but sort-of-works.  DumpDatabase works, but
MPD is still hard-coded on the "simple" plugin.
2012-08-08 01:20:45 +02:00
Max Kellermann
733d6a6b16 DatabaseSelection: add "match" attribute
Let the database plugin do the match.
2012-08-08 00:55:02 +02:00
Max Kellermann
ff58207034 db_selection: rename to DatabaseSelection 2012-08-07 23:12:26 +02:00
Max Kellermann
b3d76b7e5c db_print.h: rename to DatabasePrint.hxx 2012-08-07 23:10:34 +02:00
Max Kellermann
4d6c816abb dbUtils.h: move to DatabaseQueue.hxx, DatabasePlaylist.hxx 2012-08-07 22:57:18 +02:00
Max Kellermann
f35ceaee0a command: move code to DatabaseCommands.cxx
Prepare to use the DatabasePlugin C++ API directly.
2012-08-07 22:36:18 +02:00
Max Kellermann
a64a2a65a9 command: move print_error() to CommandError.cxx
Prepare for splitting command.c.
2012-08-07 22:26:14 +02:00
Max Kellermann
c6a0f5d3f9 test/DumpDatabase: new debug program 2012-08-07 20:21:10 +02:00
Max Kellermann
bb75e3ea55 DatabaseRegistry: list of plugins 2012-08-07 20:07:17 +02:00
Max Kellermann
e08d4f28aa Makefile.am: add libdb_plugins.a 2012-08-02 19:25:18 +02:00
Max Kellermann
0a3ada4fea stats: convert to C++ 2012-08-02 19:14:53 +02:00
Max Kellermann
8bdf7917c4 db_print: convert to C++ 2012-08-02 19:14:40 +02:00
Max Kellermann
67d16a086e dbUtils: split to Database{Queue,Playlist}.cxx 2012-08-02 19:14:09 +02:00
Max Kellermann
edf811fa02 DatabaseVisitor, ...: use GError forward declaration 2012-08-02 19:12:06 +02:00
Max Kellermann
9dc9459f3a db_plugin: convert to C++ 2012-08-01 09:59:12 +02:00
Max Kellermann
2571accfc3 configure.ac: require C++11 compiler
We'll add some C++11 code soon.
2012-08-01 09:59:12 +02:00
Max Kellermann
60ac702038 tcp_socket, ...: remove obsolet RAOP sources 2012-07-30 06:57:49 +02:00
Max Kellermann
4ebd69193e Makefile.am: updated web server for "upload" target 2012-07-13 10:19:38 +02:00
Max Kellermann
6dd70926fa test/test_pcm: add pcm_volume tests 2012-07-10 01:30:02 +02:00
Max Kellermann
5dfc0918c3 require GLib 2.16
GLib 2.16 was released more than 4 years ago.  Let's remove some cruft
from the glib_compat.h header, and avoid new cruft to it.
2012-07-10 01:28:52 +02:00
Max Kellermann
baa77c8ae3 Makefile.am: distribute src/output/*.h 2012-06-27 10:11:21 +02:00
Jurgen Kramer
7235dbadfd patch to split DSD decoder into separate decoders for DSF en DFF. Move common
functions to new dsdlib. Update user doc.
2012-06-27 09:54:24 +02:00
Max Kellermann
ede70ee3a4 update_walk: move code to update_song.c 2012-06-13 22:14:16 +02:00
Max Kellermann
66ed427a57 update_walk: move code to update_container.c 2012-06-13 22:11:43 +02:00
Max Kellermann
c9e63e9fdb update_walk: move code to update_archive.c 2012-06-13 21:52:46 +02:00
Max Kellermann
ddf7f5c131 update_internal.h: split header 2012-06-13 21:38:28 +02:00
Max Kellermann
457d98c860 output/raop: delete the RAOP plugin
This plugin is horrible code, I mean it.  Last year, I tried hard to
fix it, but I figured would take less time to do a full rewrite.
Given that I don't even have any device that supports RAOP, I can't do
that properly.  After 16 months, nobody volunteered for fixing it.
Hereby, I delete it, because having no RAOP plugin is better than
having this mess.  Sorry.
2012-05-29 23:15:41 +02:00
Max Kellermann
6b52d040b1 test/read_rva2: new debug program for the RVA2 library 2012-04-23 23:00:41 +02:00
Max Kellermann
c22cbbf828 Merge branch 'v0.16.x'
Conflicts:
	src/output/osx_plugin.c
	src/text_input_stream.c
2012-04-05 00:45:39 +02:00
Max Kellermann
47c58c01d1 test/test_vorbis_encoder: program to debug the vorbis encoder 2012-04-04 23:58:00 +02:00
Max Kellermann
81208d78ac pcm_dsd: implement DSD to 24 bit USB conversion
Implements the dCS suggested standard:

 http://www.dcsltd.co.uk/page/assets/DSDoverUSB.pdf
2012-03-22 01:14:51 +01:00
Max Kellermann
9ec9a8705e pcm_export: use the byte_reverse library directly
Delete the now-unused pcm_byteswap library, and optimize the
pcm_export_state object.
2012-03-21 21:18:11 +01:00
Max Kellermann
170635e3a6 output/{alsa,oss}: move endian code to new library pcm_export 2012-03-21 21:16:50 +01:00
Max Kellermann
3dba09f339 output/alsa: always receive host byte order samples
Don't use audio_format.reverse_endian.
2012-03-21 19:14:05 +01:00
Max Kellermann
62218fe59d test: add unit test for util/byte_reverse.c 2012-03-21 19:08:32 +01:00
Max Kellermann
95d9bb6dfc pcm_byteswap: move code to libutil 2012-03-21 18:58:19 +01:00
Max Kellermann
33986075ef Makefile.am: link src/util/*.c into libutil.a 2012-03-21 18:58:19 +01:00
Max Kellermann
238c3adad1 decoder/dsdiff: reverse bits to most significant bit first
Allow to remove this complexity from the MPD core.
2012-03-21 09:01:56 +01:00
Max Kellermann
c1d0a8b5ce dsd2pcm: move the bit reversing code to a generic library
Instead of doing run-time initialisation, use a constant lookup table.
2012-03-21 08:44:43 +01:00
Robert Vollmert
281b8714ef playlist/soundcloud: support libyajl2
[mk: backwars compatibility and autoconf check]
2012-03-19 21:16:48 +01:00
Max Kellermann
8dcefaf2e3 test/dump_text_file: debug program for text_input_stream.c 2012-03-19 20:37:25 +01:00
Max Kellermann
1e60a4386a playlist_edit: move UID check to client_allow_file() 2012-03-06 22:10:54 +01:00
Max Kellermann
d07a6edd2f configure.ac: detect libyajl for playlist/soundcloud 2012-03-01 20:18:16 +01:00
Robert Vollmert
7cef52478d A soundcloud playlist plugin.
Requires YAJL to build, and this doesn't include the necessary
automake changes. Can be built using
./configure CFLAGS="-I/usr/include/yajl" LIBS="-lyajl" --enable-soundcloud

Add the following to your config:

playlist_plugin {
        name "soundcloud"
        enabled "true"
        apikey "c4c979fd6f241b5b30431d722af212e8"
}

Then you can stream from soundcloud using calls like:

mpc load soundcloud://track/<track-id>
mpc load soundcloud://playlist/<playlist-id>
mpc load soundcloud://url/http://soundcloud.com/some/track/or/playlist

For the last case, you can leave off the http:// or
http://soundcloud.com/ .
2012-03-01 20:11:09 +01:00
Max Kellermann
9c36e71081 decoder/dsdiff: don't convert to PCM
Move the responsibility for the conversion to the PCM library.  This
will allow passing the verbatim DSD samples to an output plugin.
2012-03-01 02:05:40 +01:00
Max Kellermann
c9c57af5f7 pcm_convert: support the DSD format 2012-03-01 02:00:12 +01:00
Avuton Olrich
0742976138 win32: Add a Windows OS resource file and icon 2012-02-23 06:32:30 -08:00
Max Kellermann
ae28ba84d2 command: move code to protocol/argparser.c 2012-02-14 19:13:04 +01:00
Max Kellermann
b8ed420058 command: move functions to protocol/result.c 2012-02-14 18:57:29 +01:00
Max Kellermann
7338b16c18 listen: implement systemd socket activation 2012-02-13 21:32:42 +01:00
Max Kellermann
d7d9dbd2c2 playlist/flac: delete this obsolete plugin
The FLAC playlist plugin has been superseded by the "embcue" playlist
plugin, which can read the embedded CUE sheets of all formats.
2012-02-12 19:57:27 +01:00
Max Kellermann
4fdcc0496f update_walk: move code to update_db.c 2012-02-12 17:41:34 +01:00
Max Kellermann
0c4a2bea69 update_walk: move code to update_io.c 2012-02-12 17:00:00 +01:00
Max Kellermann
1735284a2a playlist/embcue: new plugin for reading embedded cue sheets
Parses CUE data from the "CUESHEET" tag.  Needs further integration in
the update thread.
2012-02-12 16:10:20 +01:00
Max Kellermann
5d73215a8d decoder_plugin: scan tags with callback table
Pass a callback table to scan_file() and scan_stream(), instead of
returning a tag object.
2012-02-11 17:04:29 +01:00
Max Kellermann
43b7b98949 decoder/ffmpeg: move code to ffmpeg_metadata.c 2012-02-11 16:37:29 +01:00
Max Kellermann
c8a990b9d3 decoder/vorbis: move code to vorbis_comment.c 2012-02-11 10:04:02 +01:00
Max Kellermann
abcc225763 cue_parser: new line based CUE sheet parser
To replace libcue, the unmaintained and crashy library.
2012-02-10 00:12:29 +01:00
Max Kellermann
84ba14fa29 directory: replace songvec with doubly linked list 2012-01-24 22:26:43 +01:00
Max Kellermann
d99f074eb7 directory: replace dirvec with doubly linked list
Random access is not needed, and a linked list is easier to manage: we
don't need to (re-)allocate the pointer array.
2012-01-24 20:49:53 +01:00
Max Kellermann
a989140a07 util/list.h: import the Linux kernel's linked list library 2012-01-24 20:49:52 +01:00
Max Kellermann
a467128093 db_lock: new unified lock for songvec and dirvec 2012-01-21 10:51:53 +01:00
Max Kellermann
4f093d5b97 Merge branch 'v0.16.x'
Conflicts:
	Makefile.am
	NEWS
	configure.ac
	src/encoder/flac_encoder.c
	src/log.c
	src/pcm_buffer.c
2011-11-28 11:56:01 +01:00
Max Kellermann
cee5036aca encoder/flac: use fifo_buffer instead of pcm_buffer
This fixes a buffer corruption bug; pcm_buffer is not designed to be a
persistent buffers, and will discard anything between two consecutive
calls.
2011-11-28 09:21:32 +01:00
Max Kellermann
790823abb4 growing_fifo: new utility library for growing fifo_buffer 2011-11-28 09:11:11 +01:00
Max Kellermann
f5f1bfbef1 pcm_buffer: un-inline pcm_buffer_get()
This method is too complex for inlining.
2011-11-27 20:17:12 +01:00
Avuton Olrich
ef369c2e2b Makefile.am: Add PULSE_LIBS for linking the mixer when compiling with pulse
Commit 3a3158 introduced a small bug where the pulseaudio mixer would not link
with the main binary in some situations.
2011-11-14 05:09:18 -08:00
Max Kellermann
f1da118a6c test: add GLib testing compatibility header
Didn't compile on GLib < 2.16.
2011-10-19 21:14:14 +02:00
Max Kellermann
572d8d0cc4 test: add unit test for the PCM library 2011-10-10 10:24:05 +02:00
Max Kellermann
c9a57d354d pcm_buffer: un-inline pcm_buffer_get()
This function is too complex for being inlined everywhere.
2011-10-10 10:13:43 +02:00
Max Kellermann
311e627463 audio: rename audio.[ch] to audio_config.[ch] 2011-10-10 10:13:43 +02:00
Max Kellermann
db0bb425e7 Makefile.am: cue_tag.c belongs to libplaylist_plugins.a 2011-10-09 18:48:20 +02:00
Max Kellermann
e001dd2d45 Makefile.am: remove redundant GLIB_CFLAGS specifications 2011-10-09 18:45:37 +02:00
Max Kellermann
c38772c97f Makefile.am: add static library libpcm.a 2011-10-09 18:42:32 +02:00
Max Kellermann
3a31589fdd Makefile.am: generate static library from plugins
Compile the plugins only once with the same C flags.
2011-10-09 18:33:02 +02:00
Max Kellermann
176debaf37 Makefile.am: require automake 1.11
Prepare for enabling "silent-rules".
2011-10-09 18:32:55 +02:00
Max Kellermann
072f83b240 configure.ac: use $LIBS instead of $MPD_LIBS 2011-10-09 18:29:25 +02:00
Max Kellermann
cbd6770f2f configure.ac: substitute FAAD_CFLAGS, FAAD_LIBS
Don't use MPC_CFLAGS, MPD_LIBS.
2011-10-09 18:25:09 +02:00
Max Kellermann
0c3a7bcf12 configure.ac: substitute MPCDEC_LIBS, MPCDEC_CFLAGS
Don't use MPD_LIBS, MPC_CFLAGS.
2011-10-09 17:58:36 +02:00
Max Kellermann
389fbaaca2 configure.ac: add variable BZ2_LIBS
Don't use MPD_LIBS.
2011-10-09 17:56:46 +02:00
Max Kellermann
02a6a46e86 configure.ac: don't append DESPOTIFY_LIBS to MPD_LIBS
Use DESPOTIFY_LIBS in Makefile.am instead.  Also, use
DESPOTIFY_CFLAGS.
2011-10-09 17:39:24 +02:00
Max Kellermann
5c0576ca55 Merge branch 'v0.16.x'
Conflicts:
	configure.ac
	src/player_control.c
	src/player_thread.c
	src/playlist_song.c
2011-10-06 22:45:02 +02:00
Max Kellermann
4e909f9411 decoder/dsdiff: new decoder plugin
Doesn't seem to work yet, getting just noise from a test file.
Seeking isn't implemented yet.
2011-10-04 21:41:03 +02:00
Max Kellermann
99f49e266c Makefile.am: build the "dsd2pcm" program 2011-10-04 21:40:59 +02:00
Miklos Vajna
83f6498aac Install systemd service file if systemd is available 2011-09-30 08:37:36 +02:00
Max Kellermann
533a6b0240 tcp_connect: generic library for establishing TCP connections 2011-09-20 21:27:17 +02:00
Max Kellermann
7d9d459ac2 resolver: add function resolve_host_port() 2011-09-20 21:15:05 +02:00
Max Kellermann
3ea1073809 socket_util: move sockaddr_to_string() to resolver.c 2011-09-20 08:49:36 +02:00
Max Kellermann
921553d7bb Merge branch 'v0.16.x' 2011-09-20 08:47:06 +02:00
Max Kellermann
b03f9ece05 glib_socket.h: wrap g_io_channel_*_new() calls portably
The server_socket library (used by the httpd output plugin) didn't
check for WIN32, that's fixed now.
2011-09-20 08:35:25 +02:00
Max Kellermann
74617389c8 output_plugin: the plugin allocates the audio_output object
Pass audio_output objects around instead of void pointers.  This will
give some more control to the plugin, and prepares for non-blocking
audio outputs.
2011-09-19 09:41:21 +02:00
Max Kellermann
b4a8b8c0d4 Makefile.am: rename SPARSE_SOURCES to SPARSE_SRC
Work around automake warning.
2011-09-19 08:03:31 +02:00
Max Kellermann
3c9bcdd347 output: per-plugin header
Move the "extern" declarations from output_list.c, for more type
safety.
2011-09-17 19:51:41 +02:00
Max Kellermann
5e22fe488e output: rename plugin source files 2011-09-17 08:54:50 +02:00
Max Kellermann
87b624f5d5 Merge branch 'v0.16.x' 2011-09-16 07:52:39 +02:00
Max Kellermann
d8c829fa0c configure.ac: pass AM_CXXFLAGS, AM_CPPFLAGS to Makefile.am 2011-09-16 07:35:46 +02:00
Max Kellermann
f2be6432a9 Makefile.am: allow out-of-tree sparse call 2011-09-15 09:48:36 +02:00
Max Kellermann
dd33317f45 input_stream: move input_stream_init(), _deinit() to _internal.c 2011-09-14 22:01:55 +02:00
Max Kellermann
a236a439cc db_print: move code to function db_selection_print()
Use it in handle_lsinfo(), and eliminate some duplicate code.
2011-09-13 22:09:37 +02:00
Max Kellermann
a94d4be466 db_plugin: add method visit() 2011-09-13 21:47:00 +02:00
Max Kellermann
169db88c20 database: add struct db_visitor
Use this struct for db_walk().
2011-09-13 19:37:28 +02:00
Max Kellermann
aede71b1dc playlist: move enum playlist_result to playlist_error.h
Reduce header dependencies.
2011-09-11 07:55:51 +02:00
Max Kellermann
7819aa6b20 db_plugin: introducing a plugin API for the song database
First draft, not really pluggable currently - hard-coded to use the
"simple" plugin, and calls several of its internal functions.

The API is very simple currently, all searches are still performed
over the root "directory" object.  Future changes to the API will move
those search implementations into the plugin, to allow more efficient
implementations, or implementations that don't have the whole tree in
memory all the time.
2011-09-10 07:58:43 +02:00
Max Kellermann
7cc6b63aac database: move code to db_save.c 2011-09-10 07:48:05 +02:00
Max Kellermann
6a6f28668f dbUtils: move code to db_print.c 2011-09-06 00:03:51 +02:00
Max Kellermann
3d3bca5338 decoder/oggflac: delete this obsolete plugin
libOggFLAC has been deprecated for 5 years now, and we havn't been
testing it for a long time.  Let's delete it.
2011-09-01 19:29:04 +02:00
Max Kellermann
6a3008d7ff Merge branch 'v0.16.x'
Conflicts:
	configure.ac
	src/output_control.c
2011-09-01 19:19:42 +02:00
Max Kellermann
53ac72a878 Makefile.am: use AVAHI_CFLAGS, AVAHI_LIBS
Don't add those to MPD_CFLAGS / MPD_LIBS.
2011-09-01 10:09:46 +02:00
Max Kellermann
395191bd75 rtsp_client: use the I/O thread
Make the code portable.
2011-08-31 08:32:09 +02:00
Max Kellermann
293836494d output_control: move code to audio_output_destruct()
.. and destruct the output object properly in test/run_output.
2011-08-30 22:28:15 +02:00
Max Kellermann
74a39c715b ntp_server: move code to udp_server.c 2011-08-30 07:39:05 +02:00
Max Kellermann
195496333b output/raop: move RTSP client code to rtsp_client.c
Restore some of the original file structure from from raop_play.
2011-08-29 11:27:08 +02:00
Max Kellermann
9ccaa90439 ntp_server: use the I/O thread 2011-08-29 11:23:51 +02:00
Max Kellermann
a97ddc8cb9 test/run_ntp_server: quit on SIGINT or SIGTERM
Clean up the process before exiting.
2011-08-29 10:18:54 +02:00
Max Kellermann
453368078b configure.ac: add OpenSSL check for RAOP output plugin
Auto-enable the plugin when OpenSSL was found.
2011-08-29 09:39:03 +02:00
Max Kellermann
6e3b643bdf ntp_server: add debug program "run_ntp_server" 2011-08-29 09:39:03 +02:00
Max Kellermann
8a63c27925 output/raop: move NTP code to separate library 2011-08-28 16:44:12 +02:00
Max Kellermann
3b9ffea36f input/soup: new input plugin based on libsoup
To demonstrate the new I/O thread.  libsoup is well-integrated into
the GLib main loop, which made this plugin pretty easy to write.

As a side effect, we have to initialize the I/O thread in all debug
programs that use the input API.
2011-08-24 03:33:49 +02:00
Max Kellermann
e242f3999c io_thread: new thread for non-blocking background I/O
Try to eliminate the remaining blocking I/O.
2011-08-24 02:55:05 +02:00
Max Kellermann
b159bc0c5f queue: implement song "priorities"
Sorts remaining songs by priority.  This can be used for the
much-demanded "queue feature".
2011-07-19 00:34:33 +02:00
Max Kellermann
531c0067ec Makefile.am: distribute client_idle.h 2011-06-03 17:27:43 +02:00
Simon Kagstrom
be798998bf build: Add despotify to build system 2011-03-29 17:01:16 +02:00
Max Kellermann
0c9fc2f809 Merge commit 'release-0.16.2'
Conflicts:
	Makefile.am
	NEWS
	configure.ac
2011-03-19 09:58:07 +01:00
Hans-Kristian Arntzen
1a954748a0 RoarAudio output plugin 2011-03-16 17:57:47 +01:00
Max Kellermann
e257484870 Makefile.am: distribute test/stdbin.h 2011-02-18 08:19:37 +01:00
Max Kellermann
906efdd320 Makefile.am: compile test/run_encoder with ENCODER_CFLAGS 2011-02-13 23:22:57 +01:00
Max Kellermann
f8b09c194f protocol: support client-to-client communication 2011-01-29 10:43:54 +01:00
Dustin Puckett
79e0db4ca0 output/raop: new output plugin
Remote Audio Output Protocol (RAOP), for Apple devices.
2011-01-28 21:17:09 +01:00
Max Kellermann
2b29ca796e Merge commit 'release-0.16.1'
Conflicts:
	NEWS
2011-01-10 11:47:14 +01:00
Yuriy Kaminskiy
77d71c4ee6 Makefile.am: resolve modplug vs. libsndfile cflags/headers conflict
A bit of automake magic (see info automake "Per-Object Flags").
Compile-tested.
2011-01-09 18:21:27 +01:00
Max Kellermann
b8fe2c74bc Makefile.am: generate doxygen.conf
Don't create a modified copy for out-of-tree builds.
2010-12-24 00:25:31 +01:00
Max Kellermann
0958ed5844 utils: move string_array_contains() to string_util.c 2010-12-23 16:23:04 +01:00
Max Kellermann
e3cba18532 decoder: new "pcm" decoder plugin
Just there to support the "cdio_paranoia" input plugin.
2010-12-22 09:48:48 +01:00
Max Kellermann
9bf7fde49f configure.ac: hook the cdio_paranoia input plugin 2010-12-22 09:44:02 +01:00
Max Kellermann
f6bbe1332f replay_gain_ape: parse replay gain from APE tags
Based on the APE reader.
2010-11-18 22:26:06 +01:00