Commit Graph

5844 Commits

Author SHA1 Message Date
Max Kellermann
b7d2d4cfe8 database: don't allow uri==NULL
Add nonnull attributes and fix all callers.
2011-09-13 21:39:07 +02:00
Max Kellermann
a6c797ee4b gcc.h: add macro gcc_nonnull 2011-09-13 21:38:27 +02:00
Max Kellermann
3e40b2249f gcc.h: change "mpd_" prefix to "gcc_"
This is specific to gcc, not to mpd.
2011-09-13 21:37:33 +02:00
Max Kellermann
2fe1b5034d db_plugin: add method get_song()
New db_get_song() implementation.
2011-09-13 21:01:35 +02:00
Max Kellermann
b4430839a3 database: generate GError when database is disabled 2011-09-13 20:54:27 +02:00
Max Kellermann
412cf974a4 directory: don't visit "self" in _walk()
Let the caller decide if the current directory should be visited.
2011-09-13 20:44:35 +02:00
Max Kellermann
3fc6beeff0 locate: remove unused function locate_item_new() 2011-09-13 20:44:00 +02:00
Max Kellermann
2ff35c8bfa directory: don't require a "directory" visitor
.. to recurse.  A visitor may not have one, but still be interested in
a recursive search.
2011-09-13 20:44: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
ca419c84b8 stored_playlist: return GError, code is playlist_result
Improve error reporting and handling.  command.c gets the new function
print_error(), which sends a GError to the client.
2011-09-11 07:57:50 +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
14d573cbf1 playlist: move PLAYLIST_COMMENT to stored_playlist.c
Only used there.
2011-09-11 07:55:19 +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
4af6362751 directory_save: pass const pointer to _save() 2011-09-10 07:48:05 +02:00
Max Kellermann
d54075197f tag_internal: add missing tag.h include
For TAG_NUM_OF_ITEM_TYPES.
2011-09-10 07:48:05 +02:00
Max Kellermann
5cce56199b conf: export config_param_free() 2011-09-09 23:59:46 +02:00
Max Kellermann
3cc12817f6 conf: _get_next_param() returns a const pointer
No writers.
2011-09-09 23:59:46 +02:00
Max Kellermann
68875ba600 database: return GError on failure 2011-09-09 23:28:27 +02:00
Max Kellermann
c345c5ebae .gitignore: add doxygen.conf 2011-09-09 23:21:20 +02:00
Max Kellermann
2119a16e24 .gitignore: add doxygen.conf 2011-09-09 23:04:32 +02:00
Max Kellermann
9f5c938ff3 conf: add config_dup_block_path() 2011-09-09 23:01:22 +02:00
Max Kellermann
b42a8d2364 utils: parsePath() returns GError on failure
Better error messages.
2011-09-09 22:55:57 +02:00
Max Kellermann
61fc01e79e utils: pass a const string to parsePath()
Remove the slash hack, allocate memory for the user name.
2011-09-09 22:55:57 +02:00
Max Kellermann
cceaec1d74 utils: eliminate local variable "pos"
Just advance the "path" pointer.
2011-09-09 22:55:57 +02:00
Max Kellermann
8e5f9c8160 conf: turn config_get_path() into config_dup_path()
config_get_path() was somewhat flawed, because it pretended to be a
function, when it really had a side effect.  The second flaw was that
it did not return the parser error, instead it aborted the whole
process, which is bad style.  The new function returns a duplicated
(modified) string that must be freed by the caller, and returns a
GError on failure.
2011-09-09 22:55:57 +02:00
Max Kellermann
c620fd42f4 glib_compat.h: emulate g_prefix_error() 2011-09-09 22:55:57 +02:00
Max Kellermann
2a859f870a log: print detailed errno message on open() failure 2011-09-09 21:53:42 +02:00
Max Kellermann
b680753db8 log: return GError on initialization failure 2011-09-09 21:53:42 +02:00
Max Kellermann
35af940166 conf: get_block_param() returns a const pointer
No caller needs to write.
2011-09-09 21:36:41 +02:00
Max Kellermann
bc0fec0afe conf: move duplicate check to _read_name_value()
config_add_block_param() cannot fail, which makes it easier to use.
2011-09-09 21:36:41 +02:00
Max Kellermann
e3eca82cc3 conf: move code to config_read_name_value()
Reduce indent.
2011-09-09 21:36:35 +02:00
Max Kellermann
e7651d0d0f conf: add gcc optimization attributes 2011-09-09 21:01:19 +02:00
Max Kellermann
5cf4ce9318 pcm_format: fix 32-to-24 bit conversion (the "silence" bug)
D'oh, we were reading 16 bit integers instead of 32 bit integers!
That caused silence when trying to play a 32 bit input file on a 24
bit sound card (e.g. USB sound chips with 24 bit packed samples).
2011-09-08 23:47:32 +02:00
Max Kellermann
6a6f28668f dbUtils: move code to db_print.c 2011-09-06 00:03:51 +02:00
Max Kellermann
dadf1339b5 dbUtils: pass player_control to findAddIn()
Allow calling findAddIn() without a client object.
2011-09-05 23:14:39 +02:00
Max Kellermann
c2c4228722 Merge commit 'release-0.16.4'
Conflicts:
	NEWS
	configure.ac
2011-09-02 06:38:01 +02:00
Avuton Olrich
5469941f2b Modify version string to post-release version 0.16.5~git 2011-09-01 17:58:29 -07:00
Avuton Olrich
e888c9e827 mpd version 0.16.4 2011-09-01 17:58:28 -07: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
2556449b36 configure.ac: fail if Vorbis was enabled explicitly, but not found
.. and a minor tweak for libFLAC+libogg detection.
2011-09-01 19:02:23 +02:00
Max Kellermann
446f9973cc configure.ac: fail if FLAC was enabled explicitly, but not found 2011-09-01 19:02:22 +02:00
Max Kellermann
596f36bb78 output/osx: don't drain the buffer when closing
Eliminate an unnecessary source of deadlocks.
2011-09-01 18:21:46 +02:00
Max Kellermann
e7abdab58d output/osx: signal the GCond while mutex is locked 2011-09-01 18:21:46 +02:00
Max Kellermann
13cdc9a9f8 configure.ac: auto-detect libmad without pkg-config
The pkg-config file was added by the Debian package maintainers, and
unfortunately, the rest of the world doesn't have it.
2011-09-01 11:06:08 +02:00
Max Kellermann
a1b8806422 configure.ac: fail if libid3tag was enabled explicitly, but not found
Add M4 function MPD_AUTO_PKG_LIB for pkg-config with AC_CHECK_LIB
fallback.
2011-09-01 10:58:36 +02:00
Max Kellermann
e635d47912 configure.ac: use MPD_AUTO_PKG to detect avahi
Don't abort the configure script when avahi could not be
auto-detected.  It previously did, because there was no custom "fail"
action for PKG_CHECK_MODULES.
2011-09-01 10:11:23 +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
2be6184c8d output_all: move _lock_signal() to output_control.c
Better name, better documentation.
2011-09-01 07:59:15 +02:00