diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-06-16 11:56:48 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-06-16 11:56:48 +0300 |
commit | 60321edb8c2626106837b477860c5998265a356a (patch) | |
tree | 002e6d05942a9fe1b03dd5f20431534cd0908c2f | |
parent | 61f76548bcf8a7c9313ba29b3af6be01564fb127 (diff) |
Update for new_with_XXX/new_from_XXX function renaming
29 files changed, 39 insertions, 39 deletions
diff --git a/audio/audiofx/src/audioloudnorm.rs b/audio/audiofx/src/audioloudnorm.rs index f3b670691..1ea708225 100644 --- a/audio/audiofx/src/audioloudnorm.rs +++ b/audio/audiofx/src/audioloudnorm.rs @@ -1744,7 +1744,7 @@ impl ObjectSubclass for AudioLoudNorm { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); sinkpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); diff --git a/generic/sodium/src/decrypter.rs b/generic/sodium/src/decrypter.rs index b6eae734d..a52a83bd0 100644 --- a/generic/sodium/src/decrypter.rs +++ b/generic/sodium/src/decrypter.rs @@ -594,7 +594,7 @@ impl ObjectSubclass for Decrypter { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/generic/sodium/src/encrypter.rs b/generic/sodium/src/encrypter.rs index 431316e88..129967bdf 100644 --- a/generic/sodium/src/encrypter.rs +++ b/generic/sodium/src/encrypter.rs @@ -423,7 +423,7 @@ impl ObjectSubclass for Encrypter { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/generic/threadshare/src/appsrc.rs b/generic/threadshare/src/appsrc.rs index 3590b8536..1c315b40e 100644 --- a/generic/threadshare/src/appsrc.rs +++ b/generic/threadshare/src/appsrc.rs @@ -625,7 +625,7 @@ impl ObjectSubclass for AppSrc { ); } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let src_pad_handler = AppSrcPadHandler::default(); Self { diff --git a/generic/threadshare/src/inputselector.rs b/generic/threadshare/src/inputselector.rs index 83dec5509..9633ca70a 100644 --- a/generic/threadshare/src/inputselector.rs +++ b/generic/threadshare/src/inputselector.rs @@ -467,7 +467,7 @@ impl ObjectSubclass for InputSelector { klass.install_properties(&PROPERTIES); } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { Self { src_pad: PadSrc::new( gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), diff --git a/generic/threadshare/src/jitterbuffer/jitterbuffer.rs b/generic/threadshare/src/jitterbuffer/jitterbuffer.rs index 0e4c2e857..ae5b017a4 100644 --- a/generic/threadshare/src/jitterbuffer/jitterbuffer.rs +++ b/generic/threadshare/src/jitterbuffer/jitterbuffer.rs @@ -1472,7 +1472,7 @@ impl ObjectSubclass for JitterBuffer { klass.install_properties(&PROPERTIES); } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let sink_pad_handler = SinkHandler::default(); let src_pad_handler = SrcHandler::default(); diff --git a/generic/threadshare/src/proxy.rs b/generic/threadshare/src/proxy.rs index 45dfec11e..aa9112e35 100644 --- a/generic/threadshare/src/proxy.rs +++ b/generic/threadshare/src/proxy.rs @@ -680,7 +680,7 @@ impl ObjectSubclass for ProxySink { klass.install_properties(&PROPERTIES_SINK); } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { Self { sink_pad: PadSink::new( gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), @@ -1201,7 +1201,7 @@ impl ObjectSubclass for ProxySrc { unreachable!() } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { Self { src_pad: PadSrc::new( gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), diff --git a/generic/threadshare/src/queue.rs b/generic/threadshare/src/queue.rs index a51afd74a..dfdb648d8 100644 --- a/generic/threadshare/src/queue.rs +++ b/generic/threadshare/src/queue.rs @@ -789,7 +789,7 @@ impl ObjectSubclass for Queue { klass.install_properties(&PROPERTIES); } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { Self { sink_pad: PadSink::new( gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), diff --git a/generic/threadshare/src/socket.rs b/generic/threadshare/src/socket.rs index 4af375536..bffd9081d 100644 --- a/generic/threadshare/src/socket.rs +++ b/generic/threadshare/src/socket.rs @@ -315,7 +315,7 @@ pub fn wrap_socket(socket: &tokio::net::UdpSocket) -> Result<GioSocketWrapper, g let fd = FdConverter(fd); - let gio_socket = gio::Socket::new_from_fd(fd).map_err(|err| { + let gio_socket = gio::Socket::from_fd(fd).map_err(|err| { gst_error_msg!( gst::ResourceError::OpenWrite, ["Failed to create wrapped GIO socket: {}", err] @@ -340,7 +340,7 @@ pub fn wrap_socket(socket: &tokio::net::UdpSocket) -> Result<GioSocketWrapper, g let fd = SocketConverter(fd); - let gio_socket = gio::Socket::new_from_socket(fd).map_err(|err| { + let gio_socket = gio::Socket::from_socket(fd).map_err(|err| { gst_error_msg!( gst::ResourceError::OpenWrite, ["Failed to create wrapped GIO socket: {}", err] diff --git a/generic/threadshare/src/tcpclientsrc.rs b/generic/threadshare/src/tcpclientsrc.rs index 9e0ab6964..2d3548222 100644 --- a/generic/threadshare/src/tcpclientsrc.rs +++ b/generic/threadshare/src/tcpclientsrc.rs @@ -641,7 +641,7 @@ impl ObjectSubclass for TcpClientSrc { klass.install_properties(&PROPERTIES); } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let src_pad_handler = TcpClientSrcPadHandler::default(); Self { diff --git a/generic/threadshare/src/udpsink.rs b/generic/threadshare/src/udpsink.rs index 1f2b7151e..95009e4bb 100644 --- a/generic/threadshare/src/udpsink.rs +++ b/generic/threadshare/src/udpsink.rs @@ -1288,7 +1288,7 @@ impl ObjectSubclass for UdpSink { klass.install_properties(&PROPERTIES); } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let settings = Arc::new(StdMutex::new(Settings::default())); let sink_pad_handler = UdpSinkPadHandler::new(Arc::clone(&settings)); diff --git a/generic/threadshare/src/udpsrc.rs b/generic/threadshare/src/udpsrc.rs index 62f832a6c..09659a560 100644 --- a/generic/threadshare/src/udpsrc.rs +++ b/generic/threadshare/src/udpsrc.rs @@ -456,12 +456,12 @@ impl TaskImpl for UdpSrcTask { .retrieve_sender_address { let inet_addr = match saddr.ip() { - IpAddr::V4(ip) => gio::InetAddress::new_from_bytes( - gio::InetAddressBytes::V4(&ip.octets()), - ), - IpAddr::V6(ip) => gio::InetAddress::new_from_bytes( - gio::InetAddressBytes::V6(&ip.octets()), - ), + IpAddr::V4(ip) => { + gio::InetAddress::from_bytes(gio::InetAddressBytes::V4(&ip.octets())) + } + IpAddr::V6(ip) => { + gio::InetAddress::from_bytes(gio::InetAddressBytes::V6(&ip.octets())) + } }; let inet_socket_addr = &gio::InetSocketAddress::new(&inet_addr, saddr.port()); NetAddressMeta::add(buffer.get_mut().unwrap(), inet_socket_addr); @@ -818,7 +818,7 @@ impl ObjectSubclass for UdpSrc { } } - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let src_pad_handler = UdpSrcPadHandler::default(); Self { diff --git a/generic/threadshare/tests/pad.rs b/generic/threadshare/tests/pad.rs index 182db3184..aef5e4fa7 100644 --- a/generic/threadshare/tests/pad.rs +++ b/generic/threadshare/tests/pad.rs @@ -322,7 +322,7 @@ impl ObjectSubclass for ElementSrcTest { klass.install_properties(&SRC_PROPERTIES); } - fn new_with_class(klass: &glib::subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &glib::subclass::simple::ClassStruct<Self>) -> Self { ElementSrcTest { src_pad: PadSrc::new( gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), @@ -636,7 +636,7 @@ impl ObjectSubclass for ElementSinkTest { klass.install_properties(&SINK_PROPERTIES); } - fn new_with_class(klass: &glib::subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &glib::subclass::simple::ClassStruct<Self>) -> Self { ElementSinkTest { sink_pad: PadSink::new( gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), diff --git a/net/rusoto/src/aws_transcribe_parse.rs b/net/rusoto/src/aws_transcribe_parse.rs index 406e8fd2f..259d8de94 100644 --- a/net/rusoto/src/aws_transcribe_parse.rs +++ b/net/rusoto/src/aws_transcribe_parse.rs @@ -1029,7 +1029,7 @@ impl ObjectSubclass for Transcriber { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/text/wrap/src/gsttextwrap.rs b/text/wrap/src/gsttextwrap.rs index ed5b803a8..6d9b157bc 100644 --- a/text/wrap/src/gsttextwrap.rs +++ b/text/wrap/src/gsttextwrap.rs @@ -277,7 +277,7 @@ impl ObjectSubclass for TextWrap { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); sinkpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); diff --git a/tutorial/src/identity.rs b/tutorial/src/identity.rs index 2616f1fe6..ddea99e8e 100644 --- a/tutorial/src/identity.rs +++ b/tutorial/src/identity.rs @@ -171,7 +171,7 @@ impl ObjectSubclass for Identity { // Called when a new instance is to be created. We need to return an instance // of our struct here and also get the class struct passed in case it's needed - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { // Create our two pads from the templates that were registered with // the class let templ = klass.get_pad_template("sink").unwrap(); diff --git a/tutorial/src/progressbin.rs b/tutorial/src/progressbin.rs index dbc591ceb..ef685ac7b 100644 --- a/tutorial/src/progressbin.rs +++ b/tutorial/src/progressbin.rs @@ -81,7 +81,7 @@ impl ObjectSubclass for ProgressBin { // Called when a new instance is to be created. We need to return an instance // of our struct here and also get the class struct passed in case it's needed - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { // Create our two ghostpads from the templates that were registered with // the class. We don't provide a target for them yet because we can only // do so after the progressreport element was added to the bin. diff --git a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs index 7418a4bbf..571a13d29 100644 --- a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs +++ b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs @@ -117,7 +117,7 @@ fn create_ui(app: >k::Application) { let position_label = gtk::Label::new(Some("Position: 00:00:00")); vbox.pack_start(&position_label, true, true, 5); - let drop_button = gtk::ToggleButton::new_with_label("Drop Signal"); + let drop_button = gtk::ToggleButton::with_label("Drop Signal"); vbox.pack_start(&drop_button, true, true, 5); window.add(&vbox); diff --git a/utils/fallbackswitch/src/fallbackswitch.rs b/utils/fallbackswitch/src/fallbackswitch.rs index 36c4c1e5f..adfb51df8 100644 --- a/utils/fallbackswitch/src/fallbackswitch.rs +++ b/utils/fallbackswitch/src/fallbackswitch.rs @@ -359,7 +359,7 @@ impl ObjectSubclass for FallbackSwitch { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad: gst_base::AggregatorPad = glib::Object::new( gst_base::AggregatorPad::static_type(), diff --git a/utils/togglerecord/examples/gtk_recording.rs b/utils/togglerecord/examples/gtk_recording.rs index 8f0bc0bb1..381d8026b 100644 --- a/utils/togglerecord/examples/gtk_recording.rs +++ b/utils/togglerecord/examples/gtk_recording.rs @@ -219,9 +219,9 @@ fn create_ui(app: >k::Application) { vbox.pack_start(&hbox, false, false, 5); let hbox = gtk::Box::new(gtk::Orientation::Horizontal, 0); - let record_button = gtk::Button::new_with_label("Record"); + let record_button = gtk::Button::with_label("Record"); hbox.pack_start(&record_button, true, true, 5); - let finish_button = gtk::Button::new_with_label("Finish"); + let finish_button = gtk::Button::with_label("Finish"); hbox.pack_start(&finish_button, true, true, 5); vbox.pack_start(&hbox, false, false, 5); diff --git a/utils/togglerecord/src/togglerecord.rs b/utils/togglerecord/src/togglerecord.rs index 3efd904c0..201fce387 100644 --- a/utils/togglerecord/src/togglerecord.rs +++ b/utils/togglerecord/src/togglerecord.rs @@ -1535,7 +1535,7 @@ impl ObjectSubclass for ToggleRecord { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/video/closedcaption/src/cea608overlay.rs b/video/closedcaption/src/cea608overlay.rs index 92908b8d2..f39cb51cc 100644 --- a/video/closedcaption/src/cea608overlay.rs +++ b/video/closedcaption/src/cea608overlay.rs @@ -411,7 +411,7 @@ impl ObjectSubclass for Cea608Overlay { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); sinkpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); diff --git a/video/closedcaption/src/cea608tott.rs b/video/closedcaption/src/cea608tott.rs index b9de70ef4..2fdf7a7ea 100644 --- a/video/closedcaption/src/cea608tott.rs +++ b/video/closedcaption/src/cea608tott.rs @@ -377,7 +377,7 @@ impl ObjectSubclass for Cea608ToTt { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/video/closedcaption/src/mcc_enc.rs b/video/closedcaption/src/mcc_enc.rs index 1231b2adf..b42413721 100644 --- a/video/closedcaption/src/mcc_enc.rs +++ b/video/closedcaption/src/mcc_enc.rs @@ -500,7 +500,7 @@ impl ObjectSubclass for MccEnc { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/video/closedcaption/src/mcc_parse.rs b/video/closedcaption/src/mcc_parse.rs index 24f3bc5be..ef7ea3d81 100644 --- a/video/closedcaption/src/mcc_parse.rs +++ b/video/closedcaption/src/mcc_parse.rs @@ -1172,7 +1172,7 @@ impl ObjectSubclass for MccParse { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/video/closedcaption/src/scc_enc.rs b/video/closedcaption/src/scc_enc.rs index 24b10a146..40bff20b8 100644 --- a/video/closedcaption/src/scc_enc.rs +++ b/video/closedcaption/src/scc_enc.rs @@ -368,7 +368,7 @@ impl ObjectSubclass for SccEnc { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/video/closedcaption/src/scc_parse.rs b/video/closedcaption/src/scc_parse.rs index 872754ebf..33f4a74a5 100644 --- a/video/closedcaption/src/scc_parse.rs +++ b/video/closedcaption/src/scc_parse.rs @@ -451,7 +451,7 @@ impl ObjectSubclass for SccParse { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/video/closedcaption/src/tttocea608.rs b/video/closedcaption/src/tttocea608.rs index 306afa99e..85bc841e4 100644 --- a/video/closedcaption/src/tttocea608.rs +++ b/video/closedcaption/src/tttocea608.rs @@ -791,7 +791,7 @@ impl ObjectSubclass for TtToCea608 { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); diff --git a/video/flavors/src/flvdemux.rs b/video/flavors/src/flvdemux.rs index 583c3ba95..bba03ad5b 100644 --- a/video/flavors/src/flvdemux.rs +++ b/video/flavors/src/flvdemux.rs @@ -130,7 +130,7 @@ impl ObjectSubclass for FlvDemux { glib_object_subclass!(); - fn new_with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { + fn with_class(klass: &subclass::simple::ClassStruct<Self>) -> Self { let templ = klass.get_pad_template("sink").unwrap(); let sinkpad = gst::Pad::from_template(&templ, Some("sink")); |