aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_thread.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* decoder_thread: create GError for mapper failureMax Kellermann2012-08-151-0/+3
| | | | Fixes crash.
* decoder_control: add GError attributeMax Kellermann2012-08-081-1/+17
|
* Merge branch 'v0.16.x'Max Kellermann2012-05-291-0/+4
|\ | | | | | | | | Conflicts: NEWS
| * decoder_api: log the decoder plugin nameMax Kellermann2012-05-291-0/+4
| |
| * decoder_thread: add missing stdio.h includeMax Kellermann2011-10-131-0/+1
| |
* | decoder/{pcm,dsdiff}: add missing stdio.h includeMax Kellermann2011-10-091-0/+1
| |
* | Merge branch 'v0.16.x'Max Kellermann2011-10-061-1/+1
|\| | | | | | | | | | | | | | | Conflicts: configure.ac src/player_control.c src/player_thread.c src/playlist_song.c
| * decoder_control: add attributes start_ms, end_msMax Kellermann2011-10-051-1/+1
| | | | | | | | | | Don't read song.start_ms and song.end_ms, let the player thread manage this logic instead.
* | Merge branch 'v0.16.x'Max Kellermann2011-09-221-0/+2
|\| | | | | | | | | Conflicts: src/player_thread.c
| * decoder_api: emulate SEEK command for initial seek to CUE trackMax Kellermann2011-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-24/+20
| | | | | | | | | | | | | | | | | | 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.
* | copyright year 2011Max Kellermann2011-01-291-1/+1
| |
* | decoder_thread: fix assertion failure at song endMax Kellermann2011-01-161-2/+1
| | | | | | | | | | | | Don't finish the current command twice. This bug was never noticed, but was revealed by a new assertion check.
* | decoder_control: store GCond object, not a player_controlMax Kellermann2011-01-101-2/+1
| | | | | | | | | | | | 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.
* | decoder_thread: move code to decoder_command_finished_locked()Max Kellermann2011-01-101-8/+19
| |
* | player_control: removed the global variable "pc"Max Kellermann2011-01-101-3/+3
|/ | | | | | | 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.
* decoder_thread: load APE replay gain from music filesMax Kellermann2010-11-181-0/+15
|
* eliminate g_error() usageThomas Jansen2010-09-251-1/+2
| | | | | | | | | | | | | | Replaced all occurrences of g_error() with MPD_ERROR() located in a new header file 'mpd_error.h'. This macro uses g_critical() to print the error message and then exits gracefully in contrast to g_error() which would internally call abort() to produce a core dump. The macro name is distinctive and allows to find all places with dubious error handling. The long-term goal is to get rid of MPD_ERROR() altogether. To facilitate the eventual removal of this macro it was added in a new header file rather than to an existing header file. This fixes #2995 and #3007.
* mixramp: Adjust MixRamp threshold to account for ReplayGain.Tim Phipps2010-05-081-0/+2
|
* Add support for MixRamp tagsTim Phipps2010-03-211-0/+11
| | | | | Adds mixrampdb and mixrampdelay commands. Reads MIXRAP_START and MIXRAMP_END tags from FLAC files and overlaps instead of crossfading.
* replay_gain: reimplement as a filter pluginMax Kellermann2010-02-171-6/+0
| | | | | | | 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_thread: don't fall back to "mad" unless no plugin matchesMax Kellermann2010-01-171-1/+2
| | | | | | | | | | | | | When all plugins have failed, MPD used to fall back to the "mad" decoder plugin, to handle those radio streams without a Content-Type response header. This however leads to unexpected results (garbage being played) when the stream isn't really mp3. Since we care little about "bad" streams, we shouldn't have hacks which have bad side effects. Let's get rid of this hack now! Only try to "mad" plugin if there was no match at all (Content-Type, path suffix) and no other plugin has been tried.
* decoder_thread: don't try a plugin twice (MIME type & suffix)Max Kellermann2010-01-171-10/+56
| | | | Manage a linked list of plugins which were already tried.
* 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-3/+4
| | | | | 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-0/+5
| | | | | | 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.
* input_stream: return allocated input_stream objectsMax Kellermann2010-01-011-20/+22
| | | | | | | | Major API redesign: don't let the caller allocate the input_stream object. Let each input plugin allocate its own (derived/extended) input_stream pointer. The "data" attribute can now be removed, and all input plugins simply cast the input_stream pointer to their own structure (with an "struct input_stream base" as the first attribute).
* Update copyright notices.Avuton Olrich2009-12-311-1/+1
|
* decoder_api: added function decoder_timestamp()Max Kellermann2009-12-261-0/+1
| | | | | | 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.
* input_stream: return errors with GErrorMax Kellermann2009-12-151-3/+13
|
* 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_thread: close input fileMax Kellermann2009-11-071-3/+10
| | | | | An input_stream_close() call was missing after today's code reorganization.
* decoder_thread: check for STOP before calling the pluginMax Kellermann2009-11-071-0/+6
| | | | | Before calling the plugin's decode method, we should ensure that we didn't receive a STOP command during initialization.
* decoder_thread: moved code to decoder_input_stream_open()Max Kellermann2009-11-071-27/+50
| | | | | | This function opens the stream and waits for it to become ready; meanwhile it checks for STOP commands. It is code moved from decoder_run_stream().
* decoder_thread: added local variable "dc" in decoder_run_file()Max Kellermann2009-11-071-6/+7
| | | | Simplify the expressions.
* decoder_list: pass previous plugin pointer to lookup functionsMax Kellermann2009-11-071-6/+4
| | | | Remove the static integer hack, that's not thread safe and sucks.
* decoder_thread: open input stream on demandMax Kellermann2009-11-071-72/+59
| | | | | | Moved the global input stream opener to decoder_run_stream(). decoder_run_file() now opens the input stream each time a plugin provides a stream decoder method.
* decoder_thread: moved plugin loops to separate functionsMax Kellermann2009-11-071-82/+127
| | | | Tame the large decoder_run_song() function.
* decoder_thread: initialize decoder_control.quitMax Kellermann2009-11-041-0/+2
| | | | If left uninitialized, then the decoder thread quits spuriously.
* decoder_control: merge next_song and current_songMax Kellermann2009-11-031-2/+3
| | | | These two variables are redundant, we need only one of them.
* decoder_thread: unlock the decoder while checking the streamMax Kellermann2009-11-031-4/+4
| | | | | | This is only a slight change to the previous locking behaviour: keep the decoder unlocked during the loop, and lock it only while checking decoder_control.command.
* decoder_thread: open input stream after command finishedMax Kellermann2009-11-031-5/+10
| | | | | Return the result to the caller more quickly. This unifies error handling: no error can be reported before the command is finished.
* decoder_control: make the song objects constMax Kellermann2009-11-031-1/+1
| | | | They are just informational.
* decoder_control: removed the global variable "dc"Max Kellermann2009-10-311-58/+67
| | | | | 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-9/+3
| | | | | | 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.
* mapper, update, ...: use g_build_filename(), G_DIR_SEPARATOR, ...Max Kellermann2009-10-201-1/+1
| | | | | Try to be as portable as possible, use GLib path name functions and macros.
* decoder_thread: removed redundant NULL assignmentsMax Kellermann2009-10-111-2/+1
| | | | | The while() clause resets the "plugin" variable. We don't need to reset it at the end of the loop body.
* Merge branch 'v0.15.x'Max Kellermann2009-10-111-1/+1
|\ | | | | | | | | | | | | Conflicts: NEWS configure.ac
| * decoder_thread: change the fallback decoder name to "mad"Max Kellermann2009-10-111-1/+1
| | | | | | | | | | | | When there is no Content-Type response header, try the "mad" decoder plugin. It uesd to be named "mp3", and we forgot to change the fallback name in decoder_thread.c.