summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-11-16filter/ffmpeg: detect the output sample formatMax Kellermann
Some FFmpeg filters change the sample format, and since MPD assumes this never happens, this results in loud noise instead of music. This commit finally implements the TODO comment by sending one frame of silence to the filter and checking the output frame's format. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1009
2020-11-15output/Control: allow copy elision (fix -Wpessimizing-move)Max Kellermann
2020-11-15Fixes #994 - moveoutput: new AudioOutputControl created from copyMoving an ↵Stapper
output to a partition is now done via MultipleOutputs::AddCopy(),using a new AudioOutputControl constructor. Tags and always_on settings willpersist when moving outputs between partitions.
2020-11-10decoder/dsdiff: apply padding to odd-sized chunksMax Kellermann
Closes https://github.com/MusicPlayerDaemon/MPD/issues/1001
2020-11-06storage/curl: fix nullptr dereferenceMax Kellermann
Pass a std::string to PathTraitsUTF8::Relative(), implicitly casting it to std::string_view. This selects the right overload which returns std::string_view instead of `const char *`; the latter could return `nullptr` which would cause the implicit conversion of the return value to std::string_view to crash. Regression caused by commits ead208987dd and a98d627c0bd. Closes https://github.com/MusicPlayerDaemon/MPD/issues/995
2020-11-04filter/LoadChain: use the AutoConvertFilterMax Kellermann
This adds support for input samples other than 16 bit to the FFmpeg filter plugin.
2020-11-04filter/AutoConvert: move the Filter class to TwoFilters.cxxMax Kellermann
2020-11-04filter/AutoConvert: eliminate AutoConvertFilter if possibleMax Kellermann
If no conversion is necessary, return the child Filter as-is. This allows removing all nullptr checks from AutoConvertFilter.
2020-11-04filter/ffmpeg: interleave the output AVFrameMax Kellermann
If the FFmpeg filter outputs planar data, interleave it, just like the FFmpeg decoder plugin does.
2020-11-04decoder/ffmpeg: move code to lib/ffmpeg/Interleave.cxxMax Kellermann
To be reused by the FFmpeg filter plugin.
2020-11-04decoder/ffmpeg: use AVFrame fields instead of AVCodecContext fieldsMax Kellermann
2020-11-04lib/ffmpeg/Buffer: add missing includeMax Kellermann
2020-11-04lib/ffmpeg/Buffer: disallow copyingMax Kellermann
2020-11-04lib/ffmpeg/Buffer: add `noexcept`Max Kellermann
2020-11-04lib/ffmpeg/{Buffer,Time}: remove obsolete "#undef SampleFormat"Max Kellermann
This compatibility macro has been removed from FFmpeg long ago.
2020-11-04filter/convert: convert_filter_new() returns std::unique_ptrMax Kellermann
2020-11-04filter/chain: pass std::string_view to filter_chain_append()Max Kellermann
2020-11-04filter/LoadChain: use IterableSplitString()Max Kellermann
2020-11-04filter/chain: copy the child nameMax Kellermann
filter_chain_parse() passes a temporary string pointer which results in a use-after-free in the PreparedChainFilter::Child::Open() error message.
2020-11-04filter/chain: remove unused field ChainFilter::Child::nameMax Kellermann
2020-11-04playlist/registry: add option "as_directory"Max Kellermann
This allows users to disable the "CUE files as directories" feature without having to disable the CUE playlist plugin completely. This feature has been annoying some users.
2020-11-04playlist/registry: simplify ExtractMimeTypeMainPart()Max Kellermann
2020-10-28lib/yajl/Handle: strip newlines from error messagesMax Kellermann
Closes https://github.com/MusicPlayerDaemon/MPD/issues/981
2020-10-28lib/yajl/Handle: un-inline the throwing codeMax Kellermann
Reduces header dependencies.
2020-10-28util/FormatString: update API documentationMax Kellermann
2020-10-28protocol/Ack: remove unused variable `ack_domain`Max Kellermann
2020-10-28Main: save the state_file on shutdownMax Kellermann
This got lost in commit 5d597a3646cc (v0.21.19), but it was never noticed because the state_file_interval was way too short due to commit 3413d1bf23a, fixed recently by commit 27cc7b352d5
2020-10-28db/simple: purge songs for unavailable decoder plugins on updateMax Kellermann
2020-10-28fs/Traits: add GetPathSuffix()Max Kellermann
2020-10-28db/simple/Directory: add `pure` attributeMax Kellermann
2020-10-28db/update/Walk: add code commentsMax Kellermann
2020-10-27db/simple: purge special directories for unavailable plugins on updateMax Kellermann
2020-10-27db/update/Walk: adjust lamba indentMax Kellermann
2020-10-27fs/Traits: add GetFilenameSuffix()Max Kellermann
2020-10-17lib/nfs/patches: disable the snprintf->sprintf_s aliasMax Kellermann
snprintf() is available on mingw, and the libnfs kludge broke the build with mingw, because sprintf_s() was now both an inline function and a "dllimport" function (because the macro renamed the inline function snprintf() to sprintf_s() in mingw's stdio.h).
2020-10-16decoder/opus: fix track/album ReplayGain fallbackMax Kellermann
Fixes regression by commit 23d5a2b8620cea69958d087fc7e13fe1e5adb83d - that commit always pretended that any Opus file has both track and album gain, and thus disabled the fallback to the other if one is not set. This patch changes the logic to only submit ReplayGain if at least one value is set, and apply the offset only to that value. If none is available, then the new check in HandleAudio() will submit only the output gain. Closes https://github.com/MusicPlayerDaemon/MPD/issues/977
2020-10-16decoder/opus: submit output_gain even if there is no OpusTags packetMax Kellermann
2020-10-16decoder/opus: move formula to EbuR128ToReplayGain()Max Kellermann
2020-10-16decoder/opus: move comment to `output_gain` fieldMax Kellermann
2020-10-16decoder/opus: convert field `output_gain` to floatMax Kellermann
2020-10-15lib/dbus/Watch: add missing include for assert()Max Kellermann
2020-10-15output/osx: fix several -Wdouble-promotion warningsMax Kellermann
2020-10-15net/SocketAddress: include cleanupMax Kellermann
2020-10-08event/SocketMonitor: don't filter out ERROR/HANGUPMax Kellermann
By bit-wise ANDing the reported flags with GetScheduledFlags(), ERROR/HANGUP always get cleared. This means the MPD event loop could never report those conditions.
2020-10-08event/TimerEvent: add type alias for std::chrono::steady_clock::durationMax Kellermann
2020-10-08event/TimerEvent: use `using` instead of `typedef`Max Kellermann
2020-10-08event/TimerEvent: use auto_unlink hookMax Kellermann
2020-10-08event/Loop: reorder includesMax Kellermann
This just happened to break the Windows build because of the `GetObject` macro in `windows.h`, so I added a kludge to PollResultGeneric.hxx.
2020-10-08StateFileConfig, ...: drop obsolete out-of-class definitionMax Kellermann
2020-10-08config/Data: cast to std::chrono::steady_clock::duration properlyMax Kellermann
Oh no, 3413d1bf23a was broken! Instead of passing a number as "seconds" to the duration constructor, it just abused the duration constructor as cast operator, which caused custom state_file_interval settings to be extremely short.