| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
If left uninitialized, then the decoder thread quits spuriously.
|
|
|
|
| |
These two variables are redundant, we need only one of them.
|
|
|
|
|
|
| |
This is only a slight change to the previous locking behaviour: keep
the decoder unlocked during the loop, and lock it only while checking
decoder_control.command.
|
|
|
|
|
| |
Return the result to the caller more quickly. This unifies error
handling: no error can be reported before the command is finished.
|
|
|
|
| |
They are just informational.
|
|
|
|
|
| |
Allocate a decoder_control object where needed, and pass it around.
This will allow more than one decoder thread one day.
|
|
|
|
|
|
| |
Use GMutex/GCond instead of the notify library. Manually lock the
player_control object before accessing the protected attributes. Use
the GCond object to notify the player thread and the main thread.
|
|
|
|
|
| |
Try to be as portable as possible, use GLib path name functions and
macros.
|
|
|
|
|
| |
The while() clause resets the "plugin" variable. We don't need to
reset it at the end of the loop body.
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
NEWS
configure.ac
|
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
| |
Replace decoder_control.notify with decoder_control.mutex and
decoder_control.cond. Lock the mutex on all accesses to
decoder_control.command and decoder_control.state.
|
|
|
|
|
|
|
|
|
| |
When decoding a local file, the decoder thread tries to run all
matching decoders, until one succeeds. Both file_decode() and
stream_decode() can decode a stream, but MPD closes the stream before
calling file_decode(). Problem is: when this decoder fails, and the
next's stream_decode() method is invoked, the input_stream is still
closed. This patch reopens it.
|
|
|
|
|
|
| |
When a new song starts playing, send its tag (song->tag) to the music
pipe. This allows output plugins to render tags for all songs, not
only those with embedded tags understood by the decoder plugin.
|
|
|
|
| |
Use GLib the logging functions g_debug(), g_error() instead.
|
|
|
|
|
|
|
|
| |
This updates the copyright header to all be the same, which is
pretty much an update of where to mail request for a copy of the GPL
and the years of the MPD project. This also puts all committers under
'The Music Player Project' umbrella. These entries should go
individually in the AUTHORS file, for consistancy.
|
|
|
|
|
|
|
|
| |
Turn the music_pipe into a simple music_chunk queue. The music_chunk
allocation code is moved to music_buffer, and is now managed with a
linked list instead of a ring buffer. Two separate music_pipe objects
are used by the decoder for the "current" and the "next" song, which
greatly simplifies the cross-fading code.
|
|
|
|
|
|
|
| |
Added music_pipe_allocate(), music_pipe_push() and
music_pipe_cancel(). Those functions allow the caller (decoder thread
in this case) to do its own chunk management. The functions
music_pipe_flush() and music_pipe_tag() can now be removed.
|
|
|
|
|
| |
"ls" is a bad name for a library which parses URIs. We'll move the
rest of the "ls" library later.
|
|
|
|
| |
Minimize header dependencies, again.
|
|
|
|
|
| |
Increase code readability, always use the wrapper functions instead of
calling the plugin method pointers directly.
|
|
|
|
|
| |
By accident, I committed a debug flag, which disallowed the decoder
thread to play files locally. Undo this hunk.
|
|
|
|
|
|
|
| |
The open_stream() method opens the input_stream. This allows the
archive plugin to do its own initialization, and it also allows it to
use input_stream.data. We can remove input_stream.archive now, which
was unnatural to have in the first place.
|
|
|
|
|
| |
decoder_control.thread contains the handle of the decoder thread, or
NULL if the decoder thread isn't running.
|
|
|
|
|
| |
Free memory allocated by libsamplerate when the output or the decoder
is closed.
|
|
|
|
|
| |
GLib mandates that you initialize all GError objects with NULL prior
to passing it.
|
| |
|
| |
|
|
|
|
|
| |
Don't include headers which are not used. Fix some includes in
decoder_thread.c.
|
|
|
|
|
| |
The tag() method reads a tag from the stream. This replaces the
meta_name and meta_title attributes.
|
|
|
|
| |
Don't use fixed stack buffers.
|
| |
|
| |
|
|
|
|
|
|
| |
When MPD exits, it should manually free all resources in use, to allow
easy memory leak debugging. Make the decoder thread terminate during
that.
|
| |
|
| |
|
|
|
|
|
|
| |
While waiting for the input stream to become ready, ignore all
commands except STOP. This fixes seeking errors with (remote) songs
which the decoder has already finished.
|
|
|
|
|
| |
decoder_file_decode() should check for plugin->file_decode, not
plugin->stream_decode().
|
|
|
|
|
|
|
|
| |
The stream_decode() and file_decode() methods returned a boolean,
indicating whether they were able to decode the song. This is
redundant, since we already know that: if decoder_initialized() has
been called (and dc.state==DECODE), the plugin succeeded. Change both
methods to return void.
|
|
|
|
|
|
| |
Instead of having a seprate try_decode() method, let the
stream_decode() and file_decode() methods decide whether they are able
to decode the song.
|
|
|
|
| |
When a plugin is unable to decode a song, try the other plugins.
|
|
|
|
| |
Added lots of assertions to the wrapper functions.
|
|
|
|
|
|
| |
The player did not care about the exact error value, it only checked
whether an error has occured. This could fit well into
decoder_control.state - introduce a new state "DECODE_STATE_ERROR".
|
|
|
|
| |
decoder.plugin was a write-only attribute.
|
|
|
|
|
| |
Instead of checking the stream_types bit set, we can simply check
whether the methods stream_decode() and file_decode() are implemented.
|
|
|
|
| |
dc.error wasn't updated when the input stream failed to initialize.
|
|
|
|
| |
Renamed variables and functions.
|
|
|
|
|
|
|
|
|
|
| |
If an input stream provides tags (e.g. from an icecast server), send
them in the decoder_data() and decoder_tag() methods. Removed the
according code from the mp3 and oggvorbis plugins - decoders shouldn't
have to care about stream tags.
This patch also adds the missing decoder_tag() invocation to the mp3
plugin.
|
|
|
|
|
|
|
|
|
| |
The try_decode() method may have read some data from the stream, which
is now lost. To make this data available to other methods, get it
back by rewinding the input stream after each try_decode() invocation.
The ogg and wavpack plugins did this manually and inconsistently; this
code can now be removed.
|
| |
|