diff options
author | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-08-10 13:45:52 +0300 |
---|---|---|
committer | Vivia Nikolaidou <vivia@ahiru.eu> | 2022-08-10 14:18:18 +0300 |
commit | 07cbc2f0252d3288ff4e5c10705b3597a12af5e1 (patch) | |
tree | 3a710713926562cbd9064c481964aacc82d46dcb /audio | |
parent | bdaa39e267be5028cb7a00b156466992f5a3de9e (diff) |
audio, video: Use AudioCapsBuilder::new_interleaved where applicable
Further code simplification
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audiofx/src/audioecho/imp.rs | 3 | ||||
-rw-r--r-- | audio/audiofx/src/audioloudnorm/imp.rs | 3 | ||||
-rw-r--r-- | audio/audiofx/src/audiornnoise/imp.rs | 3 | ||||
-rw-r--r-- | audio/claxon/src/claxondec/imp.rs | 3 | ||||
-rw-r--r-- | audio/claxon/tests/claxondec.rs | 3 | ||||
-rw-r--r-- | audio/csound/src/filter/imp.rs | 3 |
6 files changed, 6 insertions, 12 deletions
diff --git a/audio/audiofx/src/audioecho/imp.rs b/audio/audiofx/src/audioecho/imp.rs index 1108f881..0d076e76 100644 --- a/audio/audiofx/src/audioecho/imp.rs +++ b/audio/audiofx/src/audioecho/imp.rs @@ -209,9 +209,8 @@ impl ElementImpl for AudioEcho { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy<Vec<gst::PadTemplate>> = Lazy::new(|| { - let caps = gst_audio::AudioCapsBuilder::new() + let caps = gst_audio::AudioCapsBuilder::new_interleaved() .format_list([gst_audio::AUDIO_FORMAT_F32, gst_audio::AUDIO_FORMAT_F64]) - .layout(gst_audio::AudioLayout::Interleaved) .build(); let src_pad_template = gst::PadTemplate::new( "src", diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs index 44b2618e..ae3279e1 100644 --- a/audio/audiofx/src/audioloudnorm/imp.rs +++ b/audio/audiofx/src/audioloudnorm/imp.rs @@ -1880,10 +1880,9 @@ impl ElementImpl for AudioLoudNorm { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy<Vec<gst::PadTemplate>> = Lazy::new(|| { - let caps = gst_audio::AudioCapsBuilder::new() + let caps = gst_audio::AudioCapsBuilder::new_interleaved() .format(gst_audio::AUDIO_FORMAT_F64) .rate(192_000) - .layout(gst_audio::AudioLayout::Interleaved) .build(); let src_pad_template = gst::PadTemplate::new( "src", diff --git a/audio/audiofx/src/audiornnoise/imp.rs b/audio/audiofx/src/audiornnoise/imp.rs index d27bf063..4454815e 100644 --- a/audio/audiofx/src/audiornnoise/imp.rs +++ b/audio/audiofx/src/audiornnoise/imp.rs @@ -224,10 +224,9 @@ impl ElementImpl for AudioRNNoise { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy<Vec<gst::PadTemplate>> = Lazy::new(|| { - let caps = gst_audio::AudioCapsBuilder::new() + let caps = gst_audio::AudioCapsBuilder::new_interleaved() .format(gst_audio::AUDIO_FORMAT_F32) .rate(48000) - .layout(gst_audio::AudioLayout::Interleaved) .build(); let src_pad_template = gst::PadTemplate::new( "src", diff --git a/audio/claxon/src/claxondec/imp.rs b/audio/claxon/src/claxondec/imp.rs index d2c05f6e..a2d99e10 100644 --- a/audio/claxon/src/claxondec/imp.rs +++ b/audio/claxon/src/claxondec/imp.rs @@ -76,7 +76,7 @@ impl ElementImpl for ClaxonDec { ) .unwrap(); - let src_caps = gst_audio::AudioCapsBuilder::new() + let src_caps = gst_audio::AudioCapsBuilder::new_interleaved() .format_list([ gst_audio::AudioFormat::S8, gst_audio::AUDIO_FORMAT_S16, @@ -85,7 +85,6 @@ impl ElementImpl for ClaxonDec { ]) .rate_range(1..655_350) .channels_range(1..8) - .layout(gst_audio::AudioLayout::Interleaved) .build(); let src_pad_template = gst::PadTemplate::new( "src", diff --git a/audio/claxon/tests/claxondec.rs b/audio/claxon/tests/claxondec.rs index 31b327ea..2974b640 100644 --- a/audio/claxon/tests/claxondec.rs +++ b/audio/claxon/tests/claxondec.rs @@ -31,8 +31,7 @@ fn test_mono_s16() { assert_eq!( caps, - gst_audio::AudioCapsBuilder::new() - .layout(gst_audio::AudioLayout::Interleaved) + gst_audio::AudioCapsBuilder::new_interleaved() .format(gst_audio::AUDIO_FORMAT_S16) .rate(44_100) .channels(1) diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs index 4972fea3..acf79564 100644 --- a/audio/csound/src/filter/imp.rs +++ b/audio/csound/src/filter/imp.rs @@ -453,9 +453,8 @@ impl ElementImpl for CsoundFilter { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy<Vec<gst::PadTemplate>> = Lazy::new(|| { - let caps = gst_audio::AudioCapsBuilder::new() + let caps = gst_audio::AudioCapsBuilder::new_interleaved() .format(gst_audio::AUDIO_FORMAT_F64) - .layout(gst_audio::AudioLayout::Interleaved) .build(); let src_pad_template = gst::PadTemplate::new( "src", |