1. 26 Aug, 2008 20 commits
    • Max Kellermann's avatar
      renamed player.c to player_control.c · 5e51fa02
      Max Kellermann authored
      Give player.c a better name, meaning that the code is used to control
      the player thread.
      5e51fa02
    • Max Kellermann's avatar
      renamed decode.h to decoder_control.h · 56cdce69
      Max Kellermann authored
      56cdce69
    • Max Kellermann's avatar
      moved global variable "pc" to player.h · 4255bba0
      Max Kellermann authored
      This is the last of the three variables.  Now we don't need
      playerData.h anymore in most sources.
      4255bba0
    • Max Kellermann's avatar
      moved global variable "ob" to outputBuffer.h · a94845ee
      Max Kellermann authored
      This releases several include file dependencies.  As a side effect,
      "CHUNK_SIZE" isn't defined by decoder_api.h anymore, so we have to
      define it directly in the plugins which need it.  It just isn't worth
      it to add it to the decoder plugin API.
      a94845ee
    • Max Kellermann's avatar
      moved variable "dc" to decode.h · 1c03c721
      Max Kellermann authored
      Now that "dc" is available here, we don't have to pass it to
      decoder_is_idle() and decoder_is_starting() anymore.
      1c03c721
    • Max Kellermann's avatar
      added flag "decoder.seeking" · 1c196478
      Max Kellermann authored
      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.
      1c196478
    • Max Kellermann's avatar
      added decoder_read() · 940ecf53
      Max Kellermann authored
      On our way to stabilize the decoder API, we will one day remove the
      input stream functions.  The most basic function, read() will be
      provided by decoder_api.h with this patch.  It already contains a loop
      (still with manual polling), error/eof handling and decoder command
      checks.  This kind of code used to be duplicated in all decoder
      plugins.
      940ecf53
    • Max Kellermann's avatar
      added decoder_plugin_register() · 6120635f
      Max Kellermann authored
      With the functions decoder_plugin_register() and
      decoder_plugin_unregister(), decoder plugins can register a
      "secondary" plugin, like the flac input plugin does this for
      "oggflac".
      6120635f
    • Max Kellermann's avatar
      eliminate OUTPUT_BUFFER_DC_STOP, OUTPUT_BUFFER_DC_SEEK · c7384b65
      Max Kellermann authored
      (Ab)use the decoder_command enumeration, which has nearly the same
      values and the same meaning.
      c7384b65
    • Max Kellermann's avatar
      added decoder_get_url() · 67bf4b44
      Max Kellermann authored
      The wavpack decoder plugin implements a hack, and it needs the song
      URL for that.  This API (and the hack) should be revised later, but
      add that function for now.
      67bf4b44
    • Max Kellermann's avatar
      added decoder_seek_where() and decoder_seek_error() · 17e9cc84
      Max Kellermann authored
      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.
      17e9cc84
    • Max Kellermann's avatar
      added decoder_command_finished() to decoder_api.h · 78c55e24
      Max Kellermann authored
      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().
      78c55e24
    • Max Kellermann's avatar
      added decoder_get_command() · 817a68b2
      Max Kellermann authored
      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.
      817a68b2
    • Max Kellermann's avatar
      moved convState to struct decoder · 2e9169de
      Max Kellermann authored
      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.
      2e9169de
    • Max Kellermann's avatar
      moved struct AudioFormat to audio_format.h · 1b845f94
      Max Kellermann authored
      We want to expose the AudioFormat structure to plugins; remove some
      clutter by moving its declaration to a separate header file.
      1b845f94
    • Max Kellermann's avatar
      added parameter total_time to decoder_initialized() · 0d8b551c
      Max Kellermann authored
      Similar to the previous patch: pass total_time instead of manipulating
      dc->totalTime directly.
      0d8b551c
    • Max Kellermann's avatar
      added audio_format parameter to decoder_initialized() · 4590a98f
      Max Kellermann authored
      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().
      4590a98f
    • Max Kellermann's avatar
      added decoder_clear() and decoder_flush() · 0d45870c
      Max Kellermann authored
      We are now beginning to remove direct structure accesses from the
      decoder plugins.  decoder_clear() and decoder_flush() mask two very
      common buffer functions.
      0d45870c
    • Max Kellermann's avatar
      added decoder_data() · 2a83ccdb
      Max Kellermann authored
      Moved all of the player-waiting code to decoder_data(), to make
      OutputBuffer more generic.
      2a83ccdb
    • Max Kellermann's avatar
      added decoder_initialized() · 2bf7ec4f
      Max Kellermann authored
      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.
      2bf7ec4f
  2. 03 Jan, 2008 1 commit
    • Eric Wong's avatar
      Cleanup #includes of standard system headers and put them in one place · cb8f1af3
      Eric Wong authored
      This will make refactoring features easier, especially now that
      pthreads support and larger refactorings are on the horizon.
      
      Hopefully, this will make porting to other platforms (even
      non-UNIX-like ones for masochists) easier, too.
      
      os_compat.h will house all the #includes for system headers
      considered to be the "core" of MPD.  Headers for optional
      features will be left to individual source files.
      
      git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
      cb8f1af3
  3. 05 Apr, 2007 1 commit
  4. 30 Jul, 2006 1 commit
  5. 20 Jul, 2006 1 commit
  6. 14 Jul, 2006 2 commits
  7. 13 Jul, 2006 1 commit
  8. 03 Nov, 2004 1 commit
  9. 17 Jun, 2004 2 commits
  10. 14 Apr, 2004 1 commit
  11. 18 Mar, 2004 1 commit
  12. 23 Feb, 2004 1 commit