Update for remaining gst::Element::link_many() and related API generalization

Specifically, get rid of now unneeded `&`.
This commit is contained in:
Sebastian Dröge 2023-03-09 17:30:57 +02:00
parent fc5ed15af5
commit b025d068f2
8 changed files with 19 additions and 19 deletions

View file

@ -84,7 +84,7 @@ fn create_pipeline() -> Result<gst::Pipeline, Box<dyn Error>> {
.build()
.unwrap();
pipeline.add_many(&[&audio_src, &csoundfilter, &audio_sink])?;
pipeline.add_many([&audio_src, &csoundfilter, &audio_sink])?;
audio_src.link_pads(Some("src"), &csoundfilter, Some("sink"))?;
csoundfilter.link_pads(Some("src"), &audio_sink, Some("sink"))?;

View file

@ -102,9 +102,9 @@ fn main() -> Result<(), Box<dyn Error>> {
let pipeline = gst::Pipeline::builder().name("test-pipeline").build();
pipeline
.add_many(&[&filesrc, &decrypter, &typefind, &filesink])
.add_many([&filesrc, &decrypter, &typefind, &filesink])
.expect("failed to add elements to the pipeline");
gst::Element::link_many(&[&filesrc, &decrypter, &typefind, &filesink])
gst::Element::link_many([&filesrc, &decrypter, &typefind, &filesink])
.expect("failed to link the elements");
pipeline

View file

@ -105,9 +105,9 @@ fn main() -> Result<(), Box<dyn Error>> {
let pipeline = gst::Pipeline::builder().name("test-pipeline").build();
pipeline
.add_many(&[&filesrc, &encrypter, &filesink])
.add_many([&filesrc, &encrypter, &filesink])
.expect("failed to add elements to the pipeline");
gst::Element::link_many(&[&filesrc, &encrypter, &filesink])
gst::Element::link_many([&filesrc, &encrypter, &filesink])
.expect("failed to link the elements");
pipeline.set_state(gst::State::Playing)?;

View file

@ -91,9 +91,9 @@ fn test_pipeline() {
let sink = gst_app::AppSink::builder().build();
pipeline
.add_many(&[&filesrc, &dec, &typefind, sink.upcast_ref()])
.add_many([&filesrc, &dec, &typefind, sink.upcast_ref()])
.expect("failed to add elements to the pipeline");
gst::Element::link_many(&[&filesrc, &dec, &typefind, sink.upcast_ref()])
gst::Element::link_many([&filesrc, &dec, &typefind, sink.upcast_ref()])
.expect("failed to link the elements");
let adapter = Arc::new(Mutex::new(gst_base::UniqueAdapter::new()));
@ -179,9 +179,9 @@ fn test_pull_range() {
.unwrap();
pipeline
.add_many(&[&filesrc, &dec])
.add_many([&filesrc, &dec])
.expect("failed to add elements to the pipeline");
gst::Element::link_many(&[&filesrc, &dec]).expect("failed to link the elements");
gst::Element::link_many([&filesrc, &dec]).expect("failed to link the elements");
// Activate in the pad in pull mode
pipeline

View file

@ -97,7 +97,7 @@ impl TranscriberBin {
.build()?;
let ccconverter = gst::ElementFactory::make("ccconverter").build()?;
state.transcription_bin.add_many(&[
state.transcription_bin.add_many([
&aqueue_transcription,
&state.transcriber_aconv,
&state.transcriber,
@ -109,7 +109,7 @@ impl TranscriberBin {
&state.transcription_valve,
])?;
gst::Element::link_many(&[
gst::Element::link_many([
&aqueue_transcription,
&state.transcriber_aconv,
&state.transcriber,
@ -156,7 +156,7 @@ impl TranscriberBin {
let vclocksync = gst::ElementFactory::make("clocksync").build()?;
state.internal_bin.add_many(&[
state.internal_bin.add_many([
&aclocksync,
&state.audio_tee,
&state.audio_queue_passthrough,
@ -392,7 +392,7 @@ impl TranscriberBin {
state.transcription_bin.add(&state.transcriber)?;
state.transcriber.sync_state_with_parent().unwrap();
gst::Element::link_many(&[
gst::Element::link_many([
&state.transcriber_aconv,
&state.transcriber,
&state.transcriber_queue,

View file

@ -57,7 +57,7 @@ fn create_ui(app: &gtk::Application) {
(src, sink.upcast())
};
pipeline.add_many(&[&src, &overlay, &sink]).unwrap();
pipeline.add_many([&src, &overlay, &sink]).unwrap();
let caps = gst_video::VideoCapsBuilder::new()
.width(640)
.height(480)

View file

@ -33,9 +33,9 @@ fn test_red_color() {
let sink = gst::ElementFactory::make("fakevideosink").build().unwrap();
pipeline
.add_many(&[&src, &filter, &sink])
.add_many([&src, &filter, &sink])
.expect("failed to add elements to the pipeline");
gst::Element::link_many(&[&src, &filter, &sink]).expect("failed to link the elements");
gst::Element::link_many([&src, &filter, &sink]).expect("failed to link the elements");
pipeline
.set_state(gst::State::Playing)

View file

@ -48,10 +48,10 @@ fn setup_pipeline(
let sink = gst::ElementFactory::make("fakesink").build().unwrap();
pipeline
.add_many(&[&reference_src, &secondary_src, &videocompare, &sink])
.add_many([&reference_src, &secondary_src, &videocompare, &sink])
.unwrap();
gst::Element::link_many(&[&reference_src, &videocompare, &sink]).expect("Link primary path");
gst::Element::link_many(&[&secondary_src, &videocompare]).expect("Link secondary path");
gst::Element::link_many([&reference_src, &videocompare, &sink]).expect("Link primary path");
gst::Element::link_many([&secondary_src, &videocompare]).expect("Link secondary path");
}
#[test]