aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/oggvorbis_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-01-17oggvorbis: disable seeking on remote songsMax Kellermann1-5/+27
When libvorbis knows that a song is seekable, it seeks around like crazy in the file before starting to decode it. This is very expensive on remote HTTP resources, and delays MPD for 10 or 20 seconds. This patch disables seeking on remote songs, because the advantages of quickly playing a song seem to weigh more than the theoretical ability of seeking for most MPD users. If users feel this feature is needed, we will make a configuration option for that.
2009-01-15oggvorbis: map "Album Artist" to "AlbumArtist"Rasmus Steinke1-1/+3
This patch allows mpd to recognise the albumartist tag in the way foobar2000 and others write it to files.
2009-01-14oggvorbis: use g_ascii_strncasecmp() instead of strncasecmp()Max Kellermann1-3/+3
Don't depend on the daemon's locale settings. Comment names are ASCII.
2009-01-14oggvorbis: moved tag look into vorbis_parse_comment()Max Kellermann1-23/+13
vorbis_parse_comment() should be a function which converts one comment to a tag item. It should do everything required to do the conversion, including looping over all possible tag types.
2009-01-14oggvorbis: moved code to vorbis_copy_comment()Max Kellermann1-9/+21
2009-01-14oggvorbis: use vorbis_comment_value() in vorbis_parse_comment()Max Kellermann1-5/+4
Eliminate some duplicate code.
2009-01-14oggvorbis: always allocate a tag objectMax Kellermann1-8/+14
Always allocate a new tag object before parsing the vorbis comments; free it when it turns out to be empty. This simplifies the code a bit.
2009-01-14oggvorbis: no CamelCaseMax Kellermann1-59/+63
Renamed functions and variables.
2009-01-14oggvorbis: use boolMax Kellermann1-5/+5
Make ogg_parseCommentAddToTag() return bool instead of unsigned int.
2009-01-08added missing explicit config.h includesMax Kellermann1-0/+1
2009-01-05fix G_BYTE_ORDER checkMax Kellermann1-1/+1
"#ifdef G_BYTE_ORDER == G_BIG_ENDIAN" cannot work, of course.
2009-01-05use GLib byte order macrosMax Kellermann1-1/+1
2009-01-01decoder plugins: don't include gcc.hMax Kellermann1-1/+1
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2008-11-24flac, mpc, ogg, wavpack: include unistd.h for SEEK_SETMax Kellermann1-0/+1
SEEK_SET is defined by unistd.h. Explicitly include it.
2008-11-21decoder: check audio_format_valid() in all decodersMax Kellermann1-0/+9
Refuse to play audio formats which are not supported by MPD.
2008-11-20ogg: moved the "errorStr" variable into the error handlerMax Kellermann1-1/+2
2008-11-20ogg: check the ov_read() return value before the vorbis_info evaluationMax Kellermann1-7/+6
The ov_info() return value may be corrupt when ov_read() did not return a positive value. First check for success, then check ov_info().
2008-11-12ogg: revert "use ogg_fopen() instead of ogg_open()"Max Kellermann1-6/+9
Unfortunately, ov_fopen() is not supported by libvorbis versions older than 1.2.
2008-11-11ogg: removed stray "}"Max Kellermann1-1/+0
Due to an unnoticed merge error, there was a superfluous "}". Remove it.
2008-11-11ogg: use ogg_fopen() instead of ogg_open()Max Kellermann1-8/+6
Move the reponsibility for freeing the file handle to libvorbis.
2008-11-11ogg: use GLib instead of utils.h/log.hMax Kellermann1-6/+8
2008-11-11ogg: get decoder command from decoder_data()Max Kellermann1-9/+8
Eliminate two decoder_get_command() invocations from the main loop.
2008-11-11ogg: flush buffer after every ov_read() callMax Kellermann1-25/+10
Don't let the buffer grow until it is full, flush it whenever there is data available.
2008-11-11decoder: return void from decode() methodsMax Kellermann1-5/+4
The stream_decode() and file_decode() methods returned a boolean, indicating whether they were able to decode the song. This is redundant, since we already know that: if decoder_initialized() has been called (and dc.state==DECODE), the plugin succeeded. Change both methods to return void.
2008-11-11replay_gain: converted struct replay_gain_info elements to an arrayMax Kellermann1-4/+4
Having an array instead of individual variables allows the use of the replay_gain_mode enum as an array index.
2008-11-11ogg: ogg_getReplayGainInfo() returns replay_gain_info pointerMax Kellermann1-13/+20
Some code simplification. Avoid pointers to pointers.
2008-11-11replay_gain: no CamelCaseMax Kellermann1-10/+12
Renamed functions and variables.
2008-11-10decoder: removed plugin method try_decode()Max Kellermann1-7/+7
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-04decoder: removed stream_typesMax Kellermann1-1/+0
Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
2008-11-03decoder_api: automatically send stream tagMax Kellermann1-10/+0
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-02ogg, ffmpeg: try to decode, even when the stream is not seekableMax Kellermann1-5/+0
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-02decoder_api: added decoder_tag()Max Kellermann1-2/+6
Provide an API for submitting additional tags from the stream.
2008-11-02decoder_api: pass "seekable" flag to decoder_initialized()Max Kellermann1-2/+2
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-01decoder: make the suffixes and mime_types arrays really constMax Kellermann1-5/+7
The strings were constant, but the pointers weren't. C syntax is somewhat tricky..
2008-11-01decoder: make all decoder_plugin structs constMax Kellermann1-1/+1
All decoder_plugin structs are initialized at compile time, and must never change.
2008-10-31decoder_api: pass constant path pointersMax Kellermann1-1/+1
2008-10-30decoder: use bool for return values and flagsMax Kellermann1-12/+12
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
2008-10-29decoder: automatically flush the output buffer after decoder exitsMax Kellermann1-3/+0
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-29decoder_api: removed decoder_clear()Max Kellermann1-1/+0
Call ob_clear() in decoder_command_finished() instead of implementing that call in every decoder plugin.
2008-10-26input_stream: use "bool" instead of "int"Max Kellermann1-1/+1
For boolean values and success flags, use bool instead of integer (1/0 for true/false, 0/-1 for success/failure).
2008-10-26input_stream: no CamelCaseMax Kellermann1-2/+2
Renamed all functions and variables.
2008-10-26input_stream: removed the InputStream typedefMax Kellermann1-4/+6
Everybody should use struct input_stream.
2008-10-26renamed src/inputPlugins/ to src/decoder/Max Kellermann1-0/+0
These plugins are not input plugins, they are decoder plugins. No CamelCase in the directory name.
2008-10-17Makefile.am: don't compile disabled decoder pluginsMax Kellermann1-11/+0
Don't compile the sources of disabled decoder plugins at all, and don't attempt to register these.
2008-10-10audio_format: renamed sampleRate to sample_rateMax Kellermann1-2/+2
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
2008-10-08use the "bool" data type instead of "int"Max Kellermann1-3/+3
"bool" should be used in C99 programs for boolean values.
2008-09-29use C99 struct initializersMax Kellermann1-10/+7
The old struct initializers are error prone and don't allow moving elements around. Since we are going to overhaul some of the APIs soon, it's easier to have all implementations use C99 initializers.
2008-09-07audio_format: converted typedef AudioFormat to struct audio_formatMax Kellermann1-1/+1
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
2008-08-29tag: renamed functions, no CamelCaseMax Kellermann1-7/+7
2008-08-29tag: renamed MpdTag and MpdTagItem to struct tag, struct mpd_tag_itemMax Kellermann1-6/+6
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.