| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replaced all occurrences of g_error() with MPD_ERROR() located in a new header
file 'mpd_error.h'. This macro uses g_critical() to print the error message
and then exits gracefully in contrast to g_error() which would internally call
abort() to produce a core dump.
The macro name is distinctive and allows to find all places with dubious error
handling. The long-term goal is to get rid of MPD_ERROR() altogether. To
facilitate the eventual removal of this macro it was added in a new header
file rather than to an existing header file.
This fixes #2995 and #3007.
|
| |
|
|
|
|
|
| |
Adds mixrampdb and mixrampdelay commands. Reads MIXRAP_START and
MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
|
|
|
|
|
|
|
| |
Apply the replay gain in the output thread. This means a new setting
will be active instantly, without going through the whole music pipe.
And we might have different replay gain settings for each audio output
device.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When all plugins have failed, MPD used to fall back to the "mad"
decoder plugin, to handle those radio streams without a Content-Type
response header. This however leads to unexpected results (garbage
being played) when the stream isn't really mp3. Since we care little
about "bad" streams, we shouldn't have hacks which have bad side
effects.
Let's get rid of this hack now! Only try to "mad" plugin if there was
no match at all (Content-Type, path suffix) and no other plugin has
been tried.
|
|
|
|
| |
Manage a linked list of plugins which were already tried.
|
| |
|
| |
|
|
|
|
|
| |
The replay_gain_state struct holds the precalculated scale factor,
which is removed from struct replay_gain_info.
|
|
|
|
|
|
| |
This function replaces the replay_gain_info parameter for
decoder_data(). This allows the decoder to announce replay gain
changes, instead of having to pass the same object over and over.
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
|
| |
Remove the data_time parameter from decoder_data(). This patch
eliminates the timestamp counting in most decoder plugins, because the
MPD core will do it automatically by default.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
An input_stream_close() call was missing after today's code
reorganization.
|
|
|
|
|
| |
Before calling the plugin's decode method, we should ensure that we
didn't receive a STOP command during initialization.
|
|
|
|
|
|
| |
This function opens the stream and waits for it to become ready;
meanwhile it checks for STOP commands. It is code moved from
decoder_run_stream().
|
|
|
|
| |
Simplify the expressions.
|
|
|
|
| |
Remove the static integer hack, that's not thread safe and sucks.
|
|
|
|
|
|
| |
Moved the global input stream opener to decoder_run_stream().
decoder_run_file() now opens the input stream each time a plugin
provides a stream decoder method.
|
|
|
|
| |
Tame the large decoder_run_song() function.
|
|
|
|
| |
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.
|
| |
|