aboutsummaryrefslogtreecommitdiff
path: root/src/decoder/flac_plugin.c
Commit message (Collapse)AuthorAge
* Merge vorbis+icy fixes from branch 'v0.15.x'Max Kellermann2009-12-30
|\ | | | | | | | | | | | | | | | | Conflicts: Makefile.am NEWS configure.ac src/input/curl_input_plugin.c src/input_stream.c
| * decoder/{ffmpeg,flac,vorbis}: added more flac/vorbis MIME typesMax Kellermann2009-12-29
| | | | | | | | | | Support deprecated MIME types such as "audio/x-ogg". Support new types such as "audio/flac".
* | input_stream: return errors with GErrorMax Kellermann2009-12-15
| |
* | decoder/flac: check "seekable" in libFLAC callbacksMax Kellermann2009-11-11
| | | | | | | | | | Return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED if this input stream does not support seeking.
* | decoder/flac: moved code to flac_data_get_audio_format()Max Kellermann2009-11-11
| | | | | | | | | | | | Remove the audio_format attribute, add "frame_size" instead. The audio_format initialization and check is moved both to flac_data_get_audio_format().
* | decoder/flac: use stream_info instead of audio_formatMax Kellermann2009-11-11
| | | | | | | | | | Use the sample rate stored in the stream_info struct instead of the audio_format struct.
* | decoder/flac: calculate time stamp from current frameMax Kellermann2009-11-11
| | | | | | | | | | | | | | | | | | Don't update a float timestamp, this will make imprecisions add up after a while. We already have the number of the current frame, let's just calculate the float timestamp from that for every decoder_data() command. For this, we need to add the attribute "first_frame", for CUE sheet songs.
* | decoder/flac: calculate bit rate in flac_common_write()Max Kellermann2009-11-11
| | | | | | | | | | | | Removed the "bit_rate" attribute from the flac_data struct. Pass the number of bytes since the last call to flac_common_write(), and let it calculate the bit rate.
* | decoder/flac: store the whole stream info object, not durationMax Kellermann2009-11-11
| | | | | | | | | | | | | | We don't want to work with floating point values if possible. Get the integer number of frames from the FLAC__StreamMetadata_StreamInfo object, and convert it into a float duration on demand. This patch adds a check if the STREAMINFO packet has been received yet.
* | decoder/flac: merge code into flac_decoder_initialize()Max Kellermann2009-11-11
| | | | | | | | | | Wrapper for FLAC__stream_decoder_process_until_end_of_metadata(), decoder_initialized().
* | decoder/flac: merged code into flac_decoder_new()Max Kellermann2009-11-11
| | | | | | | | | | Convenience wrapper for FLAC__stream_decoder_new() and FLAC__stream_decoder_set_metadata_respond().
* | decoder/flac: free the "pathname" variable earlierMax Kellermann2009-11-11
| | | | | | | | | | Free the pointer right after its last use, i.e. after the FLAC__stream_decoder_init_file() call.
* | decoder/flac: emulate FLAC__stream_decoder_init_stream()Max Kellermann2009-11-11
| | | | | | | | Remove the wrapper flac_init().
* | decoder/flac: use the new API functionsMax Kellermann2009-11-11
| | | | | | | | | | Use the type and function names of the libFLAC 1.1.3 API. Map the new API to the old one with macros.
* | decoder/flac: removed the fake flac_ogg_init() fallbackMax Kellermann2009-11-11
| | | | | | | | Don't even try to call it with an old libFLAC API.
* | decoder/flac: moved code to flac_compat.hMax Kellermann2009-11-11
| |
* | decoder/{flac,vorbis}: include config.h for LFSMax Kellermann2009-11-11
| | | | | | | | Allow those plugins to open large files on 32 bit platforms.
* | decoder/flac: merged code into flac_decoder_loop()Max Kellermann2009-11-11
| | | | | | | | | | | | | | The decoder loop of flac_decode_internal(), flac_container_decode() and flac_filedecode_internal() is merged into this one function. This unifies the code, and uses the frame number to identify the end of a CUE sub song.
* | decoder/flac: keep track of current frame numberMax Kellermann2009-11-11
| | | | | | | | We need this for more exact end-of-subsong detection for CUE files.
* | Merge remote branch 'origin/v0.15.x'Max Kellermann2009-11-11
|\|
| * decoder/flac: fixed CUE seeking range checkMax Kellermann2009-11-11
| | | | | | | | | | | | If flac_container_decode() gets a seek destination which is out of range, it ignores the SEEK command (never finishes it). This leads to MPD lockup, because the player thread waits for completion.
* | decoder/flac: removed redundant NULL checksMax Kellermann2009-11-11
| | | | | | | | After the decoder loop, "flac_dec" is always set.
* | decoder/flac: moved code to flac_metadata.cMax Kellermann2009-11-11
| |
* | decoder/flac: merged some code into flac_tag_apply_metadata()Max Kellermann2009-11-11
| |
* | decoder/flac: don't use float to calculate song durationMax Kellermann2009-11-10
| | | | | | | | | | Simple (up-rounding) integer division is good enough. We're casting the result back to an integer anyway.
* | decoder/flac: pass VorbisComment to comments_to_tag()Max Kellermann2009-11-10
| |
* | decoder/flac: added function flac_data_deinit()Max Kellermann2009-11-10
| | | | | | | | Clean up tag and replay_gain_info there.
* | Merged release 0.15.5 from branch 'v0.15.x'Max Kellermann2009-10-18
|\| | | | | | | | | | | | | | | Conflicts: NEWS configure.ac src/decoder/flac_plugin.c src/update.c
| * decoder/flac: fixed two memory leaks in the CUE tag loaderMax Kellermann2009-10-16
| | | | | | | | | | | | Don't initialize "vc" and "cs" with FLAC__metadata_object_new(); that value is overwritten by FLAC__metadata_get_tags() and FLAC__metadata_get_cuesheet().
* | tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann2009-10-13
| |
* | Merged release 0.15.1 from branch 'v0.15.x'Max Kellermann2009-07-16
|\|
| * decoder/flac: fix assertion failure in tag_free() callMax Kellermann2009-07-06
| | | | | | | | | | | | Initialize flac_data.tag right after flac_data_init(). This way, the "goto fail" won't jump to the point where tag_free(NULL) can be called.
* | flac: load external cue sheet when no internal oneSerge Ziryukin2009-07-09
|/ | | | External cue sheet file for "file.flac" should be named as "file.flac.cue".
* flac: fixed "unused variable" warning without libcueMax Kellermann2009-04-01
| | | | Move the declaration of "i" into the "for" loop.
* Tag subtracks according to "cuesheet" vorbis comment valueJochen Keil2009-03-31
| | | | | | | Cuesheets are often saved as vorbis comment flac files (CUESHEET=.. case doesn't matter). We can parse this now and use the information to tag the subtracks (from the embedded cuesheets).
* track length is computed correctly nowJochen Keil2009-03-31
|
* free previously allocated flac metadata objectJochen Keil2009-03-31
|
* remove old commented codeJochen Keil2009-03-31
|
* Bugfix for time/offset in flac pluginJochen Keil2009-03-28
| | | | | | Previous cast to float didn't have any effect because one value is uint and the other is a floating type but the number itself is even.. This caused some tracks to end before they were really at an end.
* flac: get CUE track titles from additional FLAC commentsMario Lenz2009-03-16
| | | | | | | | The cue sheet embedded in a flac file doen't contain any information about track titles and similar. There are three possibilities: Use an external cue sheet that includes these information, use a tag CUESHEET with a cue sheet including these information or use tags. I think the latter is the best option and is already used by other projects.
* all: Update copyright header.Avuton Olrich2009-03-13
| | | | | | | | 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.
* Initial support for embedded cue sheets found in flac filesJochen Keil2009-03-09
| | | | | | | | | So far only seekpoints are supported, so no proper tagging yet except for track number and track length. Tagging should be done by parsing the cue sheet which is often embedded as vorbis comment in flac files. Furthermore the pathname should be configurable like "%A - %t - %T", where %A means Artist, %t track number and %T Title or so.
* flac: explicitly check for STOP commandMax Kellermann2009-03-05
| | | | | | After the decoder command was obtained, don't wait until libflac detects EOF (as a side effect), quit the decoder immediately. This check was missing completely.
* flac: check command after flac_process_single() failureMax Kellermann2009-03-05
| | | | | | When the MPD core sends the decoder a command while flac_process_single() is executed, this function fails. Abort the decoder only if not seeking. This fixes a seeking bug.
* flac: parse stream tagsMax Kellermann2009-03-01
| | | | | Parse the vorbis comments in libflac's metadata_callback and pass them as tag struct to the decoder API.
* decoder_plugin: pass struct config_param to init() methodMax Kellermann2009-02-15
| | | | Preparing for per-plugin configuration sections in mpd.conf.
* moved fallback APE/ID3 tag loader to song.cMax Kellermann2009-01-17
| | | | | | Some plugins used the APE or ID3 tag loader as a fallback when their own methods of loading tags did not work. Move this code out of all decoder plugins, into song_file_update().
* flac: always allocate tag objectMax Kellermann2009-01-15
| | | | | Free the tag object when it turns out to be empty. This simplifies several functions and APIs.
* flac: use bool instead of intMax Kellermann2009-01-15
|
* flac: removed "vorbis_comment_found" flagMax Kellermann2009-01-15
| | | | Use tag_is_empty() instead.