aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_api.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* decoder_api: submit the song tag to the music pipeMax Kellermann2009-04-131-6/+12
| | | | | | When a new song starts playing, send its tag (song->tag) to the music pipe. This allows output plugins to render tags for all songs, not only those with embedded tags understood by the decoder plugin.
* all: Update copyright header.Avuton Olrich2009-03-131-7/+7
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* pipe: added music_buffer, rewrite music_pipeMax Kellermann2009-03-061-16/+21
| | | | | | | | Turn the music_pipe into a simple music_chunk queue. The music_chunk allocation code is moved to music_buffer, and is now managed with a linked list instead of a ring buffer. Two separate music_pipe objects are used by the decoder for the "current" and the "next" song, which greatly simplifies the cross-fading code.
* music_pipe: added music_pipe_push()Max Kellermann2009-03-061-33/+45
| | | | | | | Added music_pipe_allocate(), music_pipe_push() and music_pipe_cancel(). Those functions allow the caller (decoder thread in this case) to do its own chunk management. The functions music_pipe_flush() and music_pipe_tag() can now be removed.
* decoder_api: log audio format in a debug messageMax Kellermann2009-03-011-0/+14
| | | | | To aid debugging, print the audio format of the decoder plugin in a debug message, and print information about PCM conversion.
* decoder_api: fixed shadow warning, rename "wait"Max Kellermann2009-02-191-2/+2
| | | | | The parameter name "wait" overlaps with the POSIX wait() function. Rename it.
* utils: use g_usleep() instead of my_usleep()Max Kellermann2009-02-191-2/+1
| | | | | | | Now that I've found this nice function in the GLib docs, we can finally remove our custom sleep function. Still all those callers of g_usleep() have to be migrated one day to use events, instead of regular polling.
* decoder_api: moved struct decoder_plugin to decoder_plugin.hMax Kellermann2009-02-151-0/+1
| | | | | | The decoder_plugin struct is used by both the MPD core and the decoder plugin implementations. Move it to a shared header file, to minimize header dependencies.
* decoder_api: always notify_wait() for free chunksMax Kellermann2009-01-171-2/+1
| | | | | | | One of the previous patches made MPD consume 100% CPU in a busy wait: when the music_pipe was full, it did not wait (with notify_wait()) for free chunks, because a variable has a different meaning now. Always pass "true" as the "wait" parameter.
* decoder_api: pass const pointer to decoder_data()Max Kellermann2009-01-171-1/+1
|
* pcm_convert: return PCM buffer from pcm_convert()Max Kellermann2009-01-171-20/+6
| | | | | | Removed yet another superfluous buffer layer: return the PCM buffer from pcm_convert() instead of copying PCM data into the caller-supplied buffer.
* decoder_api: use music_pipe_write() instead of music_pipe_append()Max Kellermann2009-01-171-14/+33
| | | | | Copy PCM data to the music_pipe_write() buffer, and apply replay gain / normalization to it, instead of manipulating the source buffer.
* decoder_api: added assertion on partial framesMax Kellermann2009-01-161-0/+1
| | | | Decoder plugins must not send partial frames.
* decoder_api: added G_GNUC_UNUSED attribute to decoder_initialized()Max Kellermann2009-01-151-1/+1
| | | | In NDEBUG, the parameter "decoder" is not used.
* decoder_api: don't ignore DECODE_COMMAND_STOPMax Kellermann2009-01-131-2/+1
| | | | | | When the decoder thread is waiting for free chunks in the music pipe, don't ignore the STOP command. Just return dc.command without further checks.
* pcm: added pcm_convert_deinit(), pcm_resample_deinit()Max Kellermann2009-01-071-2/+0
| | | | | Free memory allocated by libsamplerate when the output or the decoder is closed.
* song: allocate the result of song_get_url()Max Kellermann2009-01-041-3/+2
|
* input_stream: added tag() methodMax Kellermann2009-01-031-65/+59
| | | | | The tag() method reads a tag from the stream. This replaces the meta_name and meta_title attributes.
* decoder_api: moved code to do_send_tag(), free temporary tagMax Kellermann2009-01-031-7/+17
| | | | | | | This patch fixes a minor memory leak: when decoder_tag() attempted to send a merged tag object (created by tag_add_stream_tags()), and was interrupted by a decoder command, it did not free the temporary merged tag object.