aboutsummaryrefslogtreecommitdiffstats
path: root/src/pipe.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* music_pipe: refuse to push empty chunksMax Kellermann2009-03-071-0/+4
| | | | Added two assertions.
* music_pipe: poison music_chunk.nextMax Kellermann2009-03-071-0/+5
| | | | | | The value of music_chunk.next is undefined for a chunk returned by music_pipe_shift(). For more pedantic debugging, poison the reference before returning the chunk.
* music_pipe: added music_pipe_peek()Max Kellermann2009-03-071-0/+6
| | | | | music_pipe_peek() is similar to music_pipe_shift(), but doesn't remove the chunk. This allows it to be used with a "const" music_pipe.
* pipe: added music_buffer, rewrite music_pipeMax Kellermann2009-03-061-163/+58
| | | | | | | | 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-86/+18
| | | | | | | 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.
* music_chunk: added music_chunk_write(), music_chunk_expand()Max Kellermann2009-03-051-16/+5
| | | | | Moved some code from music_pipe_write() and music_pipe_expand(). Only music_chunk.c should access the music_chunk internals.
* music_pipe: moved struct music_chunk to chunk.hMax Kellermann2009-03-031-14/+1
|
* music_pipe: removed music_pipe_append()Max Kellermann2009-01-171-30/+0
| | | | | The function is unused, since decoder_api() uses music_pipe_write() / music_pipe_expand() now.
* music_pipe: added functions music_pipe_write() and music_pipe_expand()Max Kellermann2009-01-171-32/+46
| | | | | | | This new API gives the caller a writable buffer to the music pipe chunk. This may allow the caller to eliminate several buffer copies, because it may manipulate the returned buffer, until it calls music_pipe_expand().
* music_pipe: narrowed assertion on chunk indexMax Kellermann2008-11-181-1/+1
| | | | | The chunk index passed to successor() must be valid, i.e. it must be smaller than num_chunks.
* player: chop the tail of the music pipe after CANCELMax Kellermann2008-11-131-0/+12
| | | | | | When a CANCEL command is received, the player should drop all chunks of the next song. Added new funciton music_pipe_chop() which is used for that.
* music_pipe: continuously check the sample format of all chunksMax Kellermann2008-11-131-0/+18
| | | | | Provide a debug function which asserts on the sample format of all chunks. Call this function in each iteration of the player main loop.
* music_pipe: check for partial frames in appended chunkMax Kellermann2008-11-131-0/+2
| | | | | Added an additional assertion which checks partial frames in the existing tail chunk.
* music_pipe: add tag pointer to the music_chunk structMax Kellermann2008-11-021-1/+27
| | | | | | Each music chunk can now carry a tag object. Decoder plugins which support it (e.g. oggvorbis) may use this to inject decoded tags into their output.
* music_pipe: added functions chunk_init() and chunk_free()Max Kellermann2008-11-021-10/+38
| | | | | These two functions will care about memory allocation and deallocation in the future.
* music_pipe: renamed "size" to "num_chunks"Max Kellermann2008-11-021-10/+10
| | | | The name "num_chunks" expresses the meaning of the variable better.
* music_pipe: no CamelCaseMax Kellermann2008-11-021-14/+14
| | | | Rename all variables and struct members.
* music_pipe: set bit_rate and time in music_pipe_append()Max Kellermann2008-11-021-10/+10
| | | | Don't bother to pass these values as parameters to tail_chunk().
* music_pipe: moved code to music_chunk_append()Max Kellermann2008-11-021-13/+28
|
* music_pipe: renamed "ob" to "music_pipe"Max Kellermann2008-11-021-43/+43
| | | | Last music_pipe rename patch: renamed the global variable (singleton).
* music_pipe: use GLib instead of utils.hMax Kellermann2008-11-021-3/+3
| | | | Eliminate the deprecated utils.h memory allocation functions.
* decoder: replaced music_pipe.audioFormat with dc.out_audio_formatMax Kellermann2008-11-021-1/+3
| | | | | | | .. and rename dc.audioFormat to dc.in_audio_format. The music pipe does not need to know the audio format, and its former "audioFormat" property indicated the format of the most recently added chunk, which might be confusing when you are reading the oldest chunks.
* music_pipe: pass frame size to tail_chunk()Max Kellermann2008-11-021-3/+2
| | | | Don't make tail_chunk() calculate the frame size again.
* music_pipe: renamed ob_* functions to music_pipe_*Max Kellermann2008-11-021-20/+20
| | | | Rename all functions to the new prefix.
* music_pipe: renamed struct output_buffer to struct music_pipeMax Kellermann2008-11-021-6/+8
| | | | .. and rename ob_chunk to struct music_chunk.
* renamed outputBuffer.[ch] to pipe.[ch]Max Kellermann2008-11-021-0/+228
No CamelCase in the file name. The output_buffer struct is going to be renamed to music_pipe. There are so many buffer levels in MPD, and calling this one "output buffer" is wrong, because it's not the last buffer before the music reaches the output devices.