Commit Graph

5878 Commits

Author SHA1 Message Date
Max Kellermann
53174ea45f input/soup: fix "unused local variable" warnings 2011-09-16 09:10:33 +02:00
Max Kellermann
87b624f5d5 Merge branch 'v0.16.x' 2011-09-16 07:52:39 +02:00
Max Kellermann
443e96381a configure.ac: disable assertions in the non-debugging build
Add -DNDEBUG to AM_CPPFLAGS.
2011-09-16 07:41:41 +02:00
Max Kellermann
1cbba4fc59 input/curl, output/pulse: fix "unused local variable" warnings 2011-09-16 07:41:41 +02:00
Max Kellermann
344b6dd179 configure.ac: enable -Werror for C++ 2011-09-16 07:38:00 +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
e1efc71ad3 input_stream: add "nonnull" attributes 2011-09-15 22:40:44 +02:00
Max Kellermann
f804a739b1 Merge branch 'v0.16.x'
Conflicts:
	NEWS
	configure.ac
2011-09-15 21:48:33 +02:00
Max Kellermann
2ed870c854 decoder/ffmpeg: flush the codec after seeking
Let the codec start with fresh buffers.  This should fix the remaining
seeking issues.
2011-09-15 21:41:25 +02:00
Max Kellermann
ce35ba9ac9 decoder/ffmpeg: explicitly specify the current stream for seeking
Use AVStream.time_base to convert the decoder_seek_where() value, and
pass the current stream number to av_seek_frame().
2011-09-15 21:35:29 +02:00
Max Kellermann
724a59aaf7 decoder/ffmpeg: don't require key frame for seeking
Use flag AV_TIME_BASE.
2011-09-15 21:32:29 +02:00
Max Kellermann
42d8c2981f decoder/ffmpeg: higher precision timestamps 2011-09-15 21:30:27 +02:00
Max Kellermann
9aa91e0f17 decoder/ffmpeg: move formula to time_from_ffmpeg() 2011-09-15 21:23:48 +02:00
Max Kellermann
5aabee8996 decoder/ffmpeg: add local variable "av_stream"
Code simplification.
2011-09-15 21:14:53 +02:00
Max Kellermann
48a84ca23e input/rewind: copy the MIME type only once
Reduce heap usage by reducing the number of malloc() / free() calls.
2011-09-15 20:24:15 +02:00
Max Kellermann
8751783a1b input/curl: per-request mutex/cond
The global data structures are now lock-free, because they are
accessed only from the I/O thread.  By using per-request locks, we
have finer grained locking, preparing for locks shared with the
client.
2011-09-15 10:24:50 +02:00
Max Kellermann
3a2ec50d5f input/curl: move all libCURL calls to the I/O thread
This adds some overheads for indirect calls to the I/O thread, but
reduces the amount of global locks.  Next step will be switching to
per-request locks.
2011-09-15 09:48:36 +02:00
Max Kellermann
ce9aeed4cb input/file: return NULL instead of "false" 2011-09-15 09:48:36 +02:00
Max Kellermann
f2be6432a9 Makefile.am: allow out-of-tree sparse call 2011-09-15 09:48:36 +02:00
Max Kellermann
e96f8c0444 input/curl: don't set "ready" on _easy_free()
Move the assignment to _request_done(), right before the GCond is
signalled.  This might fix spurious wakeups.
2011-09-15 09:27:16 +02:00
Max Kellermann
2bf3bc3e10 input/curl: add assertions on io_thread_inside() 2011-09-15 09:27:15 +02:00
Max Kellermann
28143f86f9 input/curl: merge _request_abort() into _request_done()
This is a trivial function.  Merge some duplicate code, e.g. the
g_cond_broadcast() call.
2011-09-15 09:27:13 +02:00
Max Kellermann
76ec3d3248 udp_server: disable -Wmissing-field-initializers 2011-09-15 09:25:53 +02:00
Max Kellermann
d0c85a5a96 gcc.h: add macro GCC_CHECK_VERSION 2011-09-15 09:22:48 +02:00
Max Kellermann
46ed717af4 input/curl: API documentation fix 2011-09-15 06:44:20 +02:00
Max Kellermann
ad37c88f80 input_plugin: add method update()
Update the struct attributes, important for facades like the "rewind"
plugin.  To replace buffer().
2011-09-14 22:25:29 +02:00
Max Kellermann
8c6e8a6eb8 input_internal: add assertions 2011-09-14 22:06:57 +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
c344d63fb3 decoder_internal: don't call input_stream_buffer()
This is not necessary since all relevant input plugins have been moved
to the I/O thread, and there is no remaining useful buffer()
implementation.  This also fixes a busy loop when playing radio.
2011-09-14 09:41:27 +02:00
Max Kellermann
62557f4d6b test/read_tags: initialize the tag_pool library 2011-09-13 22:46:47 +02:00
Max Kellermann
9c46cc4ea0 test/read_tags: call g_thread_init()
Needed for the I/O thread.
2011-09-13 22:42:21 +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
c779e2674a db_visitor: add method playlist() 2011-09-13 22:02:37 +02:00
Max Kellermann
a94d4be466 db_plugin: add method visit() 2011-09-13 21:47:00 +02:00
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