Commit graph

56 commits

Author SHA1 Message Date
Sebastian Dröge
3f05e448d7 audioloudnorm: Allow more than 2 channels
There's no limitation of the number of channels in the code, so allow
more in the caps too.
2020-04-02 17:01:33 +03:00
Sebastian Dröge
ba7186aa6e audioloudnorm: Fix some outdated comments 2020-04-02 16:01:27 +03:00
Sebastian Dröge
65dc7cc0eb audioloudnorm: Add some more tests
This covers the limiter too now and various other code paths that were
previously not covered. No new bugs found.
2020-04-02 14:53:38 +03:00
Sebastian Dröge
666ec7d54d audiofx: Add audioloudnorm filter based on the ffmpeg af_loudnorm filter
This normalizes the loudness of an audio stream to a target loudness
with a given maximum peak based on EBU R128.

Conceptually it keeps a 3s lookahead for calculating the perceived
loudness and based on that calculates the gain required to reach the
target loudness. The calculated gains then go through a gaussian filter
for smoothening and are then applied to the audio in 100ms blocks. Each
of the 100ms blocks is then passed to a limiter filter to prevent going
above the maximum peak.

See http://k.ylo.ph/2016/04/04/loudnorm.html for some more details about
the algorithm.

It introduces 3s of latency and currently only works on 192kHz audio.
Using it with a different sample rate requires resampling before and
afterwards. The upsampling is required to calculate the true peak.

Other than the ffmpeg filter it currently does not support two-pass
processing but only one-pass/live processing.

Compared to the ffmpeg filter this code was refactored considerably and
the limiter implementation was fixed to actually work, as well as
various other bugs in different places that were fixed.
2020-04-01 23:55:48 +03:00
Sebastian Dröge
9772adbfbf Fix various new clippy warnings from 1.40 2019-12-22 11:35:01 +02:00
Sebastian Dröge
ccfb8246be Fix compilation after gstreamer-rs!383 2019-12-18 08:17:42 +02:00
Philippe Normand
0f99994d9e Fix audio plugins build after gstreamer-rs!376
AudioInfo::from_caps() now returns a Result.
2019-12-14 15:26:20 +00:00
Sebastian Dröge
9f75a1cecc Update for new BaseTransformImpl::set_caps() return type 2019-11-21 01:02:10 +02:00
Sebastian Dröge
1ae57967ae Move debug categories from an instance member to lazy_static
Simplifies the code a bit and less state to carry around.
2019-10-31 23:35:11 +01:00
Sebastian Dröge
074a82d8ad Various fixes for from_string() -> from_str(), to_string() vs. to_str()
The latter also does not allocate.
2019-10-04 11:47:50 +03:00
Sebastian Dröge
b05fb902f9 Remove usage of subclassing feature, it's the default now 2019-09-09 10:45:06 +03:00
Sebastian Dröge
83cc8104a1 Fix or silence all remaining clippy warnings
Also ignore common errors we don't care about when running clippy and
make clippy errors fail the CI.
2019-09-07 10:42:07 +03:00
François Laignel
0e11ac87d3 Update for new {Value, StructureRef}::get signature
See https://github.com/gtk-rs/glib/pull/513
and https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/merge_requests/310
2019-08-13 15:29:28 +02:00
Sebastian Dröge
acc4b6a7e2 Update versions to 0.6.0 2019-07-07 13:20:15 +03:00
Guillaume Desmottes
53e530f7db port all plugins to new register API
Rank is now an enum rather than a u32
2019-06-04 14:35:10 +05:30
ahamedsajeer.15
dc45b7f8ac Add build.rs that provides a version number, release date and other details 2019-06-03 11:11:29 +00:00
Sebastian Dröge
fbee00caab Update for gstreamer gst_plugin_define! API changes 2019-05-27 20:31:39 +00:00
Sebastian Dröge
fda1233163 Update some dependencies 2019-05-24 13:33:51 +02:00
Sebastian Dröge
9bccc50add Update for gstreamer-rs API changes 2019-05-24 13:09:32 +02:00
Sebastian Dröge
129f6a28b0 Update for gstreamer-rs/glib/etc API changes and add more explicit Some() 2019-04-16 10:10:16 +03:00
Sebastian Dröge
afe8e8e32b Update versions to 0.5.0 2019-02-22 13:27:47 +02:00
Sebastian Dröge
9db02cb55e Fixes for gstreamer-rs API changes
Creating pad templates can return None now.
2019-01-29 17:33:06 +02:00
François Laignel
2a656a98b6 Update signatures further to gstreamer-base changes
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/merge_requests/216
2019-01-26 16:35:52 +01:00
François Laignel
e930133bdf Update for gstreamer-rs MR 200
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/merge_requests/200
2019-01-12 18:00:04 +01:00
Sebastian Dröge
fb741f26f3 Update for glib property API changes 2018-12-18 11:23:45 +02:00
Sebastian Dröge
485839a2a9 Port audiofx plugin with audioecho element to new subclassing API 2018-11-30 17:18:40 +02:00
Sebastian Dröge
32265412f3 Change all links/mentions from gst-plugin-rs to gst-plugins-rs 2018-11-26 11:52:09 +01:00
Thijs Vermeir
cee861f341 use BoolError for plugin registration 2018-11-04 20:24:20 +01:00
Sebastian Dröge
97cc1c8458 Change all references from GitHub to freedesktop.org GitLab 2018-11-03 20:24:21 +02:00
Sebastian Dröge
628f5099eb Run everything through latest rustfmt 2018-10-11 13:49:48 +03:00
Sebastian Dröge
f2deb2264b Fix various clippy warnings 2018-10-11 13:49:10 +03:00
Sebastian Dröge
046a0af6a1 Update versions to 0.4.0 2018-09-10 02:02:31 +03:00
Sebastian Dröge
5cac22d1c0 Switch gobject-subclass repository URI 2018-09-06 13:56:16 +03:00
Sebastian Dröge
dcb3683232 Run everything through latest rustfmt 2018-07-27 13:35:58 +03:00
Sebastian Dröge
754373ba6c Update to byte-slice-cast 0.2 2018-06-01 12:02:32 +03:00
Sebastian Dröge
6803cb5fac Move gobject-subclass to its own repository 2018-05-01 17:55:27 +03:00
Sebastian Dröge
80793cd766 Move export/re-export cleanup 2018-05-01 17:43:52 +03:00
Sebastian Dröge
8bc3f12061 Run everything through rustfmt again 2018-05-01 17:16:12 +03:00
Sebastian Dröge
c7103765db Run everything through rustfmt again 2018-04-05 11:36:10 +03:00
Sebastian Dröge
17270741e7 Update to num-traits 0.2 2018-02-21 13:36:37 +01:00
Sebastian Dröge
d98c666bd9 Catch panics during plugin initialization and log them 2018-01-18 18:54:15 +02:00
Sebastian Dröge
714301d584 Don't require GStreamer 1.10
We're working just fine with 1.8 too
2018-01-15 09:34:53 +02:00
Sebastian Dröge
3181631bb7 audioecho: Minor cleanup and move code to the right place
And move rejection of max-delay changes when we're started from the
property getter to the setter where it should be. We can always *get*
the current value, just not set it.
2018-01-02 19:28:43 +02:00
Sebastian Dröge
22c5f93d3b Fix various clippy warnings 2017-12-20 21:36:50 +02:00
Sebastian Dröge
22ab56895d Remove Rs prefix from everything
We have proper namespaces in Rust
2017-11-20 13:23:30 +02:00
Sebastian Dröge
323bf3ea08 Update to latest gstreamer-rs master API changes 2017-11-11 13:02:55 +01:00
Sebastian Dröge
176e07bf0a Move properties code to a separate file 2017-10-19 11:06:19 +02:00
Sebastian Dröge
83388c8322 audioecho: Don't unnecessarily mark variable as mutable 2017-10-19 11:06:01 +02:00
Sebastian Dröge
443abffa73 Run everything through latest rustfmt-nightly 2017-10-17 12:21:53 +03:00
Sebastian Dröge
4b97d56949 Fix compilation after GstRc<T>::get_mut() API fixes in gstreamer-rs 2017-10-12 18:03:06 +03:00