diff --git a/examples/src/bin/rtsp-server-record.rs b/examples/src/bin/rtsp-server-record.rs index 1de9d410a..066046118 100644 --- a/examples/src/bin/rtsp-server-record.rs +++ b/examples/src/bin/rtsp-server-record.rs @@ -58,7 +58,7 @@ fn main_loop() -> Result<(), Error> { let basic = RTSPAuth::make_basic("user", "password"); // For propery authentication, we want to use encryption. And there's no // encryption without a certificate! - let cert = gio::TlsCertificate::new_from_pem( + let cert = gio::TlsCertificate::from_pem( "-----BEGIN CERTIFICATE-----\ MIICJjCCAY+gAwIBAgIBBzANBgkqhkiG9w0BAQUFADCBhjETMBEGCgmSJomT8ixk\ ARkWA0NPTTEXMBUGCgmSJomT8ixkARkWB0VYQU1QTEUxHjAcBgNVBAsTFUNlcnRp\ diff --git a/gstreamer-net/src/net_address_meta.rs b/gstreamer-net/src/net_address_meta.rs index 1da4fbdca..abff4f6ec 100644 --- a/gstreamer-net/src/net_address_meta.rs +++ b/gstreamer-net/src/net_address_meta.rs @@ -69,7 +69,7 @@ mod tests { let mut buffer = gst::Buffer::new(); let port = 5000; - let inet_addr = gio::InetAddress::new_from_string("127.0.0.1"); + let inet_addr = gio::InetAddress::from_string("127.0.0.1"); let expected_addr = &gio::InetSocketAddress::new(&inet_addr, port); diff --git a/gstreamer/src/subclass/element.rs b/gstreamer/src/subclass/element.rs index 5d824b240..2caf0c12e 100644 --- a/gstreamer/src/subclass/element.rs +++ b/gstreamer/src/subclass/element.rs @@ -607,7 +607,7 @@ mod tests { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = ::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/tutorials/src/bin/basic-tutorial-5.rs b/tutorials/src/bin/basic-tutorial-5.rs index 014588710..00585244a 100644 --- a/tutorials/src/bin/basic-tutorial-5.rs +++ b/tutorials/src/bin/basic-tutorial-5.rs @@ -112,10 +112,8 @@ mod tutorial5 { Inhibit(false) }); - let play_button = gtk::Button::new_from_icon_name( - Some("media-playback-start"), - gtk::IconSize::SmallToolbar, - ); + let play_button = + gtk::Button::from_icon_name(Some("media-playback-start"), gtk::IconSize::SmallToolbar); let pipeline = playbin.clone(); play_button.connect_clicked(move |_| { let pipeline = &pipeline; @@ -124,10 +122,8 @@ mod tutorial5 { .expect("Unable to set the pipeline to the `Playing` state"); }); - let pause_button = gtk::Button::new_from_icon_name( - Some("media-playback-pause"), - gtk::IconSize::SmallToolbar, - ); + let pause_button = + gtk::Button::from_icon_name(Some("media-playback-pause"), gtk::IconSize::SmallToolbar); let pipeline = playbin.clone(); pause_button.connect_clicked(move |_| { let pipeline = &pipeline; @@ -136,10 +132,8 @@ mod tutorial5 { .expect("Unable to set the pipeline to the `Paused` state"); }); - let stop_button = gtk::Button::new_from_icon_name( - Some("media-playback-stop"), - gtk::IconSize::SmallToolbar, - ); + let stop_button = + gtk::Button::from_icon_name(Some("media-playback-stop"), gtk::IconSize::SmallToolbar); let pipeline = playbin.clone(); stop_button.connect_clicked(move |_| { let pipeline = &pipeline; @@ -148,7 +142,7 @@ mod tutorial5 { .expect("Unable to set the pipeline to the `Ready` state"); }); - let slider = gtk::Scale::new_with_range( + let slider = gtk::Scale::with_range( gtk::Orientation::Horizontal, 0.0 as f64, 100.0 as f64,