aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'v0.16.x'Max Kellermann2011-11-281-0/+6
|\ | | | | | | | | | | | | | | | | | | Conflicts: Makefile.am NEWS configure.ac src/encoder/flac_encoder.c src/log.c src/pcm_buffer.c
| * decoder_api: cancel initial seek when song is not seekableMax Kellermann2011-11-271-0/+6
| | | | | | | | Fixes assertion failure.
* | decoder_api: convert data to host byte orderMax Kellermann2011-10-101-0/+3
| |
* | audio: rename audio.[ch] to audio_config.[ch]Max Kellermann2011-10-101-1/+1
| |
* | Merge branch 'v0.16.x'Max Kellermann2011-10-061-15/+46
|\| | | | | | | | | | | | | | | Conflicts: configure.ac src/player_control.c src/player_thread.c src/playlist_song.c
| * decoder_api: call _prepare_initial_seek() in decoder_tag()Max Kellermann2011-10-061-1/+1
| | | | | | | | | | This checks both conditions: pending and running. Fixes yet another assertion failure!
| * decoder_api: move code to _prepare_initial_seek()Max Kellermann2011-10-061-7/+31
| | | | | | | | .. and add a few code comments.
| * decoder_control: add attributes start_ms, end_msMax Kellermann2011-10-051-4/+4
| | | | | | | | | | Don't read song.start_ms and song.end_ms, let the player thread manage this logic instead.
| * decoder_api: don't copy tag to pipe during initial seekMax Kellermann2011-10-051-3/+8
| | | | | | | | Fixes one more assertion failure.
| * decoder_api: clear initial_seek_running on errorMax Kellermann2011-10-041-1/+3
| | | | | | | | Fixes possible assertion failure.
* | Merge branch 'v0.16.x'Max Kellermann2011-09-221-6/+57
|\| | | | | | | | | Conflicts: src/player_thread.c
| * decoder_api: emulate SEEK command for initial seek to CUE trackMax Kellermann2011-09-221-6/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | When playing a CUE track, the player thread waited for the decoder to become ready, and then sent a SEEK command to the beginning of the CUE track. If that is near the start of the song file, and the track is short enough, the decoder could have finished decoding already at that point, and seeking fails. This commit makes this initial seek more robust: instead of letting the player thread deal with the difficult timings, let the decoder API emulate a SEEK command, and return it to the decoder plugin, as soon as the plugin finishes its initialization.
* | input_stream: non-blocking I/OMax Kellermann2011-09-161-3/+16
| | | | | | | | | | | | | | | | | | Add GMutex, GCond attributes which will be used by callers to conditionally wait on the stream. Remove the (now-useless) plugin method buffer(), wait on GCond instead. Lock the input_stream before each method call. Do the same with the playlist plugins.
* | decoder_api: remove the loop from decoder_read()Max Kellermann2011-09-161-16/+10
| | | | | | | | | | This was useless, because input_stream_read() blocks until data is available. Calling it in a loop doesn't make sense.
* | decoder_api: move code to decoder_check_cancel_read()Max Kellermann2011-09-161-12/+28
| |
* | decoder_internal: don't call input_stream_buffer()Max Kellermann2011-09-141-8/+7
| | | | | | | | | | | | This is not necessary since all relevant input plugins have been moved to the I/O thread, and there is no remaining useful buffer() implementation. This also fixes a busy loop when playing radio.
* | copyright year 2011Max Kellermann2011-01-291-1/+1
| |
* | decoder_control: store GCond object, not a player_controlMax Kellermann2011-01-101-9/+6
| | | | | | | | | | | | Remove the decoder dependency on player_control. All player_control was needed for is to signal the player thread, and we can do that with a simple GCond as well.
* | player_control: removed the global variable "pc"Max Kellermann2011-01-101-6/+6
|/ | | | | | | Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support.
* filter/replay_gain: added option "replaygain_limit"Daniel Seuthe2010-05-301-1/+2
|
* decoder_api: return effective replay gainDaniel Seuthe2010-05-181-1/+1
| | | | | Pay attention to the ReplayGain mode "auto" and the replay_gain_missing_preamp parameter inside of decoder_replay_gain().
* mixramp: Adjust MixRamp threshold to account for ReplayGain.Tim Phipps2010-05-081-2/+14
|
* Add support for MixRamp tagsTim Phipps2010-03-211-0/+12
| | | | | Adds mixrampdb and mixrampdelay commands. Reads MIXRAP_START and MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
* decoder_api: use the correct format to calculate elapsed timeMax Kellermann2010-03-171-1/+1
| | | | | | When decoder->timestamp is calculated, the PCM data is already converted to out_audio_format; using in_audio_format may cause funny speedups/slowdowns.
* replay_gain: reimplement as a filter pluginMax Kellermann2010-02-171-10/+17
| | | | | | | Apply the replay gain in the output thread. This means a new setting will be active instantly, without going through the whole music pipe. And we might have different replay gain settings for each audio output device.
* decoder_api: removed function decoder_get_uri()Max Kellermann2010-01-181-9/+0
| | | | Use input_stream.uri.
* replay_gain: moved code to replay_gain_config.cMax Kellermann2010-01-041-1/+1
|
* replay_gain: moved code to replay_gain_info.cMax Kellermann2010-01-041-0/+1
|
* replay_gain: refactor API, move code to replay_gain_state.cMax Kellermann2010-01-041-10/+6
| | | | | The replay_gain_state struct holds the precalculated scale factor, which is removed from struct replay_gain_info.
* decoder_api: added function decoder_replay_gain()Max Kellermann2010-01-041-3/+17
| | | | | | This function replaces the replay_gain_info parameter for decoder_data(). This allows the decoder to announce replay gain changes, instead of having to pass the same object over and over.
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* Merged release 0.15.7 from branch 'v0.15.x'Max Kellermann2009-12-271-1/+5
|\ | | | | | | | | | | | | Conflicts: NEWS configure.ac src/decoder_api.c
| * decoder_thread: eliminate jitter after seek failureMax Kellermann2009-12-261-1/+5
| | | | | | | | | | | | Don't clear the music pipe when seeking has failed - check the "seeking" flag instead of "command==SEEK". Clear the "seeking" flag in decoder_seek_error().
* | decoder, player: support song rangesMax Kellermann2009-12-271-2/+9
| | | | | | | | | | | | | | Seek the decoder to the start of the range before beginning with playback. Stop the decoder when the end of the range has been reached. Add the start position to the seek position. Expose the duration of the range, not the full song file.
* | decoder_api: added function decoder_timestamp()Max Kellermann2009-12-261-3/+19
| | | | | | | | | | | | Remove the data_time parameter from decoder_data(). This patch eliminates the timestamp counting in most decoder plugins, because the MPD core will do it automatically by default.
* | output_init: use the normalize filter pluginMax Kellermann2009-12-251-4/+0
| | | | | | | | | | | | Use the plugin instead of the glue code in normalize.c. This is used wrapped inside a "autoconv" filter, to enable normalization for all input file formats.
* | input_stream: return errors with GErrorMax Kellermann2009-12-151-1/+9
| |
* | fixed several gcc warnings on unused debug variablesMax Kellermann2009-12-141-1/+1
| |
* | decoder_api: prefer stream_tag over decoder_tagThomas Jansen2009-12-071-2/+2
| | | | | | | | | | | | If both tags (stream and decoder) are present, we prefer the stream tag. Fixes #2698, where ICY tag contained useful information, but was overwritten with bogus decoder tag data.
* | audio_format: added function audio_format_to_string()Max Kellermann2009-11-141-8/+6
| | | | | | | | | | Unified function for converting an audio_format object to a string, for log messages and for the "status" command.
* | include config.h in all sourcesMax Kellermann2009-11-121-0/+1
| | | | | | | | | | | | After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
* | decoder_control: merge next_song and current_songMax Kellermann2009-11-031-1/+1
| | | | | | | | These two variables are redundant, we need only one of them.
* | decoder_api: check decoder==NULL in decoder_read()Max Kellermann2009-11-011-1/+2
| | | | | | | | It's legal to pass decoder=NULL to decoder_read(). Add a check.
* | decoder_control: removed the global variable "dc"Max Kellermann2009-10-311-62/+80
| | | | | | | | | | Allocate a decoder_control object where needed, and pass it around. This will allow more than one decoder thread one day.
* | player_control: protect command, state, error with a mutexMax Kellermann2009-10-311-5/+5
| | | | | | | | | | | | Use GMutex/GCond instead of the notify library. Manually lock the player_control object before accessing the protected attributes. Use the GCond object to notify the player thread and the main thread.
* | decoder_control: protect command, state with a mutexMax Kellermann2009-08-131-5/+14
| | | | | | | | | | | | Replace decoder_control.notify with decoder_control.mutex and decoder_control.cond. Lock the mutex on all accesses to decoder_control.command and decoder_control.state.
* | pcm_convert: use GError for error handlingMax Kellermann2009-07-231-8/+10
| | | | | | | | | | Don't abort the whole MPD process when the conversion fails. This has been a denial-of-service attack vector for years.
* | Preamp for missing replay-gainDaniel Seuthe2009-06-251-2/+1
|/
* decoder_api: removed dc.pipe assertion from decoder_read()Max Kellermann2009-04-261-1/+0
| | | | | | Database update was broken due to the dc.pipe!=NULL assertion. This assertion is only valid while MPD decodes a song, not during database update.
* decoder: added assertions on dc.pipeMax Kellermann2009-04-251-0/+11
| | | | | dc.pipe must be non-NULL while the decoder thread is running. Ensure that with a load of assertions.