Max Kellermann
e2c07dbbbc
ogg: ogg_getReplayGainInfo() returns replay_gain_info pointer
...
Some code simplification. Avoid pointers to pointers.
2008-11-11 16:19:00 +01:00
Max Kellermann
114b3c1e78
replay_gain: no CamelCase
...
Renamed functions and variables.
2008-11-11 15:55:34 +01:00
Max Kellermann
ff1acefb21
decoder: removed plugin method try_decode()
...
Instead of having a seprate try_decode() method, let the
stream_decode() and file_decode() methods decide whether they are able
to decode the song.
2008-11-10 15:07:01 +01:00
Max Kellermann
85a7d1a148
decoder: removed stream_types
...
Instead of checking the stream_types bit set, we can simply check
whether the methods stream_decode() and file_decode() are implemented.
2008-11-04 17:10:19 +01:00
Max Kellermann
ac96022c1d
decoder_api: automatically send stream 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.
2008-11-03 18:24:01 +01:00
Max Kellermann
4d069b4991
ogg, ffmpeg: try to decode, even when the stream is not seekable
...
Ogg and ffmpeg detection was disabled when the stream was not
seekable, because the detection was too expensive. Since the curl
input stream can now rewind the stream cheaply, we can re-enable
detection on streams.
2008-11-02 17:06:32 +01:00
Max Kellermann
020c04e702
decoder_api: added decoder_tag()
...
Provide an API for submitting additional tags from the stream.
2008-11-02 17:02:28 +01:00
Max Kellermann
c9e15bc418
decoder_api: pass "seekable" flag to decoder_initialized()
...
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.
2008-11-02 17:01:51 +01:00
Max Kellermann
4c1b96c307
decoder: make the suffixes and mime_types arrays really const
...
The strings were constant, but the pointers weren't. C syntax is
somewhat tricky..
2008-11-01 14:55:23 +01:00
Max Kellermann
0b614fbaae
decoder: make all decoder_plugin structs const
...
All decoder_plugin structs are initialized at compile time, and must
never change.
2008-11-01 14:54:09 +01:00
Max Kellermann
78448fe1a5
decoder_api: pass constant path pointers
2008-10-31 15:56:43 +01:00
Max Kellermann
62d4fa9306
decoder: use bool for return values and flags
...
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
2008-10-30 08:38:54 +01:00
Max Kellermann
528b7c3f5e
decoder: automatically flush the output buffer after decoder exits
...
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().
2008-10-29 17:29:06 +01:00
Max Kellermann
be90199c5a
decoder_api: removed decoder_clear()
...
Call ob_clear() in decoder_command_finished() instead of implementing
that call in every decoder plugin.
2008-10-29 17:28:47 +01:00
Max Kellermann
5c19776f2f
input_stream: use "bool" instead of "int"
...
For boolean values and success flags, use bool instead of integer (1/0
for true/false, 0/-1 for success/failure).
2008-10-26 20:56:46 +01:00
Max Kellermann
dbc7e9ba2f
input_stream: no CamelCase
...
Renamed all functions and variables.
2008-10-26 20:34:47 +01:00
Max Kellermann
21b8590b53
input_stream: removed the InputStream typedef
...
Everybody should use struct input_stream.
2008-10-26 19:54:57 +01:00
Max Kellermann
e11355f47d
renamed src/inputPlugins/ to src/decoder/
...
These plugins are not input plugins, they are decoder plugins. No
CamelCase in the directory name.
2008-10-26 11:29:25 +01:00