| Commit message (Collapse) | Author | Files | Lines |
|
GLib provides the function g_get_filename_charsets() which determines
the file system character set. This changes MPD's fallback: GLib
prefers UTF-8 as a fallback. MPD used to fall back to ISO Latin 1.
|
|
Rename variables and functions.
|
|
Call g_thread_init() from main() to enable the GLib features which
make it thread safe.
|
|
Removed closeAllFDs(). The caller is responsible for closing all file
handles.
|
|
The output thread automatically waits some time before retrying to
open the device. Don't duplicate this check in the pulse plugin.
|
|
The pulse plugin crashed with a segmentation fault when the pulse
server was killed.
|
|
libwavpack expects the read_bytes() stream method to fill the whole
buffer, and fails badly when we return a partial read (i.e. not enough
data available yet). This caused wavpack streams to break.
Re-implement the buffer filling loop.
|
|
The input_stream object is opened and closed by the caller.
|
|
Instead of checking the stream_types bit set, we can simply check
whether the methods stream_decode() and file_decode() are implemented.
|
|
The number of tag types is known at compile time. Use the GLib macro
G_N_ELEMENTS instead of having a NULL element at the end.
|
|
Don't store tag type values in a plain integer, use the proper enum.
|
|
Replace deprecated code with GLib.
|
|
Instead of manually waiting for the input stream to become ready (to
catch server errors), just read the first byte. Since the
wavpack_input has the capability to push back one byte, we can simply
re-feed it. Advantage is: decoder_read() handles everything for us,
i.e. waiting for the stream, polling for decoder commands and error
handling.
|
|
Use boolean true/false instead of 1/0.
|
|
Renamed functions and variables.
|
|
Fixed the indent of the switch statement in format_samples_int().
|
|
Eliminate a superfluous decoder_get_command() call. decoder_data()
already returns the command.
|
|
Removed the duplicate audio_format initialization.
|
|
decoder_read() handles decoder commands, and should be used in decoder
plugins.
|
|
We need the decoder object, so we have to begin passing a new struct
to these callbacks, instead of only the pointer to the input_stream
object.
|
|
Replace deprecated code with GLib.
|
|
The API of mp4_load_tag() was strange: it always returned a tag
object, no matter if a tag was found in the file; the existence of a
tag was indicated with the tag_found integer reference. This flag is
superfluous, since we can simply check whether the tag is empty or
not.
|
|
Allocate the mp4ff_callback_t object on the stack. This is easier to
handle, since we don't have to free it. Incidentally, this fixes a
memory leak in mp4_load_tag().
|
|
Renamed functions and variables.
|
|
The function decoder_read() already cares about the decoder command,
and loops until data is available. Reduced mpd_ffmpeg_read() to no
more than the decoder_read() call.
|
|
That variable is never used except during initialization in
ffmpeg_helper().
|
|
|
|
Renamed variables.
|
|
|
|
Fix prototypes and unused variables.
|
|
The OS X output plugin wasn't adapted to the new output plugin yet,
because I had no Mac to test...
|
|
dc.error wasn't updated when the input stream failed to initialize.
|
|
The function curl_multi_info_read() provides access to errors from the
curl easy interface.
|
|
|
|
Removed the "volatile" attributes from several variables which are not
important for synchronization.
|
|
Renamed variables and internal functions. Most of the
player_control.h API remains in CamelCase for now.
|
|
|
|
The variable "next_song" is already protected by a memory barrier.
"total_time" is not important for synchronization, and we don't need
"volatile" here.
|
|
Renamed variables and functions.
|
|
Before passing the first chunk to the audio output device, send the
current song's tag.
|
|
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.
|
|
tag_has_type() checks whether the tag contains one or more items with
the specified type.
|
|
Renamed variables.
|
|
MPD used to have a copy of the mp4ff library. Since that has been
removed, AAC suport was disabled when there was no libmp4ff. Separate
the libmp4ff test, and enable AAC support no matter if libmp4ff is
available.
|
|
When using autodetection, AlsaData.device wasn't properly initialized
with NULL. This broke autodetection randomly.
|
|
The variables mod_mikModInitiated and mod_mikModInitError were used to
control lazy initialization, but they are superfluous now.
|
|
The "mod" decoder plugin was being initialized lazily, but was
deinitialized unconditionally. That led to segmentation faults.
Convert mod_initMikMod() to be the global module initialization
method. The MPD core should care about lazy initialization.
|
|
Nobody should call playAudio() with an empty chunk. Add some
assertions on that.
|
|
An empty chunk may happen when it only contains a tag, but no PCM
data. Don't call playAudio() then.
|
|
ffmpeg_tag() deleted the tag when ffmpeg_helper() returned success.
The return value was interpreted incorrectly, it should return the tag
on success.
|