aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-27mp3: use GLib loggingMax Kellermann1-19/+18
Use GLib's g_warning(), ... instead of MPD's deprecated log.h.
2008-11-24flac, mpc, ogg, wavpack: include unistd.h for SEEK_SETMax Kellermann5-0/+5
SEEK_SET is defined by unistd.h. Explicitly include it.
2008-11-22wavpack: use assert_static()Laszlo Ashin1-4/+5
2008-11-21decoder: check audio_format_valid() in all decodersMax Kellermann9-7/+70
Refuse to play audio formats which are not supported by MPD.
2008-11-21flac, oggflac: use GLib instead of utils.h/log.hMax Kellermann4-33/+29
2008-11-21ffmpeg: use GLib instead of log.hMax Kellermann1-8/+11
2008-11-21audiofile: use GLib instead of log.hMax Kellermann1-8/+10
2008-11-21aac: use GLib instead of utils.h/log.hMax Kellermann1-10/+10
Removed the superfluous my_usleep() call.
2008-11-20ogg: moved the "errorStr" variable into the error handlerMax Kellermann1-1/+2
2008-11-20aac: get rid of gcc warningsLaszlo Ashin1-2/+2
2008-11-20ogg: check the ov_read() return value before the vorbis_info evaluationMax Kellermann1-7/+6
The ov_info() return value may be corrupt when ov_read() did not return a positive value. First check for success, then check ov_info().
2008-11-19wavpack: redo using audio_format_frame_size()Laszlo Ashin1-6/+1
Somehow we lost 600e1322 after renaming some variables in ed6f6046.
2008-11-18ffmpeg: read tags from AVFormatContextViliam Mateicka1-5/+16
The ffmpeg library provides some of the song metadata in the AVFormatContext struct. Pass it from there to MPD.
2008-11-18audiofile: fixed misplaced ifViliam Mateicka1-2/+1
[mk: by definition, tag_new() cannot fail - removed check]
2008-11-16input_stream: size==-1 means unknown sizeMax Kellermann4-1/+10
Define the special value "-1" as "unknown size". Previously, there was no indicator for streams with unknown size, which might confuse some decoders.
2008-11-16ffmpeg: fixed AVSEEK_SIZEMax Kellermann1-3/+9
With whence==AVSEEK_SIZE, the seek function should return the file size, not the current offset. Check the return value of input_stream_seek().
2008-11-16aac: detect whether to pass "uint32_t*" to NeAACDecInit2()Max Kellermann2-7/+31
neaacdec.h declares all arguments as "unsigned long", but internally expects uint32_t pointers. This triggers gcc warnings on 64 bit architectures. To avoid that, make configure.ac detect whether we're using Debian's corrected headers or the original libfaad headers. In any case, pass a pointer to an uint32_t, conditionally casted to "unsigned long*".
2008-11-15aac: fix compiler warnings on amd64Laszlo Ashin1-2/+2
2008-11-15aac: don't try to free static bufferLaszlo Ashin1-4/+0
In 432da18e a dynamic buffer was replaced by a static one but some frees were accidently left there which caused some segfaults.
2008-11-14wavpack: be more robust if the underlying stream is not seekableLászló Áshin1-1/+5
The wavpack open function gives us an option called OPEN_STREAMING. This provides more robust and error tolerant playback, but it automatically disables seeking. (More exactly the wavpack lib will not return the length information.) So, if the stream is already not seekable we can use this option safely.
2008-11-14wavpack: tolerate less decoded data than requestedLászló Áshin1-1/+1
Wavpack plugin doesn't stop decoding if a block couldn't be fully decoded, rather it tries to go on.
2008-11-14wavpack: renamed variables and modified coding style slightlyLászló Áshin1-80/+113
2008-11-13mp3: fix SEEK command check after mp3_synth_and_send()Max Kellermann1-5/+3
mp3 seeking was broken, because the command==SEEK check was never reached. Swap the command check order (==SEEK before !=NONE) to fix that.
2008-11-12wavpack: remove commented debug messagesMax Kellermann1-6/+1
2008-11-12wavpack: calculate outsamplesize with audio_format_frame_size()Max Kellermann1-5/+1
2008-11-12ogg: revert "use ogg_fopen() instead of ogg_open()"Max Kellermann1-6/+9
Unfortunately, ov_fopen() is not supported by libvorbis versions older than 1.2.
2008-11-12aac: shift the input buffer before the full checkMax Kellermann1-4/+5
When the buffer was full, but everything was already consumed, fillAacBuffer() would not attempt to flush and refill it.
2008-11-12aac: make the input buffer staticMax Kellermann1-9/+4
Allocate the input buffer within the AacBuffer struct.
2008-11-12aac: reject SEEK commandsMax Kellermann1-1/+3
The aac plugin does not support seeking. Reject SEEK requests by calling decoder_seek_error(). Quit the plugin's main loop only when STOP is received.
2008-11-12aac: get decoder command from decoder_data()Max Kellermann1-4/+5
Removed a superfluous decoder_get_command() call.
2008-11-12aac: convert audio_format to temporary variableMax Kellermann1-5/+6
The audio_format variable is only used and initialized for decoder_initialized(). Move it into that block to save some bytes on the stack.
2008-11-12aac: removed method file_decode()Max Kellermann1-124/+1
aac_stream_decode() was basically copy+pasted from aac_decode(). Since stream_decode() can also decode files, eliminate aac_decode().
2008-11-12aac: check the buffer length in the ADIF parserMax Kellermann1-0/+6
Check whether enough data has been read yet.
2008-11-12aac: use unsigned integers and size_t where appropriateMax Kellermann1-5/+6
2008-11-12aac: check if the stream is seekable before length checkMax Kellermann1-1/+2
If the stream is not seekable, don't try to decode all frames to find out the total song time.
2008-11-12aac: removed attribute "atEof"Max Kellermann1-14/+7
Use input_stream_eof() instead.
2008-11-12mpc: assume the result fo of mpc_decoder_decode() is unsignedMax Kellermann1-2/+2
According to the documentation, mpc_decoder_decode() returns an mpc_uint32_t. Since the special return value (mpc_uint32_t)-1 translates to a very large long integer, this may cause segmentation faults if not interpreted properly.
2008-11-12mpc: don't assume the stream is stereoMax Kellermann1-2/+1
Don't hard-code the factor "2".
2008-11-12mpc: get decoder command from decoder_data()Max Kellermann1-12/+9
Removed 3 superfluous decoder_get_command() invocations.
2008-11-12mpc: moved code to mpc_to_mpd_buffer()Max Kellermann1-14/+12
mpc_to_mpd_buffer() converts a whole chunk at a time. This eliminates 3 local variables in mpc_decode().
2008-11-12mpc: make the buffer large enough for one mpc frameMax Kellermann1-28/+11
Don't split the buffer conversion loop. When libmpcdec returns a chunk, convert and send the whole chunk at a time. This moves several checks out of the loop, and greatly improves performance.
2008-11-12mpc: use GLib instead of utils.h/log.hMax Kellermann1-9/+6
Don't use deprecated MPD libraries.
2008-11-12mpc: declare buffer as int32_t[]Max Kellermann1-4/+4
The buffer is always casted to int32_t* anyway; declare it as int32_t array, and remove the cast.
2008-11-11mpc: eliminated the local variable "eof"Max Kellermann1-8/+3
Since each "eof=true" is followed by "break", the variable is superfluous.
2008-11-11ogg: removed stray "}"Max Kellermann1-1/+0
Due to an unnoticed merge error, there was a superfluous "}". Remove it.
2008-11-11ogg: use ogg_fopen() instead of ogg_open()Max Kellermann1-8/+6
Move the reponsibility for freeing the file handle to libvorbis.
2008-11-11ogg: use GLib instead of utils.h/log.hMax Kellermann1-6/+8
2008-11-11ogg: get decoder command from decoder_data()Max Kellermann1-9/+8
Eliminate two decoder_get_command() invocations from the main loop.
2008-11-11ogg: flush buffer after every ov_read() callMax Kellermann1-25/+10
Don't let the buffer grow until it is full, flush it whenever there is data available.
2008-11-11mp3: support stream tagsMax Kellermann1-1/+8
Parse ID3 tags, even when they are in the middle of the stream. Very few streams provide embedded ID3 tags. Most of them send only Shoutcast "icy" tags, which limits the practical usefulness of this patch.