mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 04:51:26 +00:00
Update for remaining gst::Element::link_many()
and related API generalization
Specifically, get rid of now unneeded `&`.
This commit is contained in:
parent
fc5ed15af5
commit
b025d068f2
8 changed files with 19 additions and 19 deletions
|
@ -84,7 +84,7 @@ fn create_pipeline() -> Result<gst::Pipeline, Box<dyn Error>> {
|
||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.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"))?;
|
audio_src.link_pads(Some("src"), &csoundfilter, Some("sink"))?;
|
||||||
csoundfilter.link_pads(Some("src"), &audio_sink, Some("sink"))?;
|
csoundfilter.link_pads(Some("src"), &audio_sink, Some("sink"))?;
|
||||||
|
|
|
@ -102,9 +102,9 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
|
|
||||||
let pipeline = gst::Pipeline::builder().name("test-pipeline").build();
|
let pipeline = gst::Pipeline::builder().name("test-pipeline").build();
|
||||||
pipeline
|
pipeline
|
||||||
.add_many(&[&filesrc, &decrypter, &typefind, &filesink])
|
.add_many([&filesrc, &decrypter, &typefind, &filesink])
|
||||||
.expect("failed to add elements to the pipeline");
|
.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");
|
.expect("failed to link the elements");
|
||||||
|
|
||||||
pipeline
|
pipeline
|
||||||
|
|
|
@ -105,9 +105,9 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||||
|
|
||||||
let pipeline = gst::Pipeline::builder().name("test-pipeline").build();
|
let pipeline = gst::Pipeline::builder().name("test-pipeline").build();
|
||||||
pipeline
|
pipeline
|
||||||
.add_many(&[&filesrc, &encrypter, &filesink])
|
.add_many([&filesrc, &encrypter, &filesink])
|
||||||
.expect("failed to add elements to the pipeline");
|
.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");
|
.expect("failed to link the elements");
|
||||||
|
|
||||||
pipeline.set_state(gst::State::Playing)?;
|
pipeline.set_state(gst::State::Playing)?;
|
||||||
|
|
|
@ -91,9 +91,9 @@ fn test_pipeline() {
|
||||||
let sink = gst_app::AppSink::builder().build();
|
let sink = gst_app::AppSink::builder().build();
|
||||||
|
|
||||||
pipeline
|
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");
|
.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");
|
.expect("failed to link the elements");
|
||||||
|
|
||||||
let adapter = Arc::new(Mutex::new(gst_base::UniqueAdapter::new()));
|
let adapter = Arc::new(Mutex::new(gst_base::UniqueAdapter::new()));
|
||||||
|
@ -179,9 +179,9 @@ fn test_pull_range() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
pipeline
|
pipeline
|
||||||
.add_many(&[&filesrc, &dec])
|
.add_many([&filesrc, &dec])
|
||||||
.expect("failed to add elements to the pipeline");
|
.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
|
// Activate in the pad in pull mode
|
||||||
pipeline
|
pipeline
|
||||||
|
|
|
@ -97,7 +97,7 @@ impl TranscriberBin {
|
||||||
.build()?;
|
.build()?;
|
||||||
let ccconverter = gst::ElementFactory::make("ccconverter").build()?;
|
let ccconverter = gst::ElementFactory::make("ccconverter").build()?;
|
||||||
|
|
||||||
state.transcription_bin.add_many(&[
|
state.transcription_bin.add_many([
|
||||||
&aqueue_transcription,
|
&aqueue_transcription,
|
||||||
&state.transcriber_aconv,
|
&state.transcriber_aconv,
|
||||||
&state.transcriber,
|
&state.transcriber,
|
||||||
|
@ -109,7 +109,7 @@ impl TranscriberBin {
|
||||||
&state.transcription_valve,
|
&state.transcription_valve,
|
||||||
])?;
|
])?;
|
||||||
|
|
||||||
gst::Element::link_many(&[
|
gst::Element::link_many([
|
||||||
&aqueue_transcription,
|
&aqueue_transcription,
|
||||||
&state.transcriber_aconv,
|
&state.transcriber_aconv,
|
||||||
&state.transcriber,
|
&state.transcriber,
|
||||||
|
@ -156,7 +156,7 @@ impl TranscriberBin {
|
||||||
|
|
||||||
let vclocksync = gst::ElementFactory::make("clocksync").build()?;
|
let vclocksync = gst::ElementFactory::make("clocksync").build()?;
|
||||||
|
|
||||||
state.internal_bin.add_many(&[
|
state.internal_bin.add_many([
|
||||||
&aclocksync,
|
&aclocksync,
|
||||||
&state.audio_tee,
|
&state.audio_tee,
|
||||||
&state.audio_queue_passthrough,
|
&state.audio_queue_passthrough,
|
||||||
|
@ -392,7 +392,7 @@ impl TranscriberBin {
|
||||||
|
|
||||||
state.transcription_bin.add(&state.transcriber)?;
|
state.transcription_bin.add(&state.transcriber)?;
|
||||||
state.transcriber.sync_state_with_parent().unwrap();
|
state.transcriber.sync_state_with_parent().unwrap();
|
||||||
gst::Element::link_many(&[
|
gst::Element::link_many([
|
||||||
&state.transcriber_aconv,
|
&state.transcriber_aconv,
|
||||||
&state.transcriber,
|
&state.transcriber,
|
||||||
&state.transcriber_queue,
|
&state.transcriber_queue,
|
||||||
|
|
|
@ -57,7 +57,7 @@ fn create_ui(app: >k::Application) {
|
||||||
(src, sink.upcast())
|
(src, sink.upcast())
|
||||||
};
|
};
|
||||||
|
|
||||||
pipeline.add_many(&[&src, &overlay, &sink]).unwrap();
|
pipeline.add_many([&src, &overlay, &sink]).unwrap();
|
||||||
let caps = gst_video::VideoCapsBuilder::new()
|
let caps = gst_video::VideoCapsBuilder::new()
|
||||||
.width(640)
|
.width(640)
|
||||||
.height(480)
|
.height(480)
|
||||||
|
|
|
@ -33,9 +33,9 @@ fn test_red_color() {
|
||||||
let sink = gst::ElementFactory::make("fakevideosink").build().unwrap();
|
let sink = gst::ElementFactory::make("fakevideosink").build().unwrap();
|
||||||
|
|
||||||
pipeline
|
pipeline
|
||||||
.add_many(&[&src, &filter, &sink])
|
.add_many([&src, &filter, &sink])
|
||||||
.expect("failed to add elements to the pipeline");
|
.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
|
pipeline
|
||||||
.set_state(gst::State::Playing)
|
.set_state(gst::State::Playing)
|
||||||
|
|
|
@ -48,10 +48,10 @@ fn setup_pipeline(
|
||||||
let sink = gst::ElementFactory::make("fakesink").build().unwrap();
|
let sink = gst::ElementFactory::make("fakesink").build().unwrap();
|
||||||
|
|
||||||
pipeline
|
pipeline
|
||||||
.add_many(&[&reference_src, &secondary_src, &videocompare, &sink])
|
.add_many([&reference_src, &secondary_src, &videocompare, &sink])
|
||||||
.unwrap();
|
.unwrap();
|
||||||
gst::Element::link_many(&[&reference_src, &videocompare, &sink]).expect("Link primary path");
|
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([&secondary_src, &videocompare]).expect("Link secondary path");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
Loading…
Reference in a new issue