aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/ffmpeg_plugin.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2009-10-13tag: removed the "_ITEM_" suffix from the enum namesMax Kellermann1-16/+15
2009-09-30decoder/ffmpeg: use the "artist" tag if "author" is not presentMax Kellermann1-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".
2009-08-03ffmpeg_plugin: convert metadata to generic formatAnton Khirnov1-1/+3
2009-07-19Add audio_format_init() functionDavid Woodhouse1-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.
2009-06-25ffmpeg: support multiple tagsMax Kellermann1-2/+3
Call av_metadata_get() in a loop.
2009-06-08ffmpeg: moved code to ffmpeg_copy_metadata()Max Kellermann1-33/+18
2009-06-08ffmpeg: removed "new metadata api" warningMax Kellermann1-2/+0
This warning is useless. I assume the author added it for debugging purposes.
2009-04-02decoder: Rename all main decoder plugins functions to *decoder_plugin.Avuton Olrich1-1/+1
2009-03-13all: Update copyright header.Avuton Olrich1-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.
2009-03-03ffmpeg: fix version comparision for av_get_bits_per_sample_format() ↵Viliam Mateicka1-1/+1
implemetation function was implemented in the version we are comparing to so there must be higher or equal
2009-03-03ffmpeg: support for new metadata apiViliam Mateicka1-0/+39
2009-03-02ffmpeg: use ffmpeg's sampleformat for output formatViliam Mateicka1-1/+6
2009-02-23ffmpeg: add all known ffmpeg extensions and mime-types.Avuton Olrich1-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
2009-02-15decoder_plugin: pass struct config_param to init() methodMax Kellermann1-1/+2
Preparing for per-plugin configuration sections in mpd.conf.
2009-02-11ffmpeg: added TTA supportMax Kellermann1-0/+2
The ffmpeg library supports the "True Audio Codec". The entry in ffmpeg_suffixes was missing.
2009-02-03ffmpeg: fixed seek integer overflowMax Kellermann1-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.
2009-02-03ffmpeg: check if the time stamp is validMax Kellermann1-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.
2009-02-03ffmpeg: don't warn of empty packet outputMax Kellermann1-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.
2009-02-03ffmpeg: print codec nameMax Kellermann1-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.
2009-01-30ffmeg: added support for the tags comment, genre, yearDavid Horn1-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.
2009-01-16Enable wav file streaming for ffmpeg input pluginQball Cow1-0/+1
2009-01-08added missing explicit config.h includesMax Kellermann1-0/+1
2009-01-01decoder plugins: don't include gcc.hMax Kellermann1-2/+3
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
2008-12-24ffmpeg: case AV_NOPTS_VALUE to int64_tMax Kellermann1-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.
2008-12-24ffmpeg: don't assign "0" to pointerMax Kellermann1-1/+1
Use NULL instead. Found by sparse.
2008-12-15ffmpeg: fixing ffmpeg_send_packet to allow multipacketsViliam Mateicka1-16/+32
2008-12-15ffmpeg: adding APE supportViliam Mateicka1-2/+3
2008-11-21decoder: check audio_format_valid() in all decodersMax Kellermann1-0/+7
Refuse to play audio formats which are not supported by MPD.
2008-11-21ffmpeg: use GLib instead of log.hMax Kellermann1-8/+11
2008-11-18ffmpeg: read tags from AVFormatContextViliam Mateicka1-5/+16
The ffmpeg library provides some of the song metadata in the AVFormatContext struct. Pass it from there to MPD.
2008-11-16ffmpeg: fixed AVSEEK_SIZEMax Kellermann1-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().
2008-11-11decoder: return void from decode() methodsMax Kellermann1-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.
2008-11-10decoder: removed plugin method try_decode()Max Kellermann1-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.
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-04ffmpeg: removed loop from mpd_ffmpeg_read()Max Kellermann1-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.
2008-11-04ffmpeg: removed ffmpeg_context.codecMax Kellermann1-2/+0
That variable is never used except during initialization in ffmpeg_helper().
2008-11-04ffmpeg: moved code to ffmpeg_find_audio_stream()Max Kellermann1-9/+12
2008-11-04ffmpeg: no CamelCaseMax Kellermann1-100/+101
Renamed variables.
2008-11-02ffmpeg: fix boolean inversion in ffmpeg_tag()Max Kellermann1-1/+1
ffmpeg_tag() deleted the tag when ffmpeg_helper() returned success. The return value was interpreted incorrectly, it should return the tag on success.
2008-11-02ffmpeg: don't rewind stream in url_close()Max Kellermann1-4/+0
Rewinding the stream here is not useful, but may consume valuable resources (and time).
2008-11-02ffmpeg: use decoder_read() wrapper instead of direct input_stream_read()Max Kellermann1-1/+2
decoder_read() checks the decoder command. Without this patch, the ffmpeg plugin could become unresponsive.
2008-11-02ogg, ffmpeg: try to decode, even when the stream is not seekableMax Kellermann1-1/+1
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: pass "seekable" flag to decoder_initialized()Max Kellermann1-2/+3
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-2/+2
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-30ffmpeg: pass input_stream pointer to decoder_data()Max Kellermann1-3/+5
decoder_data() uses wait times to let the input stream continue its transfer.
2008-10-30ffmpeg: use return value of decoder_data()Max Kellermann1-18/+20
decoder_data() always returns the current command. If we use this, we can save a lot of decoder_get_command() calls.
2008-10-30ffmpeg: output buffer size cannot be negativeMax Kellermann1-5/+7
Converted the runtime check to an assertion.
2008-10-30ffmpeg: break immediately after av_read_frame()Max Kellermann1-9/+8
Remove one indent level.