aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-08-26added decoder_seek_where() and decoder_seek_error()Max Kellermann1-0/+4
Provide access to seeking for the decoder plugins; they have to know where to seek, and they need a way to tell us that seeking has failed.
2008-08-26added decoder_command_finished() to decoder_api.hMax Kellermann1-0/+7
Some decoder commands are implemented in the decoder plugins, thus they need to have an API call to signal that their current command has been finished. Let them use the new decoder_command_finished() instead of the internal dc_command_finished().
2008-08-26added decoder_get_command()Max Kellermann1-0/+2
Another big patch which hides internal mpd APIs from decoder plugins: decoder plugins regularly poll dc->command; expose it with a decoder_api.h function.
2008-08-26moved InputPlugin to decoder_api.hMax Kellermann1-1/+60
InputPlugin is the API which is implemented by a decoder plugin. This belongs to the public API/ABI, so move it to decoder_api.h. It will later be renamed to something like "decoder_plugin".
2008-08-26added parameter total_time to decoder_initialized()Max Kellermann1-1/+2
Similar to the previous patch: pass total_time instead of manipulating dc->totalTime directly.
2008-08-26added audio_format parameter to decoder_initialized()Max Kellermann1-1/+2
dc->audioFormat is set once by the decoder plugins before invoking decoder_initialized(); hide dc->audioFormat and let the decoder pass an AudioFormat pointer to decoder_initialized().
2008-08-26added decoder_clear() and decoder_flush()Max Kellermann1-0/+4
We are now beginning to remove direct structure accesses from the decoder plugins. decoder_clear() and decoder_flush() mask two very common buffer functions.
2008-08-26added decoder_data()Max Kellermann1-0/+15
Moved all of the player-waiting code to decoder_data(), to make OutputBuffer more generic.
2008-08-26added decoder_initialized()Max Kellermann1-0/+6
decoder_initialized() sets the state to DECODE_STATE_DECODE and wakes up the player thread. It is called by the decoder plugin after its internal initialization is finished. More arguments will be added later to prevent direct accesses to the DecoderControl struct.
2008-08-26added struct decoderMax Kellermann1-10/+14
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.
2008-08-26clean up CPP includesMax Kellermann1-2/+0
Include only headers which are really required. This speeds up compilation and helps detect cross-layer accesses.
2008-06-02remove audioDeviceStates from playerData and getPlayerDataEric Wong1-8/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@7372 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-13Make the OutputBuffer API more consistentEric Wong1-1/+1
We had functions names varied between outputBufferFoo, fooOutputBuffer, and output_buffer_foo That was too confusing for my little brain to handle. And the global variable was somehow named 'cb' instead of the more obvious 'ob'... git-svn-id: https://svn.musicpd.org/mpd/trunk@7355 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-13Stop passing our single OutputBuffer object everywhereEric Wong1-1/+1
All of our main singleton data structures are implicitly shared, so there's no reason to keep passing them around and around in the stack and making our internal API harder to deal with. git-svn-id: https://svn.musicpd.org/mpd/trunk@7354 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-13Stop passing our single DecoderControl object everywhereEric Wong1-1/+1
This at least makes the argument list to a lot of our plugin functions shorter and removes a good amount of line nois^W^Wcode, hopefully making things easier to read and follow. git-svn-id: https://svn.musicpd.org/mpd/trunk@7353 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-13Get rid of PlayerControl inside the PlayerData structEric Wong1-1/+1
It actually increases our image size a small bit and may even hurt performance a very small bit, but makes the code less verbose and easier to manage. I don't see a reason for mpd to ever support playing multiple files at the same time (users can run multiple instances of mpd if they really want to play Zaireeka, but that's such an edge case it's not worth ever supporting in our code). git-svn-id: https://svn.musicpd.org/mpd/trunk@7352 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12clean up CPP includesMax Kellermann1-2/+0
Try to only include headers which are really needed. We should particularly check all "headers including other headers". The long-term goal is to have a manageable, small API for plugins (decoders, output) without so many mpd internals cluttering the namespace. git-svn-id: https://svn.musicpd.org/mpd/trunk@7319 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12remove buffered_chunks, use cb->sizeMax Kellermann1-1/+0
Second patch to make OutputBuffer self-contained: since OutputBuffer now knows its own size, we do not need the global variable "buffered_chunks" anymore. git-svn-id: https://svn.musicpd.org/mpd/trunk@7311 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12moved CHUNK_SIZE to outputBuffer.hMax Kellermann1-3/+0
The chunk size should be in outputBuffer.h since the output buffer code is its primary user. git-svn-id: https://svn.musicpd.org/mpd/trunk@7268 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2008-04-12unsigned integers in playerData.[ch]Max Kellermann1-2/+2
The number of buffered chunks can obviously not become negative. The "buffered_before_play<0" therefore cannot be useful, so let's remove it, too. git-svn-id: https://svn.musicpd.org/mpd/trunk@7232 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-04-05The massive copyright updateAvuton Olrich1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-20Fix warnings for -Wmissing-prototypesAvuton Olrich1-3/+3
Add -Wmissing-prototypes if compiling with gcc Static where possible git-svn-id: https://svn.musicpd.org/mpd/trunk@4657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-06merge changes from mpd-tree:Warren Dukes1-3/+0
-use tree for tagTracker -eliminate the master process git-svn-id: https://svn.musicpd.org/mpd/trunk@4571 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01audio: get rid of the myAudioDevicesEnabled arrayEric Wong1-1/+1
It just made things more confusing. We'll just store the states in playerData_pd->audioDevicesStates and be done with it (it's a unsigned byte now). git-svn-id: https://svn.musicpd.org/mpd/trunk@4514 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01audio: remove AUDIO_MAX_DEVICES limitEric Wong1-1/+1
Some people have more than 8 devices (the old limit). It's pretty easy to support as many as our hardware and OS allows so we might as well. git-svn-id: https://svn.musicpd.org/mpd/trunk@4513 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-01playerData: move player_pid into the main playerData structureEric Wong1-0/+1
No point in doing all that extra work for one variable... git-svn-id: https://svn.musicpd.org/mpd/trunk@4511 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-20Add mpd-indent.shAvuton Olrich1-1/+1
Indent the entire tree, hopefully we can keep it indented. git-svn-id: https://svn.musicpd.org/mpd/trunk@4410 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-14Change shank's email addressJ. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@4333 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-07-13Huge header update, update the copyright and addAvuton Olrich1-1/+1
the GPL header where necessary git-svn-id: https://svn.musicpd.org/mpd/trunk@4317 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2005-11-16DJWLindenaar balanced tree and master process patchQball Cow1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@3669 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-11-02enabling and disabling individual audioOutputs is mostly done, just needWarren Dukes1-1/+1
to add the command hooks git-svn-id: https://svn.musicpd.org/mpd/trunk@2484 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-10some more work on organizing code for resampling/audioFormat conversionWarren Dukes1-1/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@968 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-05-07new OutputBuffer abstraction stuff, implemented for mp3, now need toWarren Dukes1-14/+2
implement in other decoders git-svn-id: https://svn.musicpd.org/mpd/trunk@940 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-14add vim shiznit to end of all source filesWarren Dukes1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@750 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-11add volatile qualifiers to some shared mem buffer stuff, to enusre compilerWarren Dukes1-8/+8
doesn't optimize out order sensitive stuff git-svn-id: https://svn.musicpd.org/mpd/trunk@698 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-04-01use 16-bit signed ints for storing positions in the ring bufferWarren Dukes1-4/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@576 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-18bunch of autotool cleanupsWarren Dukes1-0/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@271 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-03-05make chunk_size 1020, so its divisible for 8,16,24, and 32-bit audioWarren Dukes1-1/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@207 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2004-02-25some more cleanupsWarren Dukes1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@60 09075e82-0dd4-0310-85a5-a0d7c8717e4f