aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup #includes of standard system headers and put them in one placeEric Wong2008-01-0312-64/+12
| | | | | | | | | | | | | 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
* Simplify decode cleanup logic a bitEric Wong2008-01-0110-100/+6
| | | | | | | | | | | DECODE_STATE_STOP is always set as dc->state, and dc->stop is always cleared. So handle it in decodeStart once rather than doing it in every plugin. While we're at it, fix a long-standing (but difficult to trigger) bug in mpc_decode where we failed to return if mpc_decoder_initialize() fails. git-svn-id: https://svn.musicpd.org/mpd/trunk@7122 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* mpc_plugin: break out if a missed error branchEric Wong2008-01-011-0/+2
| | | | | We shouldn't try to continue if mpc_decoder_initialize() fails. git-svn-id: https://svn.musicpd.org/mpd/trunk@7113 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* ogg_common: fix indent screwupEric Wong2007-12-311-14/+5
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7109 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix builds that only have FLAC >= 1.1.3 but not Ogg-VorbisEric Wong2007-12-313-9/+9
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7108 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix possible wrong 'addition'Qball Cow2007-12-101-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@7076 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix replaygain for latest flac version.Qball Cow2007-12-061-0/+9
| | | | | | The updated initialize method did not tell the libFLAC to look for the tag containing the replay information. git-svn-id: https://svn.musicpd.org/mpd/trunk@7075 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Re-enable seeking in http streams.Qball Cow2007-11-281-6/+3
| | | | | | Fixing stopping mpd from block when trying to stop a ogg stream that is buffering. git-svn-id: https://svn.musicpd.org/mpd/trunk@7053 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix wavpack endian issues, tested to work for 16bit. (after blowing my ears ↵Qball Cow2007-10-031-1/+18
| | | | | off with white noise) git-svn-id: https://svn.musicpd.org/mpd/trunk@6952 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputPlugins/_ogg_common.c: fixup includes for new (1.1.4+ FLAC)Eric Wong2007-09-171-1/+3
| | | | | | ogg_stream_type_detect may not be compiled correctly when compiling FLAC (1.1.4+) without Vorbis git-svn-id: https://svn.musicpd.org/mpd/trunk@6896 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add oga extension for flac-1.2.1Avuton Olrich2007-09-141-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6888 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* buffer input while waiting for outputBuffer space in mp4 and (ogg)flacEric Wong2007-09-102-2/+3
| | | | | | | | Both mp4 and (ogg)flac inputPlugins got HTTP inputStream support later in the game, so their calls to sendDataToOutputBuffer() didn't get updated to support buffering while the outputBuffer was full. This fixes it. git-svn-id: https://svn.musicpd.org/mpd/trunk@6873 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* conf: improved boolean config parameter handling from -keEric Wong2007-09-051-4/+3
| | | | | | the force flag will issue FATAL() if an invalid value is specified git-svn-id: https://svn.musicpd.org/mpd/trunk@6857 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputPlugins/flac: improve error messagesEric Wong2007-08-281-12/+13
| | | | | | | | | For the default: case, just use the error message that libFLAC provides instead of using something ambiguous. Also, this gets rid of long lines in the code, making it easier to digest. Of course, we save ~100 bytes of text space in the process :) git-svn-id: https://svn.musicpd.org/mpd/trunk@6830 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* adding \n to a bunch of error message stringsJ. Alexander Treuman2007-08-271-2/+2
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6826 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputPlugins/mp3_plugin: parse LAME tags for ReplayGain infoJ. Alexander Treuman2007-08-221-46/+104
| | | | | | | | | | | | Parse ReplayGain info in LAME tags and use it if no ID3v2 ReplayGain tags are found. This is currently a bit unsafe, as apparently some LAME tags have bogus ReplayGain values. But I'm finding a lot of MP3s with valid LAME tags that fail the LAME tag CRC check. So until I figure out why that's happening, it's an unreliable method for checking if the LAME tag is valid. A big thanks to tmz for writing the original patch. git-svn-id: https://svn.musicpd.org/mpd/trunk@6798 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleanup a outcommented debug statementQball Cow2007-08-111-5/+0
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6736 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputPlugins/wavpack_plugin: enable ReplayGain codeJ. Alexander Treuman2007-06-251-14/+3
| | | | | | Turns out the fix was as simple as specifying the OPEN_TAGS flag when opening the file. Thanks again to Kodest for figuring this one out. git-svn-id: https://svn.musicpd.org/mpd/trunk@6657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputPlugins/wavpack_plugin: adding dummy code for ReplayGain supportJ. Alexander Treuman2007-06-251-4/+84
| | | | | | | | | This ReplayGain code is currently disabled because WavpackGetTagItem can't seem to find replaygain_* fields in APEv2 tags (which is how wvgain stores ReplayGain values). Additionally, because APEv2 tags are stored at the end of the file, this code is only implemented for regular files and not HTTP streams. Using HTTP seeking it *may* be possible to implement it for both. git-svn-id: https://svn.musicpd.org/mpd/trunk@6656 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Updating Kodest's name/email.J. Alexander Treuman2007-06-251-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6654 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Adding WavPack support. Patch courtesy Kodest.J. Alexander Treuman2007-06-241-0/+422
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6651 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Adding very experimental streaming support for mp4.J. Alexander Treuman2007-06-041-16/+10
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add MIME types for the aac and mp4 input plugins. Note that these won'tJ. Alexander Treuman2007-06-042-6/+8
| | | | | | have any effect until the aac and mp4 input plugins actually support a stream decoding API. git-svn-id: https://svn.musicpd.org/mpd/trunk@6481 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Making some bool options more consistent.J. Alexander Treuman2007-06-031-5/+7
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6468 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Just specify mimeType as NULL in mpc's InputPlugin struct.J. Alexander Treuman2007-05-221-2/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@6225 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleaning up some comments.J. Alexander Treuman2007-04-093-3/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5894 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* The massive copyright updateAvuton Olrich2007-04-0513-13/+13
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5834 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Set totalTime to 0 for MODs. If this isn't done, the totalTime of theJ. Alexander Treuman2007-03-311-0/+1
| | | | | previous song played will be reused. git-svn-id: https://svn.musicpd.org/mpd/trunk@5791 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Disable looping MOD files played with libmikmod. Many MODs will loopJ. Alexander Treuman2007-03-311-0/+3
| | | | | forever without this. git-svn-id: https://svn.musicpd.org/mpd/trunk@5790 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Support for libmikmod 3.2.0 betas.J. Alexander Treuman2007-03-021-2/+7
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5492 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* flac: workaround for type inconsistency between new/old read callbackEric Wong2007-01-142-1/+3
| | | | | | size_t (1.1.3) makes a lot more sense, but older flac used unsigned here... git-svn-id: https://svn.musicpd.org/mpd/trunk@5258 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Don't initialize globals to zero (or NULL)Eric Wong2007-01-149-110/+11
| | | | | | | | Some compilers and linkers aren't smart enough to optimize this, as global variables are implictly initialized to zero. As a result, binaries are a bit smaller as more goes in the .bss and less in the text section. git-svn-id: https://svn.musicpd.org/mpd/trunk@5254 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* flac/ogg/oggflac: keep old mime-types in addition to the new onesEric Wong2007-01-143-4/+15
| | | | | | We'll be dealing with legacy server configurations for a long time to come. git-svn-id: https://svn.musicpd.org/mpd/trunk@5253 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* mp3: sparse: fix warnings reported with -WshadowEric Wong2007-01-141-8/+7
| | | | | | sendDataToOutputBuffer returns an int (and always has), and using the existing 'ret' is fine in mp3Read(). git-svn-id: https://svn.musicpd.org/mpd/trunk@5246 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* flac: sparse: mismatched enum type for seekEric Wong2007-01-141-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5244 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* flac: fix a stupid mistake newer preprocessors don't complain aboutEric Wong2007-01-141-2/+2
| | | | | FLAC__{seekable_,}_stream_decoder_new() takes no arguments git-svn-id: https://svn.musicpd.org/mpd/trunk@5241 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Fix the mime types for flac & oggflac, see mantis bug #1423 for more informationAvuton Olrich2007-01-062-3/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5222 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Accept application/x-ogg as valid mime typeQball Cow2006-12-271-1/+1
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5165 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added gapless_mp3_playback option. Setting to "no" will disable gaplessJ. Alexander Treuman2006-12-231-2/+15
| | | | | | | MP3 playback, thus allowing songs that run longer than the Xing frame claims (f.e., an MP3 created by catting two MP3s together) to continue playing past the end. git-svn-id: https://svn.musicpd.org/mpd/trunk@5157 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Only parse gapless info if the input stream is seekable, under theJ. Alexander Treuman2006-12-231-1/+2
| | | | | | assumption that non-seekable streams are live and any gapless info is incorrect. git-svn-id: https://svn.musicpd.org/mpd/trunk@5150 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Don't stop decoding if we're at maxFrames just because there's a Xing tag.J. Alexander Treuman2006-12-231-4/+3
| | | | | | Instead, stop decoding as soon as we've found the frames/samples at the "end" that we want drop. git-svn-id: https://svn.musicpd.org/mpd/trunk@5149 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Cleaning up some damn near unreadable wrapping caused by indent.J. Alexander Treuman2006-12-231-25/+8
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5148 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Properly calculate the number of remaining samples in the MP3 frame, evenJ. Alexander Treuman2006-12-231-5/+7
| | | | | though in practice it should never matter. git-svn-id: https://svn.musicpd.org/mpd/trunk@5147 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Add OggFLAC support when using the new 1.1.3 FLAC libraryEric Wong2006-12-042-22/+119
| | | | | | | This means that when using libFLAC as a shared object, OggFLAC support is dependent on the compile-time options of the libFLAC library loaded. git-svn-id: https://svn.musicpd.org/mpd/trunk@5112 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Introduce backwards compatibility with pre-1.1.3 FLACEric Wong2006-12-043-61/+205
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@5111 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputPlugins/flac_plugin: switch to the new (1.1.3) APIEric Wong2006-12-041-106/+60
| | | | | | We will restore compatibility with the old API in the next few commits; along with OggFLAC support. git-svn-id: https://svn.musicpd.org/mpd/trunk@5110 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* inputPlugins/flac_plugin: cleanup static declarationsEric Wong2006-12-041-149/+122
| | | | | | move flac_decode to the bottom, so we don't have to declare all of our static functions. git-svn-id: https://svn.musicpd.org/mpd/trunk@5109 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* jack patch from anarch (and some type fixes for mp4 and acc plugins)Warren Dukes2006-10-182-3/+3
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4912 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* mp3_plugin.c: fix compilation with -pedantic and/or gcc 2.95Eric Wong2006-10-061-16/+20
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4876 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* handle invalid xing tags better.Warren Dukes2006-10-031-18/+26
| | | git-svn-id: https://svn.musicpd.org/mpd/trunk@4866 09075e82-0dd4-0310-85a5-a0d7c8717e4f