aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* log: use boolMax Kellermann2008-11-05
| | | | Use the bool data type for flags.
* log: provide a GLib logging handlerMax Kellermann2008-11-05
| | | | | Install a default handler which writes to stdout or stderr, and prepends a time stamp. This looks just like the 0.13.x logger.
* log: use GLib message loggingMax Kellermann2008-11-05
| | | | | | The logging functions from log.h are deprecated, and the code should use GLib logging instead. Make ERROR(), WARNING() etc. call g_logv() internally.
* log: no CamelCaseMax Kellermann2008-11-05
| | | | Renamed the variable "logLevel" to "log_threshold".
* log: removed warning bufferMax Kellermann2008-11-05
| | | | | 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.
* main: initialize locale (LC_CTYPE)Max Kellermann2008-11-05
| | | | | | 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().
* path: don't allocate charset twiceMax Kellermann2008-11-05
| | | | | Make the local variable "charset" const, and don't duplicate its value. It is already duplicated by path_set_fs_charset().
* path: get filesystem charset from GLibMax Kellermann2008-11-05
| | | | | | 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.
* path: no CamelCaseMax Kellermann2008-11-05
| | | | Rename variables and functions.
* enable GLib threadingMax Kellermann2008-11-05
| | | | | Call g_thread_init() from main() to enable the GLib features which make it thread safe.
* main: don't close all file descriptors on startupMax Kellermann2008-11-05
| | | | | Removed closeAllFDs(). The caller is responsible for closing all file handles.
* pulse: removed reconnect intervalMax Kellermann2008-11-05
| | | | | The output thread automatically waits some time before retrying to open the device. Don't duplicate this check in the pulse plugin.
* pulse: check if connection is open in pulse_cancel()Max Kellermann2008-11-05
| | | | | The pulse plugin crashed with a segmentation fault when the pulse server was killed.
* wavpack: read_bytes() should not return after partial readsMax Kellermann2008-11-05
| | | | | | | 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.
* wavpack: don't close the streamMax Kellermann2008-11-05
| | | | The input_stream object is opened and closed by the caller.
* decoder: removed stream_typesMax Kellermann2008-11-04
| | | | | Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
* wavpack: removed NULL element from tagtypesMax Kellermann2008-11-04
| | | | | 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.
* wavpack: use enum tag_typeMax Kellermann2008-11-04
| | | | Don't store tag type values in a plain integer, use the proper enum.
* wavpack: use GLib instead of utils.h / log.hMax Kellermann2008-11-04
| | | | Replace deprecated code with GLib.
* wavpack: read first byte from wvc streamMax Kellermann2008-11-04
| | | | | | | | | 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.
* wavpack: use the bool data typeMax Kellermann2008-11-04
| | | | Use boolean true/false instead of 1/0.
* wavpack: no CamelCaseMax Kellermann2008-11-04
| | | | Renamed functions and variables.
* wavpack: fix indentMax Kellermann2008-11-04
| | | | Fixed the indent of the switch statement in format_samples_int().
* mp4: get decoder command from decoder_data()Max Kellermann2008-11-04
| | | | | Eliminate a superfluous decoder_get_command() call. decoder_data() already returns the command.
* mp4: initialize audio_format before decoder_initialized()Max Kellermann2008-11-04
| | | | Removed the duplicate audio_format initialization.
* mp4: use decoder_read() instead of input_stream_read()Max Kellermann2008-11-04
| | | | | decoder_read() handles decoder commands, and should be used in decoder plugins.
* mp4: pass struct mp4_context to the mp4ff_callback_t methodsMax Kellermann2008-11-04
| | | | | | 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.
* mp4: use GLib instead of utils.h / log.hMax Kellermann2008-11-04
| | | | Replace deprecated code with GLib.
* mp4: use tag_is_empty() instead of passing the tag_is_found flagMax Kellermann2008-11-04
| | | | | | | | 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.
* mp4: static mp4ff_callback_t variablesMax Kellermann2008-11-04
| | | | | | 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().
* mp4: no CamelCaseeMax Kellermann2008-11-04
| | | | Renamed functions and variables.
* ffmpeg: removed loop from mpd_ffmpeg_read()Max Kellermann2008-11-04
| | | | | | 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.
* ffmpeg: removed ffmpeg_context.codecMax Kellermann2008-11-04
| | | | | That variable is never used except during initialization in ffmpeg_helper().
* ffmpeg: moved code to ffmpeg_find_audio_stream()Max Kellermann2008-11-04
|
* ffmpeg: no CamelCaseMax Kellermann2008-11-04
| | | | Renamed variables.
* tag: added tag_is_empty()Max Kellermann2008-11-04
|
* osx: fix gcc warningsMax Kellermann2008-11-04
| | | | Fix prototypes and unused variables.
* osx: adapt to new output plugin APIMax Kellermann2008-11-04
| | | | | The OS X output plugin wasn't adapted to the new output plugin yet, because I had no Mac to test...
* decoder: update dc.error after input stream failureMax Kellermann2008-11-03
| | | | dc.error wasn't updated when the input stream failed to initialize.
* input_curl: use curl_multi_info_read()Max Kellermann2008-11-03
| | | | | The function curl_multi_info_read() provides access to errors from the curl easy interface.
* player: converted PLAYER_ERROR_* to enumMax Kellermann2008-11-03
|
* player: removed "volatile" attributesMax Kellermann2008-11-03
| | | | | Removed the "volatile" attributes from several variables which are not important for synchronization.
* player: no CamelCaseMax Kellermann2008-11-03
| | | | | Renamed variables and internal functions. Most of the player_control.h API remains in CamelCase for now.
* decoder: converted DECODE_ERROR_* to enumMax Kellermann2008-11-03
|
* decoder: removed "volatile" modifierMax Kellermann2008-11-03
| | | | | | 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.
* decoder: no CamelCaseMax Kellermann2008-11-03
| | | | Renamed variables and functions.
* decoder_api: send song tag in decoder_data()Max Kellermann2008-11-03
| | | | | Before passing the first chunk to the audio output device, send the current song's tag.
* decoder_api: automatically send stream tagMax Kellermann2008-11-03
| | | | | | | | | | 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: added function tag_has_type()Max Kellermann2008-11-03
| | | | | tag_has_type() checks whether the tag contains one or more items with the specified type.
* decoder_api: no CamelCaseMax Kellermann2008-11-03
| | | | Renamed variables.