aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* decoder_api: added function decoder_timestamp()Max Kellermann2009-12-261-6/+4
| | | | | | 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.
* input_stream: return errors with GErrorMax Kellermann2009-12-151-2/+2
|
* Merge branch 'v0.15.x'Max Kellermann2009-12-141-4/+0
|\ | | | | | | | | Conflicts: src/decoder/ffmpeg_plugin.c
| * ffmpeg: don't try to force stereoMax Kellermann2009-11-301-4/+0
| | | | | | | | | | | | The plugin code tried to force libavcodec to supply stereo samples. That however has never actually worked. By removing this code, we are able to play surround files for the first time.
* | audio_format: changed "bits" to "enum sample_format"Max Kellermann2009-12-021-8/+22
| | | | | | | | | | | | This patch prepares support for floating point samples (and probably other formats). It changes the meaning of the "bits" attribute from a bit count to a symbolic value.
* | Merged release 0.15.6 from branch 'v0.15.x'Max Kellermann2009-11-191-5/+24
|\| | | | | | | | | | | | | Conflicts: NEWS configure.ac
| * decoder/ffmpeg: align the output bufferMax Kellermann2009-11-151-5/+24
| | | | | | | | | | | | On some platforms, libavcodec wants the output buffer aligned to 16 bytes (because it uses SSE/Altivec internally). It will segfault when you don't obey this rule.
| * decoder/ffmpeg: convert metadataMax Kellermann2009-10-281-4/+4
| | | | | | | | | | | | Convert the metadata with the libavformat function av_metadata_conv(). This ensures that canonical tag names are provided by libavformat, and we can remove the "artist" vs "author" workaround.
* | decoder: use audio_format_init_checked()Max Kellermann2009-11-141-7/+7
| | | | | | | | | | | | Let the audio_check library verify the audio format in all (relevant, i.e. non-hardcoded) plugins.
* | include config.h in all sourcesMax Kellermann2009-11-121-1/+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/ffmpeg: removed the "author" vs "artist" workaroundMax Kellermann2009-10-281-2/+1
| | | | | | | | | | libavformat gives us the song artist in the "author" field. Since we use av_metadata_conv(), we don't need to check for "artist".
* | tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann2009-10-131-16/+15
| |
* | Merged release 0.15.4 from branch 'v0.15.x'Max Kellermann2009-10-031-2/+5
|\| | | | | | | | | | | Conflicts: NEWS configure.ac
| * decoder/ffmpeg: use the "artist" tag if "author" is not presentMax Kellermann2009-09-301-2/+5
| | | | | | | | | | | | | | Usually, we read our "artist" tag from ffmpeg's "author" tag. In some cases however (e.g. APE), this tag is named "artist". This patch implements a fallback: if no "author" is found, MPD tries to use "artist".
* | ffmpeg_plugin: convert metadata to generic formatAnton Khirnov2009-08-031-1/+3
| |
* | Add audio_format_init() functionDavid Woodhouse2009-07-191-4/+5
| | | | | | | | | | It makes no difference right now, but we're about to add an endianness flag and will want to make sure it's correctly initialised every time.
* | ffmpeg: support multiple tagsMax Kellermann2009-06-251-2/+3
|/ | | | Call av_metadata_get() in a loop.
* ffmpeg: moved code to ffmpeg_copy_metadata()Max Kellermann2009-06-081-33/+18
|
* ffmpeg: removed "new metadata api" warningMax Kellermann2009-06-081-2/+0
| | | | | This warning is useless. I assume the author added it for debugging purposes.
* decoder: Rename all main decoder plugins functions to *decoder_plugin.Avuton Olrich2009-04-021-1/+1
|
* all: Update copyright header.Avuton Olrich2009-03-131-6/+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.
* ffmpeg: fix version comparision for av_get_bits_per_sample_format() ↵Viliam Mateicka2009-03-031-1/+1
| | | | | | implemetation function was implemented in the version we are comparing to so there must be higher or equal
* ffmpeg: support for new metadata apiViliam Mateicka2009-03-031-0/+39
|
* ffmpeg: use ffmpeg's sampleformat for output formatViliam Mateicka2009-03-021-1/+6
|
* ffmpeg: add all known ffmpeg extensions and mime-types.Avuton Olrich2009-02-231-18/+77
| | | | | | | | | | | | | After much research[1][2][3] this should be the majority of currently supported file extensions and mime-types for the currently supported ffmpeg formats. This list maybe incomplete, but it's more complete than anything else out there that I've been able to find. This list needs to be updated every now and again as the ffmpeg sources support more formats. 1. Sources 2. wiki.multimedia.cx 3. filext.com
* decoder_plugin: pass struct config_param to init() methodMax Kellermann2009-02-151-1/+2
| | | | Preparing for per-plugin configuration sections in mpd.conf.
* ffmpeg: added TTA supportMax Kellermann2009-02-111-0/+2
| | | | | The ffmpeg library supports the "True Audio Codec". The entry in ffmpeg_suffixes was missing.
* ffmpeg: fixed seek integer overflowMax Kellermann2009-02-031-3/+4
| | | | | | | The "current" variable is used for calculating the seek destination, and was declared as "int". With very long song files, the 32 bit integer can overflow. ffmpeg expects an int64_t, which is very unlikely to overflow. Switch to int64_t.
* ffmpeg: check if the time stamp is validMax Kellermann2009-02-031-4/+5
| | | | | | When ffmpeg cannot estimate the elapsed time, it sets AVPacket.pts=AV_NOPTS_VALUE. Our ffmpeg decoder plugin did not check for that special value.
* ffmpeg: don't warn of empty packet outputMax Kellermann2009-02-031-3/+2
| | | | | | If avcodec_decode_audio2() returns no output for an AVPacket, libavcodec may buffer some data, and return a larger chunk of output later. This patch disables a lot of bogus warnings.
* ffmpeg: print codec nameMax Kellermann2009-02-031-0/+3
| | | | | | Output the name of the codec as a debug message. During my tests, ffmpeg never filled this struct member, but it may do so in the past, and this debug message might become helpful.
* ffmeg: added support for the tags comment, genre, yearDavid Horn2009-01-301-0/+10
| | | | | | | | | | | | ffmpeg_tag_internal() does not look for a few tags that mpd supports. Most noteably: comment -> TAG_ITEM_COMMENT -> Description genre -> TAG_ITEM_GENRE -> WM/Genre (not WM/GenreID) year -> TAG_ITEM_DATE -> WM/Year I *think* that this is the last of the tags that AVFormatContext() in ffmpeg supports that mpd also uses.
* Enable wav file streaming for ffmpeg input pluginQball Cow2009-01-161-0/+1
|
* added missing explicit config.h includesMax Kellermann2009-01-081-0/+1
|
* decoder plugins: don't include gcc.hMax Kellermann2009-01-011-2/+3
| | | | Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
* ffmpeg: case AV_NOPTS_VALUE to int64_tMax Kellermann2008-12-241-2/+2
| | | | | The old code casted it to a 32 bit integer, which cut off bits. AVFormatContext.duration is a int64_t, so use this type.
* ffmpeg: don't assign "0" to pointerMax Kellermann2008-12-241-1/+1
| | | | Use NULL instead. Found by sparse.
* ffmpeg: fixing ffmpeg_send_packet to allow multipacketsViliam Mateicka2008-12-151-16/+32
|
* ffmpeg: adding APE supportViliam Mateicka2008-12-151-2/+3
|
* decoder: check audio_format_valid() in all decodersMax Kellermann2008-11-211-0/+7
| | | | Refuse to play audio formats which are not supported by MPD.
* ffmpeg: use GLib instead of log.hMax Kellermann2008-11-211-8/+11
|
* ffmpeg: read tags from AVFormatContextViliam Mateicka2008-11-181-5/+16
| | | | | The ffmpeg library provides some of the song metadata in the AVFormatContext struct. Pass it from there to MPD.
* ffmpeg: fixed AVSEEK_SIZEMax Kellermann2008-11-161-3/+9
| | | | | | With whence==AVSEEK_SIZE, the seek function should return the file size, not the current offset. Check the return value of input_stream_seek().
* decoder: return void from decode() methodsMax Kellermann2008-11-111-2/+2
| | | | | | | | 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.
* decoder: removed plugin method try_decode()Max Kellermann2008-11-101-7/+0
| | | | | | 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.
* decoder: removed stream_typesMax Kellermann2008-11-041-1/+0
| | | | | Instead of checking the stream_types bit set, we can simply check whether the methods stream_decode() and file_decode() are implemented.
* ffmpeg: removed loop from mpd_ffmpeg_read()Max Kellermann2008-11-041-15/+2
| | | | | | The function decoder_read() already cares about the decoder command, and loops until data is available. Reduced mpd_ffmpeg_read() to no more than the decoder_read() call.
* ffmpeg: removed ffmpeg_context.codecMax Kellermann2008-11-041-2/+0
| | | | | That variable is never used except during initialization in ffmpeg_helper().
* ffmpeg: moved code to ffmpeg_find_audio_stream()Max Kellermann2008-11-041-9/+12
|
* ffmpeg: no CamelCaseMax Kellermann2008-11-041-100/+101
| | | | Renamed variables.