aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_internal.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* all: Update copyright header.Avuton Olrich2009-03-131-6/+7
| | | | | | | | 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.
* pipe: added music_buffer, rewrite music_pipeMax Kellermann2009-03-061-7/+6
| | | | | | | | 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.
* music_pipe: added music_pipe_push()Max Kellermann2009-03-061-0/+22
| | | | | | | 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.
* decoder_api: moved struct decoder_plugin to decoder_plugin.hMax Kellermann2009-02-151-1/+0
| | | | | | The decoder_plugin struct is used by both the MPD core and the decoder plugin implementations. Move it to a shared header file, to minimize header dependencies.
* pcm_utils: moved conversion code to pcm_convert.cMax Kellermann2009-01-071-1/+1
| | | | | All what's left in pcm_utils.h is the pcm_range() utility function, which is only used internally by pcm_volume and pcm_mix.
* input_stream: added tag() methodMax Kellermann2009-01-031-2/+5
| | | | | The tag() method reads a tag from the stream. This replaces the meta_name and meta_title attributes.
* decoder: removed "plugin" from the decoder structMax Kellermann2008-11-081-2/+0
| | | | decoder.plugin was a write-only attribute.
* decoder_api: automatically send stream tagMax Kellermann2008-11-031-0/+3
| | | | | | | | | | 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.
* decoder: return const decoder_plugin structsMax Kellermann2008-11-011-1/+1
| | | | | The decoder_plugin structs must never change. Don't work with non-const pointers.
* added prefix to header macrosMax Kellermann2008-10-311-2/+2
| | | | | | | "LOG_H" is a macro which is also used by ffmpeg/log.h. This is ffmpeg's fault, because short macros should be reserved for applications, but since it's always a good idea to choose prefixed macro names, even for applications, we are going to do that in MPD.
* pcm_utils: renamed ConvState to struct pcm_convert_stateMax Kellermann2008-10-211-1/+1
| | | | No CamelCase, and a struct instead of a typedef.
* use the "bool" data type instead of "int"Max Kellermann2008-10-081-1/+1
| | | | "bool" should be used in C99 programs for boolean values.
* added flag "decoder.seeking"Max Kellermann2008-08-261-0/+2
| | | | | | | | | | This flag is used internally; it is set by decoder_seek_where(), and indicates that the decoder plugin has begun the seek process. It is used for the case that the decoder plugin has to read data during the seek process. Before this patch, that was impossible, because decoder_read() would refuse to read data unless dc->command is NONE. This patch is kind of a dirty workaround, and needs to be redesigned later.
* renamed InputPlugin to struct decoder_pluginMax Kellermann2008-08-261-1/+1
| | | | | | "decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required.
* moved convState to struct decoderMax Kellermann2008-08-261-0/+3
| | | | | | Since we moved all PCM conversions to decoder_data(), the attribute convState isn't being used anymore by the OutputBuffer code. Move it to struct decoder.
* added struct decoderMax Kellermann2008-08-261-0/+28
The decoder struct should later be made opaque to the decoder plugin, because maintaining a stable struct ABI is quite difficult. The ABI should only consist of a small number of stable functions.