aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-05log: no CamelCaseMax Kellermann1-6/+8
Renamed the variable "logLevel" to "log_threshold".
2008-11-05log: removed warning bufferMax Kellermann3-79/+2
The warning buffer is a complex piece of code for no good reason. Remove it and find a better solution, e.g. open the log file earlier.
2008-11-05main: initialize locale (LC_CTYPE)Max Kellermann1-0/+9
Initialize libc's locale functions. Currently, we are only interested in LC_CTYPE (character classification), because this is what is used by GLib's g_get_charset().
2008-11-05path: don't allocate charset twiceMax Kellermann1-5/+3
Make the local variable "charset" const, and don't duplicate its value. It is already duplicated by path_set_fs_charset().
2008-11-05path: get filesystem charset from GLibMax Kellermann1-39/+6
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.
2008-11-05path: no CamelCaseMax Kellermann4-30/+27
Rename variables and functions.
2008-11-05enable GLib threadingMax Kellermann1-0/+3
Call g_thread_init() from main() to enable the GLib features which make it thread safe.
2008-11-05main: don't close all file descriptors on startupMax Kellermann1-11/+0
Removed closeAllFDs(). The caller is responsible for closing all file handles.
2008-11-05pulse: removed reconnect intervalMax Kellermann1-19/+2
The output thread automatically waits some time before retrying to open the device. Don't duplicate this check in the pulse plugin.
2008-11-05pulse: check if connection is open in pulse_cancel()Max Kellermann1-0/+3
The pulse plugin crashed with a segmentation fault when the pulse server was killed.
2008-11-05wavpack: read_bytes() should not return after partial readsMax Kellermann1-1/+16
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.
2008-11-05wavpack: don't close the streamMax Kellermann1-1/+0
The input_stream object is opened and closed by the caller.
2008-11-04decoder: removed stream_typesMax Kellermann13-28/+0
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
2008-11-04wavpack: removed NULL element from tagtypesMax Kellermann1-3/+2
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.
2008-11-04wavpack: use enum tag_typeMax Kellermann1-1/+1
Don't store tag type values in a plain integer, use the proper enum.
2008-11-04wavpack: use GLib instead of utils.h / log.hMax Kellermann1-28/+12
Replace deprecated code with GLib.
2008-11-04wavpack: read first byte from wvc streamMax Kellermann1-25/+13
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.
2008-11-04wavpack: use the bool data typeMax Kellermann1-12/+12
Use boolean true/false instead of 1/0.
2008-11-04wavpack: no CamelCaseMax Kellermann2-44/+46
Renamed functions and variables.
2008-11-04wavpack: fix indentMax Kellermann1-47/+47
Fixed the indent of the switch statement in format_samples_int().
2008-11-04mp4: get decoder command from decoder_data()Max Kellermann1-7/+8
Eliminate a superfluous decoder_get_command() call. decoder_data() already returns the command.
2008-11-04mp4: initialize audio_format before decoder_initialized()Max Kellermann1-6/+5
Removed the duplicate audio_format initialization.
2008-11-04mp4: use decoder_read() instead of input_stream_read()Max Kellermann1-1/+4
decoder_read() handles decoder commands, and should be used in decoder plugins.
2008-11-04mp4: pass struct mp4_context to the mp4ff_callback_t methodsMax Kellermann1-10/+18
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.
2008-11-04mp4: use GLib instead of utils.h / log.hMax Kellermann1-13/+14
Replace deprecated code with GLib.
2008-11-04mp4: use tag_is_empty() instead of passing the tag_is_found flagMax Kellermann1-13/+3
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.
2008-11-04mp4: static mp4ff_callback_t variablesMax Kellermann1-22/+15
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().
2008-11-04mp4: no CamelCaseeMax Kellermann2-106/+111
Renamed functions and variables.
2008-11-04ffmpeg: removed loop from mpd_ffmpeg_read()Max Kellermann1-15/+2
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.
2008-11-04ffmpeg: removed ffmpeg_context.codecMax Kellermann1-2/+0
That variable is never used except during initialization in ffmpeg_helper().
2008-11-04ffmpeg: moved code to ffmpeg_find_audio_stream()Max Kellermann1-9/+12
2008-11-04ffmpeg: no CamelCaseMax Kellermann2-102/+103
Renamed variables.
2008-11-04tag: added tag_is_empty()Max Kellermann1-0/+10
2008-11-04osx: fix gcc warningsMax Kellermann1-7/+8
Fix prototypes and unused variables.
2008-11-04osx: adapt to new output plugin APIMax Kellermann1-19/+15
The OS X output plugin wasn't adapted to the new output plugin yet, because I had no Mac to test...
2008-11-03decoder: update dc.error after input stream failureMax Kellermann1-0/+1
dc.error wasn't updated when the input stream failed to initialize.
2008-11-03input_curl: use curl_multi_info_read()Max Kellermann1-1/+32
The function curl_multi_info_read() provides access to errors from the curl easy interface.
2008-11-03player: converted PLAYER_ERROR_* to enumMax Kellermann2-9/+14
2008-11-03player: removed "volatile" attributesMax Kellermann1-6/+6
Removed the "volatile" attributes from several variables which are not important for synchronization.
2008-11-03player: no CamelCaseMax Kellermann3-45/+45
Renamed variables and internal functions. Most of the player_control.h API remains in CamelCase for now.
2008-11-03decoder: converted DECODE_ERROR_* to enumMax Kellermann1-4/+6
2008-11-03decoder: removed "volatile" modifierMax Kellermann1-2/+2
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.
2008-11-03decoder: no CamelCaseMax Kellermann5-31/+31
Renamed variables and functions.
2008-11-03decoder_api: send song tag in decoder_data()Max Kellermann1-8/+26
Before passing the first chunk to the audio output device, send the current song's tag.
2008-11-03decoder_api: automatically send stream tagMax Kellermann5-51/+60
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.
2008-11-03tag: added function tag_has_type()Max Kellermann2-0/+19
tag_has_type() checks whether the tag contains one or more items with the specified type.
2008-11-03decoder_api: no CamelCaseMax Kellermann1-34/+32
Renamed variables.
2008-11-03configure.ac: separate the "aac" and "mp4" decoder testsMax Kellermann2-2/+9
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.
2008-11-03alsa: initialize "device" with NULLMax Kellermann1-2/+1
When using autodetection, AlsaData.device wasn't properly initialized with NULL. This broke autodetection randomly.
2008-11-03mod: removed boolean globals for lazy initMax Kellermann1-15/+4
The variables mod_mikModInitiated and mod_mikModInitError were used to control lazy initialization, but they are superfluous now.