diff --git a/examples/src/bin/appsink.rs b/examples/src/bin/appsink.rs index 3ceb8ce46..f343318c9 100644 --- a/examples/src/bin/appsink.rs +++ b/examples/src/bin/appsink.rs @@ -60,7 +60,7 @@ fn create_pipeline() -> Result { &gst::Caps::builder("audio/x-raw") .field("format", gst_audio::AUDIO_FORMAT_S16.to_str()) .field("layout", "interleaved") - .field("channels", (1i32)) + .field("channels", 1i32) .field("rate", gst::IntRange::::new(1, i32::MAX)) .build(), )); diff --git a/examples/src/bin/decodebin.rs b/examples/src/bin/decodebin.rs index 264ec2250..3a1ea1335 100644 --- a/examples/src/bin/decodebin.rs +++ b/examples/src/bin/decodebin.rs @@ -81,7 +81,7 @@ fn example_main() -> Result<(), Error> { gst::ElementFactory::make("decodebin", None).map_err(|_| MissingElement("decodebin"))?; // Tell the filesrc what file to load - src.set_property("location", &uri)?; + src.set_property("location", uri)?; pipeline.add_many(&[&src, &decodebin])?; gst::Element::link_many(&[&src, &decodebin])?; diff --git a/examples/src/bin/encodebin.rs b/examples/src/bin/encodebin.rs index 55325d2c5..bb0f07149 100644 --- a/examples/src/bin/encodebin.rs +++ b/examples/src/bin/encodebin.rs @@ -104,9 +104,9 @@ fn example_main() -> Result<(), Error> { let sink = gst::ElementFactory::make("filesink", None).map_err(|_| MissingElement("filesink"))?; - src.set_property("uri", &uri) + src.set_property("uri", uri) .expect("setting URI Property failed"); - sink.set_property("location", &output_file) + sink.set_property("location", output_file) .expect("setting location property failed"); // Configure the encodebin. diff --git a/examples/src/bin/overlay-composition.rs b/examples/src/bin/overlay-composition.rs index fb550cc2e..f14533d8f 100644 --- a/examples/src/bin/overlay-composition.rs +++ b/examples/src/bin/overlay-composition.rs @@ -81,9 +81,9 @@ fn create_pipeline() -> Result { // with images of the size 800x800, and framerate of 15 fps, since my laptop struggles // rendering it at the default 30 fps let caps = gst::Caps::builder("video/x-raw") - .field("width", &800i32) - .field("height", &800i32) - .field("framerate", &gst::Fraction::new(15, 1)) + .field("width", 800i32) + .field("height", 800i32) + .field("framerate", gst::Fraction::new(15, 1)) .build(); capsfilter.set_property("caps", &caps).unwrap(); diff --git a/examples/src/bin/pango-cairo.rs b/examples/src/bin/pango-cairo.rs index 417f8831c..1f6a60c87 100644 --- a/examples/src/bin/pango-cairo.rs +++ b/examples/src/bin/pango-cairo.rs @@ -80,8 +80,8 @@ fn create_pipeline() -> Result { // Plug in a capsfilter element that will force the videotestsrc and the cairooverlay to work // with images of the size 800x800. let caps = gst::Caps::builder("video/x-raw") - .field("width", &800i32) - .field("height", &800i32) + .field("width", 800i32) + .field("height", 800i32) .build(); capsfilter.set_property("caps", &caps).unwrap(); diff --git a/examples/src/bin/playbin.rs b/examples/src/bin/playbin.rs index d3cf02286..5bf48efe1 100644 --- a/examples/src/bin/playbin.rs +++ b/examples/src/bin/playbin.rs @@ -29,7 +29,7 @@ fn example_main() { // Create a new playbin element, and tell it what uri to play back. let playbin = gst::ElementFactory::make("playbin", None).unwrap(); - playbin.set_property("uri", &uri).unwrap(); + playbin.set_property("uri", uri).unwrap(); // For flags handling // With flags, one can configure playbin's behavior such as whether it diff --git a/examples/src/bin/rtpfecclient.rs b/examples/src/bin/rtpfecclient.rs index 6a6476c3c..82bdd3189 100644 --- a/examples/src/bin/rtpfecclient.rs +++ b/examples/src/bin/rtpfecclient.rs @@ -92,7 +92,7 @@ fn make_fec_decoder(rtpbin: &gst::Element, sess_id: u32) -> Result Result<(), Error> { pipeline.add_many(&[&enc, &mux, &sink])?; gst::Element::link_many(&[&filter, &enc, &mux, &sink])?; - sink.set_property("location", &"out.mkv")?; + sink.set_property("location", "out.mkv")?; enc.set_property_from_str("tune", "zerolatency")?; eprintln!("Recording to out.mkv"); } @@ -147,7 +147,7 @@ fn example_main() -> Result<(), Error> { let storage = values[1] .get::() .expect("rtpbin \"new-storage\" signal values[1]"); - storage.set_property("size-time", &250_000_000u64).unwrap(); + storage.set_property("size-time", 250_000_000u64).unwrap(); None })?; @@ -232,10 +232,10 @@ fn example_main() -> Result<(), Error> { .field("height", 1080i32) .build(); - src.set_property("address", &"127.0.0.1")?; + src.set_property("address", "127.0.0.1")?; src.set_property("caps", &rtp_caps)?; - netsim.set_property("drop-probability", &drop_probability)?; - rtpbin.set_property("do-lost", &true)?; + netsim.set_property("drop-probability", drop_probability)?; + rtpbin.set_property("do-lost", true)?; filter.set_property("caps", &video_caps)?; let bus = pipeline diff --git a/examples/src/bin/rtpfecserver.rs b/examples/src/bin/rtpfecserver.rs index 82c9d94d4..f0098a7f7 100644 --- a/examples/src/bin/rtpfecserver.rs +++ b/examples/src/bin/rtpfecserver.rs @@ -72,9 +72,9 @@ fn connect_decodebin_pad(src_pad: &gst::Pad, sink: &gst::Element) -> Result<(), fn make_fec_encoder(fec_percentage: u32) -> Result { let fecenc = make_element("rtpulpfecenc", None)?; - fecenc.set_property("pt", &100u32)?; - fecenc.set_property("multipacket", &true)?; - fecenc.set_property("percentage", &fec_percentage)?; + fecenc.set_property("pt", 100u32)?; + fecenc.set_property("multipacket", true)?; + fecenc.set_property("percentage", fec_percentage)?; Ok(fecenc) } @@ -152,16 +152,16 @@ fn example_main() -> Result<(), Error> { let video_caps = gst::Caps::builder("video/x-raw").build(); src.set_property_from_str("pattern", "ball")?; - sink.set_property("host", &"127.0.0.1")?; - sink.set_property("sync", &true)?; - enc.set_property("keyframe-max-dist", &30i32)?; - enc.set_property("threads", &12i32)?; - enc.set_property("cpu-used", &(-16i32))?; - enc.set_property("deadline", &1i64)?; + sink.set_property("host", "127.0.0.1")?; + sink.set_property("sync", true)?; + enc.set_property("keyframe-max-dist", 30i32)?; + enc.set_property("threads", 12i32)?; + enc.set_property("cpu-used", -16i32)?; + enc.set_property("deadline", 1i64)?; enc.set_property_from_str("error-resilient", "default")?; - src.set_property("expose-all-streams", &false)?; - src.set_property("caps", &video_caps)?; - src.set_property("uri", &uri)?; + src.set_property("expose-all-streams", false)?; + src.set_property("caps", video_caps)?; + src.set_property("uri", uri)?; let bus = pipeline .bus() diff --git a/examples/src/bin/rtsp-server-subclass.rs b/examples/src/bin/rtsp-server-subclass.rs index 0cdd0cffb..c5e026283 100644 --- a/examples/src/bin/rtsp-server-subclass.rs +++ b/examples/src/bin/rtsp-server-subclass.rs @@ -130,10 +130,10 @@ mod media_factory { let pay = gst::ElementFactory::make("rtpvp8pay", Some("pay0")).unwrap(); // Configure the videotestsrc live - src.set_property("is-live", &true).unwrap(); + src.set_property("is-live", true).unwrap(); // Produce encoded data as fast as possible - enc.set_property("deadline", &1i64).unwrap(); + enc.set_property("deadline", 1i64).unwrap(); bin.add_many(&[&src, &enc, &pay]).unwrap(); gst::Element::link_many(&[&src, &enc, &pay]).unwrap(); diff --git a/examples/src/bin/thumbnail.rs b/examples/src/bin/thumbnail.rs index 5b56ee5df..021a12446 100644 --- a/examples/src/bin/thumbnail.rs +++ b/examples/src/bin/thumbnail.rs @@ -47,14 +47,14 @@ fn create_pipeline(uri: String, out_path: std::path::PathBuf) -> Result Result<(), Error> { let sink = gst::ElementFactory::make("filesink", None).map_err(|_| MissingElement("filesink"))?; - sink.set_property("location", &output_file) + sink.set_property("location", output_file) .expect("setting location property failed"); // Increase the queue capacity to 100MB to avoid a stalling pipeline queue - .set_property("max-size-buffers", &0u32) + .set_property("max-size-buffers", 0u32) .expect("changing capacity of multiqueue failed"); queue - .set_property("max-size-time", &0u64) + .set_property("max-size-time", 0u64) .expect("changing capacity of multiqueue failed"); queue - .set_property("max-size-bytes", &(1024u32 * 1024 * 100)) + .set_property("max-size-bytes", 1024u32 * 1024 * 100) .expect("changing capacity of multiqueue failed"); pipeline diff --git a/examples/src/bin/video_converter.rs b/examples/src/bin/video_converter.rs index 3ffe49e73..409f7796b 100644 --- a/examples/src/bin/video_converter.rs +++ b/examples/src/bin/video_converter.rs @@ -24,10 +24,10 @@ fn example_main() { /* Completely contrived example that takes the 4:3 input video, cuts out a 5:4 frame * and then adds pillarbox borders to place it in a 16:9 target area */ /* The output will be the full frame: */ - sinkpad.set_property("xpos", &0i32).unwrap(); - sinkpad.set_property("ypos", &0i32).unwrap(); - sinkpad.set_property("width", &1280i32).unwrap(); - sinkpad.set_property("height", &720i32).unwrap(); + sinkpad.set_property("xpos", 0i32).unwrap(); + sinkpad.set_property("ypos", 0i32).unwrap(); + sinkpad.set_property("width", 1280i32).unwrap(); + sinkpad.set_property("height", 720i32).unwrap(); let mut converter_config = gst_video::VideoConverterConfig::new(); /* Crop the input frame to 5:4: */ diff --git a/examples/src/glupload.rs b/examples/src/glupload.rs index 1bb4ffc79..cc0f1fcb3 100644 --- a/examples/src/glupload.rs +++ b/examples/src/glupload.rs @@ -543,14 +543,14 @@ impl App { .dynamic_cast::() .expect("Sink element is expected to be an appsink!"); - appsink.set_property("enable-last-sample", &false)?; - appsink.set_property("emit-signals", &false)?; - appsink.set_property("max-buffers", &1u32)?; + appsink.set_property("enable-last-sample", false)?; + appsink.set_property("emit-signals", false)?; + appsink.set_property("max-buffers", 1u32)?; let caps = gst::Caps::builder("video/x-raw") .features(&[&gst_gl::CAPS_FEATURE_MEMORY_GL_MEMORY]) - .field("format", &gst_video::VideoFormat::Rgba.to_str()) - .field("texture-target", &"2D") + .field("format", gst_video::VideoFormat::Rgba.to_str()) + .field("texture-target", "2D") .build(); appsink.set_caps(Some(&caps)); diff --git a/gstreamer-app/src/app_sink.rs b/gstreamer-app/src/app_sink.rs index 3dec94682..6536d3d83 100644 --- a/gstreamer-app/src/app_sink.rs +++ b/gstreamer-app/src/app_sink.rs @@ -1035,7 +1035,7 @@ mod tests { let videotestsrc = gst::ElementFactory::make("videotestsrc", None).unwrap(); let appsink = gst::ElementFactory::make("appsink", None).unwrap(); - videotestsrc.set_property("num-buffers", &5).unwrap(); + videotestsrc.set_property("num-buffers", 5).unwrap(); let pipeline = gst::Pipeline::new(None); pipeline.add(&videotestsrc).unwrap(); diff --git a/gstreamer-app/src/app_src.rs b/gstreamer-app/src/app_src.rs index 07ee101e6..5d93323bb 100644 --- a/gstreamer-app/src/app_src.rs +++ b/gstreamer-app/src/app_src.rs @@ -454,7 +454,7 @@ mod tests { let appsrc = gst::ElementFactory::make("appsrc", None).unwrap(); let fakesink = gst::ElementFactory::make("fakesink", None).unwrap(); - fakesink.set_property("signal-handoffs", &true).unwrap(); + fakesink.set_property("signal-handoffs", true).unwrap(); let pipeline = gst::Pipeline::new(None); pipeline.add(&appsrc).unwrap(); diff --git a/gstreamer-audio/src/functions.rs b/gstreamer-audio/src/functions.rs index 3467d095c..43c8af8be 100644 --- a/gstreamer-audio/src/functions.rs +++ b/gstreamer-audio/src/functions.rs @@ -61,13 +61,13 @@ pub fn audio_make_raw_caps( .collect(); let builder = gst::caps::Caps::builder("audio/x-raw") - .field("format", &gst::List::from_owned(formats)) - .field("rate", &gst::IntRange::::new(1, i32::MAX)) - .field("channels", &gst::IntRange::::new(1, i32::MAX)); + .field("format", gst::List::from_owned(formats)) + .field("rate", gst::IntRange::::new(1, i32::MAX)) + .field("channels", gst::IntRange::::new(1, i32::MAX)); match layout { - crate::AudioLayout::Interleaved => builder.field("layout", &"interleaved"), - crate::AudioLayout::NonInterleaved => builder.field("layout", &"non-interleaved"), + crate::AudioLayout::Interleaved => builder.field("layout", "interleaved"), + crate::AudioLayout::NonInterleaved => builder.field("layout", "non-interleaved"), crate::AudioLayout::__Unknown(_) => builder, } } @@ -112,8 +112,8 @@ mod tests { &[crate::AudioFormat::S16be, crate::AudioFormat::S16le], crate::AudioLayout::NonInterleaved, ) - .field("rate", &16000) - .field("channels", &2) + .field("rate", 16000) + .field("channels", 2) .build(); assert_eq!( caps.to_string(), diff --git a/gstreamer-video/src/functions.rs b/gstreamer-video/src/functions.rs index 8bf700355..7138e36e3 100644 --- a/gstreamer-video/src/functions.rs +++ b/gstreamer-video/src/functions.rs @@ -205,12 +205,12 @@ pub fn video_make_raw_caps( .collect(); gst::caps::Caps::builder("video/x-raw") - .field("format", &gst::List::from_owned(formats)) - .field("width", &gst::IntRange::::new(1, i32::MAX)) - .field("height", &gst::IntRange::::new(1, i32::MAX)) + .field("format", gst::List::from_owned(formats)) + .field("width", gst::IntRange::::new(1, i32::MAX)) + .field("height", gst::IntRange::::new(1, i32::MAX)) .field( "framerate", - &gst::FractionRange::new(gst::Fraction::new(0, 1), gst::Fraction::new(i32::MAX, 1)), + gst::FractionRange::new(gst::Fraction::new(0, 1), gst::Fraction::new(i32::MAX, 1)), ) } @@ -302,9 +302,9 @@ mod tests { } let caps = video_make_raw_caps(&[crate::VideoFormat::Nv12, crate::VideoFormat::Nv16]) - .field("width", &800) - .field("height", &600) - .field("framerate", &gst::Fraction::new(30, 1)) + .field("width", 800) + .field("height", 600) + .field("framerate", gst::Fraction::new(30, 1)) .build(); assert_eq!(caps.to_string(), "video/x-raw, format=(string){ NV12, NV16 }, width=(int)800, height=(int)600, framerate=(fraction)30/1"); } diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index cdebe9df4..78bcf14f6 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -885,13 +885,13 @@ mod tests { ); let caps = Caps::builder("foo/bar") - .field("int", &12) + .field("int", 12) .any_features() .build(); assert_eq!(caps.to_string(), "foo/bar(ANY), int=(int)12"); let caps = Caps::builder("foo/bar") - .field("int", &12) + .field("int", 12) .features(&["foo:bla", "foo:baz"]) .build(); assert_eq!(caps.to_string(), "foo/bar(foo:bla, foo:baz), int=(int)12"); @@ -918,7 +918,7 @@ mod tests { let caps = Caps::builder_full() .structure( Structure::builder("audio/x-raw") - .field("format", &"S16LE") + .field("format", "S16LE") .build(), ) .structure(Structure::builder("video/x-raw").build()) diff --git a/gstreamer/src/object.rs b/gstreamer/src/object.rs index 5caf83466..f1f3bc36a 100644 --- a/gstreamer/src/object.rs +++ b/gstreamer/src/object.rs @@ -145,7 +145,7 @@ mod tests { *notify_clone.lock().unwrap() = Some((id.clone(), prop.name())); }); - identity.set_property("silent", &false).unwrap(); + identity.set_property("silent", false).unwrap(); assert_eq!( *notify.lock().unwrap(), Some((identity.upcast::(), "silent")) diff --git a/gstreamer/src/sample.rs b/gstreamer/src/sample.rs index d4540ea01..0e408021e 100644 --- a/gstreamer/src/sample.rs +++ b/gstreamer/src/sample.rs @@ -254,7 +254,7 @@ mod tests { crate::init().unwrap(); let info = Structure::builder("sample.info") - .field("f3", &123i32) + .field("f3", 123i32) .build(); let sample = Sample::builder().info(info).build(); diff --git a/gstreamer/src/sample_serde.rs b/gstreamer/src/sample_serde.rs index c09c3e677..eb809069b 100644 --- a/gstreamer/src/sample_serde.rs +++ b/gstreamer/src/sample_serde.rs @@ -103,8 +103,8 @@ mod tests { } let caps = Caps::builder("sample/caps") - .field("int", &12) - .field("bool", &true) + .field("int", 12) + .field("bool", true) .build(); let mut segment = Segment::new(); @@ -121,7 +121,7 @@ mod tests { segment.set_duration(GenericFormattedValue::from(ClockTime::NONE)); let info = Structure::builder("sample.info") - .field("f3", &123i32) + .field("f3", 123i32) .build(); Sample::builder() @@ -333,8 +333,8 @@ mod tests { } let caps = Caps::builder("sample/caps") - .field("int", &12) - .field("bool", &true) + .field("int", 12) + .field("bool", true) .build(); let mut segment = Segment::new(); @@ -351,7 +351,7 @@ mod tests { segment.set_duration(GenericFormattedValue::from(ClockTime::NONE)); let info = Structure::builder("sample.info") - .field("f3", &123i32) + .field("f3", 123i32) .build(); Sample::builder() diff --git a/gstreamer/src/structure.rs b/gstreamer/src/structure.rs index 84577ac07..226924505 100644 --- a/gstreamer/src/structure.rs +++ b/gstreamer/src/structure.rs @@ -900,9 +900,9 @@ mod tests { let mut s = Structure::new_empty("test"); assert_eq!(s.name(), "test"); - s.set("f1", &"abc"); + s.set("f1", "abc"); s.set("f2", &String::from("bcd")); - s.set("f3", &123i32); + s.set("f3", 123i32); assert_eq!(s.get::<&str>("f1"), Ok("abc")); assert_eq!(s.get::>("f2"), Ok(Some("bcd"))); @@ -952,9 +952,9 @@ mod tests { crate::init().unwrap(); let s = Structure::builder("test") - .field("f1", &"abc") + .field("f1", "abc") .field("f2", &String::from("bcd")) - .field("f3", &123i32) + .field("f3", 123i32) .build(); assert_eq!(s.name(), "test"); @@ -993,9 +993,9 @@ mod tests { crate::init().unwrap(); let s = Structure::builder("test") - .field("f1", &"abc") + .field("f1", "abc") .field("f2", &String::from("bcd")) - .field("f3", &123i32) + .field("f3", 123i32) .build(); let s2 = Structure::from_iter( diff --git a/gstreamer/src/structure_serde.rs b/gstreamer/src/structure_serde.rs index 62fcca5b2..f848285b0 100644 --- a/gstreamer/src/structure_serde.rs +++ b/gstreamer/src/structure_serde.rs @@ -176,16 +176,16 @@ mod tests { crate::init().unwrap(); let s = Structure::builder("test") - .field("f1", &"abc") + .field("f1", "abc") .field("f2", &String::from("bcd")) - .field("f3", &123i32) - .field("fraction", &Fraction::new(1, 2)) - .field("date", &Date::new_dmy(19, DateMonth::August, 2019).unwrap()) + .field("f3", 123i32) + .field("fraction", Fraction::new(1, 2)) + .field("date", Date::new_dmy(19, DateMonth::August, 2019).unwrap()) .field( "date_time", - &DateTime::new(2f32, 2019, 8, 19, 13, 34, 42f64).unwrap(), + DateTime::new(2f32, 2019, 8, 19, 13, 34, 42f64).unwrap(), ) - .field("array", &Array::new(&[&1, &2])) + .field("array", Array::new(&[&1, &2])) .build(); let pretty_config = ron::ser::PrettyConfig::new().new_line("".to_string()); @@ -252,16 +252,16 @@ mod tests { crate::init().unwrap(); let s = Structure::builder("test") - .field("f1", &"abc") - .field("f2", &"bcd".to_owned()) - .field("f3", &123i32) - .field("fraction", &Fraction::new(1, 2)) - .field("date", &Date::new_dmy(19, DateMonth::August, 2019).unwrap()) + .field("f1", "abc") + .field("f2", "bcd".to_owned()) + .field("f3", 123i32) + .field("fraction", Fraction::new(1, 2)) + .field("date", Date::new_dmy(19, DateMonth::August, 2019).unwrap()) .field( "date_time", - &DateTime::new(2f32, 2019, 8, 19, 13, 34, 42f64).unwrap(), + DateTime::new(2f32, 2019, 8, 19, 13, 34, 42f64).unwrap(), ) - .field("array", &Array::new(&[&1, &2])) + .field("array", Array::new(&[&1, &2])) .build(); let s_ser = ron::ser::to_string(&s).unwrap(); let s_de: Structure = ron::de::from_str(s_ser.as_str()).unwrap(); diff --git a/gstreamer/src/subclass/element.rs b/gstreamer/src/subclass/element.rs index 85520a869..4b76808af 100644 --- a/gstreamer/src/subclass/element.rs +++ b/gstreamer/src/subclass/element.rs @@ -806,7 +806,7 @@ mod tests { let src = ElementFactory::make("fakesrc", None).unwrap(); let sink = ElementFactory::make("fakesink", None).unwrap(); - src.set_property("num-buffers", &100i32).unwrap(); + src.set_property("num-buffers", 100i32).unwrap(); pipeline .add_many(&[&src, element.upcast_ref(), &sink]) diff --git a/tutorials/src/bin/basic-tutorial-3.rs b/tutorials/src/bin/basic-tutorial-3.rs index 85686b4b0..885ce64fb 100644 --- a/tutorials/src/bin/basic-tutorial-3.rs +++ b/tutorials/src/bin/basic-tutorial-3.rs @@ -31,7 +31,7 @@ fn tutorial_main() { let uri = "https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"; source - .set_property("uri", &uri) + .set_property("uri", uri) .expect("Can't set uri property on uridecodebin"); // Connect the pad-added signal diff --git a/tutorials/src/bin/basic-tutorial-4.rs b/tutorials/src/bin/basic-tutorial-4.rs index 60562bfed..21193c35e 100644 --- a/tutorials/src/bin/basic-tutorial-4.rs +++ b/tutorials/src/bin/basic-tutorial-4.rs @@ -32,7 +32,7 @@ fn tutorial_main() { let uri = "https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"; playbin - .set_property("uri", &uri) + .set_property("uri", uri) .expect("Can't set uri property on playbin"); // Start playing diff --git a/tutorials/src/bin/basic-tutorial-5.rs b/tutorials/src/bin/basic-tutorial-5.rs index 41ad0c803..40b998e73 100644 --- a/tutorials/src/bin/basic-tutorial-5.rs +++ b/tutorials/src/bin/basic-tutorial-5.rs @@ -302,7 +302,7 @@ mod tutorial5 { let uri = "https://www.freedesktop.org/software/gstreamer-sdk/\ data/media/sintel_trailer-480p.webm"; let playbin = gst::ElementFactory::make("playbin", None).unwrap(); - playbin.set_property("uri", &uri).unwrap(); + playbin.set_property("uri", uri).unwrap(); playbin .connect("video-tags-changed", false, |args| { diff --git a/tutorials/src/bin/basic-tutorial-7.rs b/tutorials/src/bin/basic-tutorial-7.rs index f0b96a765..7d75a491f 100644 --- a/tutorials/src/bin/basic-tutorial-7.rs +++ b/tutorials/src/bin/basic-tutorial-7.rs @@ -24,7 +24,7 @@ fn tutorial_main() { let pipeline = gst::Pipeline::new(Some("test-pipeline")); - audio_source.set_property("freq", &215.0).unwrap(); + audio_source.set_property("freq", 215.0).unwrap(); visual.set_property_from_str("shader", "none").unwrap(); visual.set_property_from_str("style", "lines").unwrap(); diff --git a/tutorials/src/bin/playback-tutorial-4.rs b/tutorials/src/bin/playback-tutorial-4.rs index c126a427f..754618643 100644 --- a/tutorials/src/bin/playback-tutorial-4.rs +++ b/tutorials/src/bin/playback-tutorial-4.rs @@ -20,7 +20,7 @@ fn tutorial_main() -> Result<(), Error> { let uri = "https://www.freedesktop.org/software/gstreamer-sdk/data/media/sintel_trailer-480p.webm"; let pipeline = gst::ElementFactory::make("playbin", None)?; - pipeline.set_property("uri", &uri).unwrap(); + pipeline.set_property("uri", uri).unwrap(); // Set the download flag let flags = pipeline.property("flags")?; @@ -34,7 +34,7 @@ fn tutorial_main() -> Result<(), Error> { pipeline.set_property_from_value("flags", &flags).unwrap(); // Uncomment this line to limit the amount of downloaded data. - // pipeline.set_property("ring-buffer-max-size", &4_000_000u64)?; + // pipeline.set_property("ring-buffer-max-size", 4_000_000u64)?; // Start playing let mut is_live = false; @@ -110,7 +110,7 @@ fn tutorial_main() -> Result<(), Error> { .unwrap() ); // Uncomment this line to keep the temporary file after the program exists. - // download_buffer.set_property("temp-remove", &false).ok(); + // download_buffer.set_property("temp-remove", false).ok(); None })?;