| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
When a command is sent while the decoder waits for a free chunk in the
music pipe, it was not returned by decoder_data().
|
|
|
|
| |
Prevent superfluous wakeups and a deadlock condition.
|
|
|
|
|
|
| |
Seeking was somewhat broken in some decoder plugins because they sent
empty chunks, and never got a command. Check the decoder command
before doing anything else in decoder_data().
|
|
|
|
|
| |
When the decoder receives a SEEK during initialization, it should
ignore that for now. The old code made most decoders abort.
|
|
|
|
| |
Renamed functions and variables.
|
|
|
|
|
|
| |
The assertion on dc.state in decoder_read() was too strict: when a
decoder tried to call decoder_read() from tag_dup(), the decoder state
was NONE. Allow this special case.
|
|
|
|
| |
Added a lot of assertions checking the state of the decoder plugin.
|
|
|
|
| |
Renamed variables and functions.
|
|
|
|
|
| |
Before passing the first chunk to the audio output device, send the
current song's tag.
|
|
|
|
|
|
|
|
|
|
| |
If an input stream provides tags (e.g. from an icecast server), send
them in the decoder_data() and decoder_tag() methods. Removed the
according code from the mp3 and oggvorbis plugins - decoders shouldn't
have to care about stream tags.
This patch also adds the missing decoder_tag() invocation to the mp3
plugin.
|
|
|
|
| |
Renamed variables.
|
|
|
|
| |
Provide an API for submitting additional tags from the stream.
|
|
|
|
|
|
| |
Don't pass the "seekable" flag with every decoder_data() invocation.
Since that flag won't change within the file, it is enough to pass it
to decoder_initialized() once per file.
|
|
|
|
|
|
|
| |
.. and rename dc.audioFormat to dc.in_audio_format. The music pipe
does not need to know the audio format, and its former "audioFormat"
property indicated the format of the most recently added chunk, which
might be confusing when you are reading the oldest chunks.
|
|
|
|
| |
Rename all functions to the new prefix.
|
|
|
|
|
|
|
| |
No CamelCase in the file name. The output_buffer struct is going to
be renamed to music_pipe. There are so many buffer levels in MPD, and
calling this one "output buffer" is wrong, because it's not the last
buffer before the music reaches the output devices.
|
|
|
|
|
| |
Currently, there is no way to dynamically load decoder plugins, thus
we don't need a dynamic list to manage them.
|
|
|
|
|
| |
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
|
|
|
|
|
|
|
| |
A decoder_flush() invocation was missing in the FLAC plugin, resulting
in casual assertion failures due to a wrong assumption about the last
chunk's audio format. It's much easier to remove that decoder_flush()
function and make the decoder thread call ob_flush().
|
|
|
|
|
| |
There are no callers which pass audio_format==NULL, and it shouldn't
be allowed.
|
|
|
|
|
| |
Call ob_clear() in decoder_command_finished() instead of implementing
that call in every decoder plugin.
|
|
|
|
|
| |
need_chunks() returns a decoder_command enum. Store its return value
as this type.
|
|
|
|
| |
Renamed all functions and variables.
|
|
|
|
|
|
| |
Instead of manually calling memset(0) on the pcm_convert_state struct,
client code should use a library function from pcm_utils.c. This way,
we can change the semantics of the struct easily.
|
|
|
|
| |
Renamed all functions which were still in CamelCase.
|
|
|
|
|
| |
The nmemb argument isn't actually useful, and one of nmemb and size
was always passed as 1. Remove it.
|
|
|
|
|
| |
Provide a struct type which can be forward-declared. The typedef
InputStream is deprecated now.
|
|
|
|
| |
CamelCase is ugly... rename all functions.
|
|
|
|
| |
"bool" should be used in C99 programs for boolean values.
|
|
|
|
|
| |
When there are standardized headers, use these instead of the bloated
os_compat.h.
|
|
|
|
| |
Again, a data type which can be forward-declared.
|
|
|
|
|
| |
Do full C99 integer type conversion in all modules which were not
touched by Eric's merged patch.
|
|
|
|
|
| |
Rename it to audio_format_equals() and return "true" if they are
equal.
|
|
|
|
|
| |
Get rid of CamelCase, and don't use a typedef, so we can
forward-declare it, and unclutter the include dependencies.
|
|
|
|
|
| |
Give player.c a better name, meaning that the code is used to control
the player thread.
|
| |
|
|
|
|
|
| |
This is the last of the three variables. Now we don't need
playerData.h anymore in most sources.
|
|
|
|
|
|
|
| |
This releases several include file dependencies. As a side effect,
"CHUNK_SIZE" isn't defined by decoder_api.h anymore, so we have to
define it directly in the plugins which need it. It just isn't worth
it to add it to the decoder plugin API.
|
|
|
|
|
| |
Now that "dc" is available here, we don't have to pass it to
decoder_is_idle() and decoder_is_starting() anymore.
|
|
|
|
|
|
|
|
|
|
| |
This flag is used internally; it is set by decoder_seek_where(), and
indicates that the decoder plugin has begun the seek process. It is
used for the case that the decoder plugin has to read data during the
seek process. Before this patch, that was impossible, because
decoder_read() would refuse to read data unless dc->command is NONE.
This patch is kind of a dirty workaround, and needs to be redesigned
later.
|
|
|
|
|
|
|
|
|
| |
On our way to stabilize the decoder API, we will one day remove the
input stream functions. The most basic function, read() will be
provided by decoder_api.h with this patch. It already contains a loop
(still with manual polling), error/eof handling and decoder command
checks. This kind of code used to be duplicated in all decoder
plugins.
|
|
|
|
|
|
|
| |
With the functions decoder_plugin_register() and
decoder_plugin_unregister(), decoder plugins can register a
"secondary" plugin, like the flac input plugin does this for
"oggflac".
|
|
|
|
|
| |
(Ab)use the decoder_command enumeration, which has nearly the same
values and the same meaning.
|
|
|
|
|
|
| |
The wavpack decoder plugin implements a hack, and it needs the song
URL for that. This API (and the hack) should be revised later, but
add that function for now.
|
|
|
|
|
| |
Provide access to seeking for the decoder plugins; they have to know
where to seek, and they need a way to tell us that seeking has failed.
|
|
|
|
|
|
|
| |
Some decoder commands are implemented in the decoder plugins, thus
they need to have an API call to signal that their current command has
been finished. Let them use the new decoder_command_finished()
instead of the internal dc_command_finished().
|
|
|
|
|
|
| |
Another big patch which hides internal mpd APIs from decoder plugins:
decoder plugins regularly poll dc->command; expose it with a
decoder_api.h function.
|
|
|
|
|
|
| |
Since we moved all PCM conversions to decoder_data(), the attribute
convState isn't being used anymore by the OutputBuffer code. Move it
to struct decoder.
|
|
|
|
|
| |
We want to expose the AudioFormat structure to plugins; remove some
clutter by moving its declaration to a separate header file.
|
|
|
|
|
| |
Similar to the previous patch: pass total_time instead of manipulating
dc->totalTime directly.
|