Commit graph

80 commits

Author SHA1 Message Date
Sebastian Dröge 4ad101b53b Use once_cell crate directly again
The glib crate does not depend on it anymore and also does not re-export
it anymore.

Also switch some usages of OnceCell to OnceLock from std.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1441>
2024-01-31 18:07:57 +02:00
Sebastian Dröge 16b917abb1 Update for gst::Rank API changes 2023-11-02 14:10:59 +02:00
Philippe Normand 4d9263f932 audiornnoise: Attach audio level meta to output buffers
This is useful downstream for processing of audio voice payloads, for
instance feeding a speech recognition library such as Whisper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1231>
2023-09-28 17:58:38 +02:00
Bilal Elmoussaoui dd2d7d9215 Use re-exported once_cell
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
2023-07-06 17:50:49 +03:00
Bilal Elmoussaoui 2cc98bf410 Adapt to glib::Continue rename
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
2023-07-06 17:50:49 +03:00
Sebastian Dröge dfb261ac9a Fix a couple of trivial clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1226>
2023-05-30 10:20:00 +03:00
François Laignel 7ba0073052 use Pad builders for optional name definition
Also, apply auto-naming in the following cases

* When building from a non wildcard-named template, the name of the template is
  automatically assigned to the Pad. User can override with a specific name by
  calling `name()` on the `PadBuilder`.
* When building with a target and no name was provided via the above, the
  GhostPad is named after the target.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/448
Auto-naming discussion: https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1255#note_1891181

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1197>
2023-05-12 12:55:31 +02:00
Guillaume Desmottes 403004a85e fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1170>
2023-04-10 13:35:32 +02:00
Sebastian Dröge 3b4c48d9f5 Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1062>
2023-01-25 10:31:19 +02:00
Arun Raghavan 473e7d951b audiofx: Derive from AudioFilter where possible
Saves a little bit of code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1013>
2022-12-14 10:35:28 -05:00
Michiel Konstapel 3a8536b45e audiornnoise: Add debug output for voice activity to help you choose a threshold
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1010>
2022-12-14 10:00:28 +00:00
Sebastian Dröge 3f904553ea Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1011>
2022-12-13 11:43:16 +02:00
Michiel Konstapel 54741b7cc4 audiornnoise: add voice detection threshold
Add a property "voice-activity-threshold". Frames where the voice
detection score from the RNN is below the threshold will be completely
muted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1004>
2022-12-12 11:55:38 +02:00
Sebastian Dröge 1ffadbc270 audiorrnoise: Use correct value range for the samples
The nnnoiseless crate wants all samples in the range [-32767,32767]
instead of the [-1,1] range we're using for floating point samples.

Scale before/after processing while (de)interleaving the samples.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/276

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1003>
2022-12-10 21:03:28 +02:00
Sebastian Dröge fceacf7081 Update for gst::Array / gst::List API improvements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/985>
2022-11-27 01:12:46 +02:00
Sebastian Dröge a8250abbf1 Fix various new clippy warnings 2022-11-01 10:27:48 +02:00
Sebastian Dröge 9a68f6e221 Move from imp.instance() to imp.obj()
It's doing the same thing and is shorter.
2022-10-23 23:08:46 +03:00
François Laignel 86776be58c Remove & for obj in log macros
This is no longer necessary.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1137
2022-10-23 21:22:31 +02:00
Sebastian Dröge f045099fc1 Fix GObject type names, GStreamer debug category names and element factory names
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/198
2022-10-23 20:46:08 +03:00
François Laignel 8011eadfd2 Use new format constructors
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1128
2022-10-18 10:36:59 +00:00
Vivia Nikolaidou f11b0fa5eb plugins, examples, tutorials: Use AudioCapsBuilder and VideoCapsBuilder
Simplify caps creation code
2022-10-13 19:24:57 +00:00
Sebastian Dröge e49138516c Update for pad default functions API changes 2022-10-12 19:50:15 +03:00
Sebastian Dröge 7ee4afacf4 Change *Impl trait methods to only take &self and not Self::Type in addition 2022-10-10 15:03:25 +03:00
Sebastian Dröge 1a40186485 Update for GLib ParamSpec builder API changes 2022-09-05 11:45:47 +03:00
Thibault Saunier 67e651f57c Allow "unused_doc_comments" as we use hotdoc and not rustdoc 2022-08-29 18:33:22 -04:00
Thibault Saunier 31a53bba8a Generate plugins documentation using hotdoc
Which will automatically be integrated in gstreamer documentation
2022-08-29 18:33:22 -04:00
Vivia Nikolaidou 5606111345 plugins: Simplify code using ParamSpecBuilder 2022-08-22 17:58:43 +03:00
Vivia Nikolaidou 07cbc2f025 audio, video: Use AudioCapsBuilder::new_interleaved where applicable
Further code simplification
2022-08-10 11:18:18 +00:00
Vivia Nikolaidou 8ee8ae581a audio: Use gst_audio::AudioCapsBuilder in some plugins
Simplify caps creation codes
2022-08-09 22:01:10 +03:00
Bilal Elmoussaoui 52973d975e Update per glib::SignalBuilder changes 2022-07-21 20:03:13 +02:00
Seungha Yang 263ccbc64a audioloudnorm: Drain on segment event
Otherwise output buffer and segment would not be serialized as expected
2022-06-20 21:57:04 +09:00
Sebastian Dröge 4874c7eb1f Correctly check for the DISCONT buffer flag to be set 2022-03-20 20:11:28 +02:00
Sebastian Dröge b38f6cc731 Remove now unnecessary Send+Sync impls for element/etc subclasses
This is now automatically implemented.
2022-02-28 18:56:58 +02:00
François Laignel 422ea740ca Update to gst::_log_macro_
See the details:
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/980
2022-02-21 20:50:01 +01:00
Sebastian Dröge 65fcd55160 Update for event/message/query view API changes 2022-01-19 15:07:45 +02:00
Sebastian Dröge b2d0172422 Replace Foo::from_instance(foo) with foo.imp() 2022-01-17 19:36:41 +02:00
Sebastian Dröge 326449b3e6 Re-license LGPL-2.1 plugins to MPL-2
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/168
2022-01-15 21:05:11 +02:00
Sebastian Dröge ab14c50d1c Ignore clippy::non_send_fields_in_send_ty lint
It's useless in its current shape and wrongly triggering on all types.

See https://github.com/rust-lang/rust-clippy/issues/8045
2022-01-14 12:09:57 +02:00
Sebastian Dröge c46901d150 Fix or silence various new 1.57 clippy warnings 2021-11-30 16:31:50 +02:00
Tomasz Andrzejak 4668da45ef audiofx: Add HRTF renderer element
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/128
2021-11-23 08:19:29 +00:00
Sebastian Dröge 86f422592b Update for glib::Enum / glib::Boxed / glib::flags! macro renames 2021-11-22 11:04:26 +02:00
Sebastian Dröge 55aad51141 Update for glib constructor renames
See https://github.com/gtk-rs/gtk-rs-core/pull/384
2021-11-20 14:31:06 +02:00
Sebastian Dröge d9bda62a47 Update for GLib/GStreamer API changes
And clean up a lot of related property/caps/structure code.
2021-11-06 09:34:10 +02:00
Sebastian Dröge b9541b2ca4 Update for GstObjectImpl API change 2021-10-23 12:31:33 +03:00
François Laignel 27b9f0d868 Improve usability thanks to opt-ops
The crate option-operations simplifies usage when dealing with
`Option`s, which is often the case with `ClockTime`.
2021-10-18 15:09:47 +02:00
Sebastian Dröge b1bd3020fa audioloudnorm: Clamp to the expected limits instead of asserting
The calculations on the floating point numbers can't get out of the
expected range by construction expect for rounding errors at the limits.
Rounding errors at the limits shouldn't lead to assertions, so instead
clamp to the limits.
2021-09-28 13:53:21 +03:00
Sebastian Dröge 96d86eaa06 Clean up clippy warnings and CI configuration
Put clippy overrides into the sources files instead of the CI
configuration, and fix various warnings / clean up code.
2021-09-08 12:35:41 +00:00
Christian Kohlstedde a8a3a6ec3e ebur128level: Fix mode bitflags
Currently the flag of true peak and sample peak are the same and
therefore true peak always wins, sample peak never.
2021-08-25 08:23:18 +03:00
Sebastian Dröge 052365ba1a Fix various needless-borrow clippy warnings and others 2021-07-30 13:53:35 +03:00
François Laignel 17feaa8c71 audio: migrate to new ClockTime design 2021-06-05 10:36:21 +02:00