Commit Graph

28 Commits

Author SHA1 Message Date
Max Kellermann
754f26a97c input_stream: non-blocking I/O
Add GMutex, GCond attributes which will be used by callers to
conditionally wait on the stream.

Remove the (now-useless) plugin method buffer(), wait on GCond
instead.  Lock the input_stream before each method call.  Do the same
with the playlist plugins.
2011-09-16 21:22:13 +02:00
Simon Kagstrom
77b6e27500 playlist: Despotify plugin: Correct init in daemon mode
There is a global despotify session, so it should not be initialized
until needed.
2011-04-12 07:28:00 +02:00
Jonathan Neuschäfer
6d3ed3f16f fix common misspellings
These fixes were mostly generated with `codespell' [0] and manually
reviewed.

[0] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
2011-03-31 21:46:01 +02:00
Simon Kagstrom
a25743875f playlist: Add despotify playlist plugin
For spotify playlists or tracks. Uses a spt uri, so with mpc you can
add playlists with

  mpc load spt://spotify:user:simon.kagstrom:playlist:3SUwkOe5VbVHysZcidEZtH
2011-03-29 17:01:16 +02:00
Max Kellermann
c6cbcc2c25 copyright year 2011 2011-01-29 10:13:54 +01:00
Max Kellermann
5462f34ed0 string_util: add function strchug_fast()
Replace g_strchug() calls with a cheaper implementation.
2010-12-23 16:23:20 +01:00
Max Kellermann
188e1b440e playlist/rss: new playlist plugin for RSS feeds 2010-10-11 20:33:41 +02:00
Max Kellermann
1ea10db953 playlist/cue: last track ends at end of file
libcue's track_get_length() returns 0 for the last track, because that
information is not available in the CUE sheet.  This makes MPD quit
playing the last track immediately.  If we set "song.end_ms=0", MPD
will play the track until the end of the song file, which is what we
want.
2010-06-25 20:02:55 +02:00
Orivej Desh
50c0c4b701 cue: fix code style 2010-04-01 08:12:25 +02:00
Orivej Desh
635791d1cd cue: prepend pregap to the beginning of the track
.. rather then append to the end of the previous one

Cuebreakpoints from the cuetools package has three modes of operation,
and the default is to append pregap (INDEX 00) to the end of the
previous track. This is the behavior most compliant to the existing
cue files.

Here is the patch which fixes the issue. I borrowed bits of
implementation from cuebreakpoints. I assumed that the whole audio
file must be covered by head-to-head going tracks, which is how
hardware CD players probably work. In cue_tag I changed rounding from
rounding up to rounding down because the thing in mpd which calculates
actual track duration (and current position) rounds it down, and I
didn't want to see in my playlist values different from whose in a
now-playing progress bar.

I've compared the resultant mpd behaviour with "mplayer -ss MM:SS.MS"
where the time was supplied by cuebreakpoints and noticed that mplayer
started each track a bit earlier then mpd, though this was the same
before the patch.
2010-03-28 19:34:16 +02:00
Max Kellermann
030e61115c playlist: added a FLAC playlist plugin
This playlist plugin handles FLAC files with embedded CUE sheets.
2010-01-06 08:50:52 +01:00
Max Kellermann
d3b763a48c input_stream: return allocated input_stream objects
Major API redesign: don't let the caller allocate the input_stream
object.  Let each input plugin allocate its own (derived/extended)
input_stream pointer.  The "data" attribute can now be removed, and
all input plugins simply cast the input_stream pointer to their own
structure (with an "struct input_stream base" as the first attribute).
2010-01-01 17:25:07 +01:00
Avuton Olrich
9d3865cb95 Update copyright notices. 2009-12-31 20:58:43 -08:00
Max Kellermann
bb4cef6a93 playlist/cue: fill song.start_ms, .end_ms
This patch adds practical usefulness to the CUE playlist plugin.
2009-12-27 16:08:53 +01:00
Max Kellermann
554b2b0ed9 playlist/cue: return the original song URI
The caller should be responsible for building the absolute URI.
2009-12-27 14:17:21 +01:00
Max Kellermann
3679d5bd7a playlist: added CUE playlist plugin
This plugin is the groundwork for MPD's future generic CUE sheet
support.  That's not complete yet, e.g. there is no way for a playlist
plugin to address an arbitrary position within a music file.
2009-12-16 22:19:01 +01:00
Max Kellermann
228b03edf8 input_stream: return errors with GError 2009-12-15 23:12:11 +01:00
Max Kellermann
5b82ffc291 include config.h in all sources
After we've been hit by Large File Support problems several times in
the past week (which only occur on 32 bit platforms, which I don't
have), this is yet another attempt to fix the issue.
2009-11-12 09:17:03 +01:00
Max Kellermann
84917721c7 moved GLib compatibility code to glib_compat.h 2009-11-10 21:07:54 +01:00
Max Kellermann
f3203b5de5 playlist: added extm3u plugin
This new plugin parses extm3u files.  Files without the "#EXTM3U"
header are still parsed by the plain old "m3u" plugin.
2009-11-06 00:41:42 +01:00
Max Kellermann
65e56ff829 playlist/{m3u,pls}: removed URI checks
The caller is responsible for verifying the song URI.
2009-11-06 00:36:32 +01:00
Max Kellermann
294aaf7a90 playlist: new ASX playlist plugin
Based on the XSPF playlist plugin.
2009-10-21 23:39:47 +02:00
Max Kellermann
2024763d2a playlist/xspf: ignore text in root, playlist, tracklist
Added a missing "break".
2009-10-21 23:27:05 +02:00
Qball Cow
f4ea9b7393 Add PLS Parser 2009-10-15 00:08:06 +02:00
Max Kellermann
f122e6d456 playlist: added plugin for last.fm radio
This plugin will replace the last.fm input plugin, once the playlist
API is integrated into MPD.
2009-10-13 16:32:10 +02:00
Max Kellermann
8391ac4cc8 playlist: added XSPF plugin 2009-10-13 16:31:07 +02:00
Max Kellermann
767e27c8f0 playlist/m3u: added plugin name 2009-10-13 16:13:36 +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