Commit Graph

4672 Commits

Author SHA1 Message Date
Max Kellermann eea4edd92c test/dump_playlist: parse a configuration file 2009-10-13 16:20:21 +02:00
Max Kellermann cb331ae436 playlist_list: pass configuration to playlist plugins
This patch completes the configuration support.
2009-10-13 16:19:21 +02:00
Max Kellermann 767e27c8f0 playlist/m3u: added plugin name 2009-10-13 16:13:36 +02:00
Max Kellermann e78370e050 playlist_list: initialize the "playlist" variable
Prevent access on uninitialized variable if the plugin list is empty.
2009-10-13 16:13:33 +02:00
Max Kellermann ea616b3ed4 tag: removed the "_ITEM_" suffix from the enum names 2009-10-13 16:12:45 +02:00
Max Kellermann a9dc0e816c state_file: use g_timeout_add_seconds() 2009-10-13 16:12:44 +02:00
Max Kellermann 4390d72b14 configure.ac: require GLib 2.16
Accidently, MPD has been using several GLib 2.16 functions for a
while, and nobody noticed yet.  To simplify the code base, let's bump
the minimum GLib version for MPD to 2.16.  That version is old enough,
and it's reasonable to expect users to have it.
2009-10-13 16:12:43 +02:00
Max Kellermann 2bf740fc71 playlist_plugin: new plugin API for playlist parsers
Based on this API, we will add parsers for EXTM3U, PLS, ASX, last.fm
radio and others.

There is no integration into the MPD core yet.  Right now, we have a
command line test program.  This is work in progress.
2009-10-12 22:34:04 +02:00
Max Kellermann dbb1e732b8 text_input_stream: input_stream wrapper for reading text files 2009-10-12 22:30:59 +02:00
Max Kellermann 7ec503c4ec song: moved code to song_update.c
Moved all the code which depends on the decoder plugins to a separate
source.  That allows leaner test programs.
2009-10-12 22:30:50 +02:00
Max Kellermann a07ab27dae decoder_thread: removed redundant NULL assignments
The while() clause resets the "plugin" variable.  We don't need to
reset it at the end of the loop body.
2009-10-11 23:44:21 +02:00
Max Kellermann 727c301fbc input_stream: use "goffset" instead of "off_t"
The "off_t" type may change when you enable or disable large file
support on 32 bit platforms.  This caused severe ABI problems within
MPD when we enabled LFS for the first time: two sources included
config.h and sys/types.h in different order, and had different off_t
sizes - leading to memory corruption because of ABI incompatibility.
This patch attempts to get rid of all public "off_t" uses: it removes
"off_t" from the input_stream ABI/API, and switches to GLib's 64 bit
"goffset" type.  This may hurt 32 bit embedded platforms a tiny bit,
but that's not even measurable.
2009-10-11 23:32:22 +02:00
Max Kellermann 71f881d5cb Merge branch 'v0.15.x'
Conflicts:

	NEWS
	configure.ac
2009-10-11 23:25:27 +02:00
Max Kellermann 9a3f5ff977 riff, aiff: fixed "limited range" gcc warning
On 32 bit systems with large file support enabled (i.e. "sizeof(off_t)
> sizeof(size_t)") gcc emits a warning because a size_t cast to off_t
can never become negative.
2009-10-11 23:15:38 +02:00
Max Kellermann a1d868eb56 decoder_thread: change the fallback decoder name to "mad"
When there is no Content-Type response header, try the "mad" decoder
plugin.  It uesd to be named "mp3", and we forgot to change the
fallback name in decoder_thread.c.
2009-10-11 23:14:16 +02:00
Max Kellermann af92b1c2d8 input/curl: don't abort if a packet has only metadata
When a received chunk of data has only icy-metadata, there was no
usable data left for input_curl_read() to return, and thus it returned
0 bytes.  "0" however is a special value for "end of file" or
"error".  This patch makes input_curl_read() read more data from the
socket, until the read request can be fulfilled (or until there's
really EOF).
2009-10-11 23:13:49 +02:00
Max Kellermann 016558093b input/curl: moved code to fill_buffer() 2009-10-11 23:09:38 +02:00
Avuton Olrich d4e3fb4330 configure: Fix up the recorder plugin configure. 2009-10-10 11:36:22 -07:00
Max Kellermann 57f69a2915 doc/protocol.xml: "addid" with negative position is deprecated 2009-10-09 10:18:02 +02:00
Max Kellermann 448aefaace player_thread: get "elapsed" from audio outputs
Tracking the "elapsed" time from the chunks which we have sent to the
output pipe is very imprecise: since we have implemented the music
pipe, we're sending large number of chunks at once, giving the
"elapsed" time stamp a resolution of usually more than a second.

This patch changes the source of this information to the outputs.  If
a chunk has been played by all outputs, the "elapsed" time stamp is
updated.

The new command PLAYER_COMMAND_REFRESH makes the player thread update
its status information: it tells the outputs to update the chunk time
stamp.  After that, player_control.elapsed_time is current.
2009-10-08 22:09:25 +02:00
Max Kellermann 47b5e73a15 player_thread: always clear player_control.next_song on return
pc.next_song might be non-NULL even if player.queued==true: when the
decoder has started decoding the next song, but the result hasn't been
read yet.
2009-10-08 22:09:25 +02:00
Max Kellermann d6a6f428b3 player_control: eliminate PLAYER_COMMAND_PLAY
Sending PLAYER_COMMAND_STOP followed by PLAYER_COMMAND_QUEUE does the
same.  PLAYER_COMMAND_PLAY is redundant.
2009-10-08 21:22:31 +02:00
Max Kellermann fd3934b849 player_control: added several assertions on pc.next_song==NULL
After some of the commands, the player thread must have reset the
pc.next_song attribute.
2009-10-08 21:17:00 +02:00
Max Kellermann e5857cb722 player_control: no CamelCase 2009-10-08 21:12:57 +02:00
Max Kellermann 2ec89c6304 player_control: clear errored_song in clearPlayerError()
Without the player error code, it errored_song variable is not used,
and should be cleared, to avoid invalid access in pc_song_deleted().
2009-10-08 21:00:16 +02:00
Max Kellermann 76953a9748 player_control: bundle "get" functions in pc_get_status()
The new player_status struct replaces a bunch of playerGetX()
functions.  When we add proper locking to the player_control struct,
we will only need to lock once for the "status" command.
2009-10-08 20:48:07 +02:00
Max Kellermann 128a5fa4a5 player_control: allocate getPlayerErrorStr() result
This lets us eliminate the static fixed-size buffer.
2009-10-08 20:45:38 +02:00
Max Kellermann a5960c20cc playlist_control: "previous" really plays the previous song
No more CD player emulation.  The current behaviour of "previous" is
difficult for a client to predict, because it does not definitely know
the current position within the song.  If a client wants to restart
the current song, it can always send "playid".
2009-10-08 20:33:50 +02:00
Max Kellermann aa71ce4cd5 input_stream: include config.h for AC_SYS_LARGEFILE macros
AC_SYS_LARGEFILE defines macros for config.h.  If we don't include
config.h, we don't get large file support.
2009-10-08 16:57:55 +02:00
Max Kellermann 16c981d425 decoder_api: document all function parameters 2009-10-08 15:39:45 +02:00
Alam Arias 81e56705ad configure.ac: build with large file support by default
This fixes mpg123 support.
2009-10-08 15:24:59 +02:00
Max Kellermann ecb118f1ed state_file: save only if something has changed
If nothing has changed since the last save, don't save the state
file.  Saving will spin up the hard drive, which is undesirable on
hosts where MPD is idling in background.
2009-10-08 15:22:39 +02:00
Max Kellermann 1e663b1869 output_state: no CamelCase 2009-10-06 10:30:10 +02:00
Max Kellermann 7013f9fc31 Merged release 0.15.4 from branch 'v0.15.x'
Conflicts:
	NEWS
	configure.ac
2009-10-03 16:17:02 +02:00
Avuton Olrich d6d4de1123 Modify version string to post-release version 0.15.5~git 2009-10-03 05:44:26 -07:00
Avuton Olrich 325e380b8e mpd version 0.15.4 2009-10-03 05:44:26 -07:00
Max Kellermann 31cabc751d command: range support for "delete" 2009-09-30 23:13:13 +02:00
Max Kellermann 0478a8e288 playlist_edit: moved code to playlist_delete_internal() 2009-09-30 23:10:15 +02:00
Max Kellermann 65693d057b decoder/ffmpeg: use the "artist" tag if "author" is not present
Usually, we read our "artist" tag from ffmpeg's "author" tag.  In some
cases however (e.g. APE), this tag is named "artist".  This patch
implements a fallback: if no "author" is found, MPD tries to use
"artist".
2009-09-30 15:41:43 +02:00
Max Kellermann b0f9a1454a decoder/faad: skip assertion failure on large ID3 tags
When the ID3 tag in an AAC file is larger than the current buffer, the
function decoder_buffer_consume() aborts.  By using the new function
decoder_buffer_skip() instead, we can safely skip the ID3 tag.
2009-09-30 15:22:47 +02:00
Max Kellermann efb290073b decoder_buffer: added function decoder_buffer_skip() 2009-09-30 15:22:36 +02:00
Tony 1039d57251 Add the sidplay filter param to doc/mpdconf.example. 2009-09-28 11:59:55 +02:00
Tony 934a38f976 Make the sidplay decoder filter configurable. 2009-09-28 11:59:55 +02:00
Max Kellermann 8f261af5c1 automatically update the database with Linux inotify
This patch implements a light-weight inotify library, and watches all
directories below the music directory.  It updates all directories
where files changed after a delay of 5 seconds.
2009-09-25 18:32:00 +02:00
Max Kellermann 3e8bdb9384 update: added missing stdbool.h include 2009-09-25 16:43:33 +02:00
Max Kellermann 7542ec4f20 command: relax requirements for unquoted words
Allow most printable characters in unquoted words.  The tokenizer
patch introduced very strict requirements for command parameters -
those were undocumented, and we're reverting the strictness now.
2009-09-25 00:53:15 +02:00
Max Kellermann 89ba540e6d command: added command "rescan"
"rescan" is the same as "update", but it discards existing songs in
the database.
2009-09-24 21:55:40 +02:00
Max Kellermann 47ab2ad6f3 configure.ac: rename HAVE_CURL to ENABLE_CURL 2009-09-24 21:40:07 +02:00
Max Kellermann 06d5d4b03e conf: handle fatal errors with GError
Don't call g_error(), which will abort the process and dump core.

This patch does not affect all the config_get_X() functions.  These
need some more refactoring.
2009-09-24 21:40:07 +02:00
Max Kellermann f3739a73af conf: splitted function config_param_free() 2009-09-24 21:40:05 +02:00