Commit Graph

87 Commits

Author SHA1 Message Date
Max Kellermann 00b04468dc filter/Convert: make in_audio_format const 2019-04-04 21:00:23 +02:00
Max Kellermann ca4e53859d Merge branch 'v0.21.x' 2019-03-25 08:11:07 +01:00
Max Kellermann 8b327f1d9b filter/AutoConvert: implement Flush() 2019-03-24 22:42:06 +01:00
Max Kellermann 61120d2059 filter/ffmpeg: use only one AVFrame
The two were never used at the same time, and merging them saves one allocation.
2019-03-24 22:29:57 +01:00
Max Kellermann cc1822810f filter/ffmpeg: use av_buffersrc_add_frame() instead of av_buffersrc_write_frame()
This transfers ownership of the buffer instead of adding another reference.
2019-03-24 22:28:40 +01:00
Max Kellermann a21c6884f2 filter/ffmpeg: call av_frame_unref() before av_buffersink_get_frame()
Fix another memory leak.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/514
2019-03-24 22:27:48 +01:00
Max Kellermann 2700eed08d filter/ffmpeg: remove unnecessary av_frame_make_writable() call
A newly allocated buffer doesn't need this call; it only adds overhead
for copying the data.
2019-03-24 22:26:09 +01:00
Max Kellermann ec2badbedd filter/ffmpeg: call av_frame_unref() before av_frame_get_buffer()
av_frame_get_buffer() leaks memory if buffers were already allocated.

Fixes one of the memory leaks of https://github.com/MusicPlayerDaemon/MPD/issues/514
2019-03-24 22:24:54 +01:00
Max Kellermann ec5be91ff6 filter/ffmpeg: new filter plugin 2019-03-18 18:56:06 +01:00
Max Kellermann a7a9490a0c filter/hdcd: include cleanup 2019-03-18 18:55:25 +01:00
Max Kellermann c0d6008781 filter/hdcd: move generic code to class FfmpegFilter 2019-03-18 18:35:23 +01:00
Max Kellermann 9f62824e98 filter/hdcd: fix typo 2019-03-18 18:32:20 +01:00
Max Kellermann c673528cff filter/hdcd: new filter plugin based on FFmpeg's "af_hdcd" 2019-03-18 13:48:24 +01:00
Max Kellermann 321f01b95c filter/plugins/null: move code to src/filter/NullFilter.hxx 2019-03-18 13:48:24 +01:00
Max Kellermann 9acc6617d2 filter/registry: move extern lines to plugin headers 2019-03-12 12:26:12 +01:00
Max Kellermann 4f72f49216 filter/normalize: clean up forward declarations 2019-03-12 12:24:31 +01:00
Max Kellermann ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 94592c1406 build with Meson instead of autotools
So long, autotools!  This is my last MPD related project to migrate
away from it.  It has its strengths, but also very obvious weaknesses
and weirdnesses.  Today, many of its quirks are not needed anymore,
and are cumbersome and slow.  Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann ec54754e22 Compiler.h: move to util/ 2018-08-20 16:19:17 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann 65bbb0e0aa Merge tag 'v0.20.17'
release v0.20.17
2018-02-11 13:22:43 +01:00
Max Kellermann e46fbd0780 filter/convert: set the PcmConvert instance only if it was initialized
Fixes valgrind warning.
2018-02-09 19:05:45 +01:00
Max Kellermann 56b74ad990 filter/convert: add method IsActive() 2018-02-09 19:04:45 +01:00
Max Kellermann 9ce6828d72 filter/convert: call PcmConvert::Flush() only if initialized
Fixes another part of #208, the one which caused the bogus exception.
2018-01-29 22:35:28 +01:00
Max Kellermann 7ff5cf8372 filter/convert: add method IsActive() 2018-01-29 22:33:54 +01:00
Max Kellermann f6ec43b9ec pcm/Resampler: add virtual method Flush()
Wired to Filter::Flush().

Closes #153
2018-01-02 23:17:25 +01:00
Max Kellermann 6d0d8cf9cf filter/Filter: add virtual method Flush()
This will be used by filters which have internal buffers which need to
be flushed at the end, e.g. the "soxr" resampler.
2018-01-02 23:15:51 +01:00
Max Kellermann e387d94ff1 filter/Filter: add "noexcept" 2018-01-01 19:23:01 +01:00
Max Kellermann 551ac56a33 Filter/Internal: split header 2018-01-01 18:48:34 +01:00
Max Kellermann f76262ef79 poison.h: remove obsolete header 2017-12-29 17:29:52 +01:00
Max Kellermann edef62df86 filter/Internal: return std::unique_ptr<Filter> 2017-12-27 11:56:05 +01:00
Max Kellermann e2621d5e44 filter/Plugin: return std::unique_ptr<PreparedFilter> 2017-12-27 11:39:01 +01:00
Max Kellermann 0e3ff12dd3 filter/volume: remove from filter_plugins[]
Thsi filter doesn't make sense as manually configured plugin, because
nobody ever calls volume_filter_set() on it, making it a no-op.
2017-12-27 11:38:38 +01:00
Max Kellermann b335ac4156 filter/{chain,convert}: remove unused FilterPlugin instances
These are not in filter_plugins[] and have dedicated constructors
anyway.
2017-12-27 11:33:15 +01:00
Max Kellermann 914df18bf9 Main, ...: catch any exception, not just std::runtime_error 2017-12-19 10:56:23 +01:00
Max Kellermann b8be7ec90e filter/Normalize: add normalize_filter_prepare() 2017-08-07 18:28:52 +02:00
Max Kellermann a3d71f4b91 filter/Convert: add convert_filter_prepare() 2017-08-07 18:27:00 +02:00
Max Kellermann 9250819b75 filter/Volume: add volume_filter_prepare()
Circumvent filter_new() with a fake ConfigBlock.
2017-08-07 18:23:13 +02:00
Max Kellermann 501a4af914 util/StringUtil: move strip functions to StringStrip.cxx 2017-07-05 17:20:02 +02:00
Max Kellermann 0500990d23 filter/volume: remove unused PcmVolume instance 2017-06-08 21:48:22 +02:00
Max Kellermann 22a82f1eaa mixer/software, filter/volume: add "noexcept" 2017-06-08 21:45:23 +02:00
Max Kellermann 39114f91a7 AudioFormat: replace struct audio_format_string with class StringBuffer, return it 2017-01-17 22:18:21 +01:00
Max Kellermann 27c7891169 filter/Internal: add method Reset() 2017-01-11 15:34:25 +01:00
Max Kellermann 1a9dfdfab8 filter/AutoConvert: initialize Filter::out_audio_format 2017-01-06 12:44:55 +01:00
Max Kellermann 5284cd11a9 filter/AutoConvert: remove obsolete NULL check 2017-01-06 12:35:06 +01:00
Max Kellermann d1a47cffad filter/convert: remove obsolete method prototype 2017-01-06 12:34:39 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann 3000b9dcde filter/ReplayGain: add ReplayGainConfig copy
Remove dependency on ReplayGain global variables.
2016-12-03 12:51:02 +01:00
Max Kellermann 3b867462a3 filter/ReplayGain: remove FilterPlugin instance, add explicit constructor 2016-12-03 12:34:23 +01:00