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 /generic | |
parent | 61f76548bcf8a7c9313ba29b3af6be01564fb127 (diff) |
Update for new_with_XXX/new_from_XXX function renaming
Diffstat (limited to 'generic')
-rw-r--r-- | generic/sodium/src/decrypter.rs | 2 | ||||
-rw-r--r-- | generic/sodium/src/encrypter.rs | 2 | ||||
-rw-r--r-- | generic/threadshare/src/appsrc.rs | 2 | ||||
-rw-r--r-- | generic/threadshare/src/inputselector.rs | 2 | ||||
-rw-r--r-- | generic/threadshare/src/jitterbuffer/jitterbuffer.rs | 2 | ||||
-rw-r--r-- | generic/threadshare/src/proxy.rs | 4 | ||||
-rw-r--r-- | generic/threadshare/src/queue.rs | 2 | ||||
-rw-r--r-- | generic/threadshare/src/socket.rs | 4 | ||||
-rw-r--r-- | generic/threadshare/src/tcpclientsrc.rs | 2 | ||||
-rw-r--r-- | generic/threadshare/src/udpsink.rs | 2 | ||||
-rw-r--r-- | generic/threadshare/src/udpsrc.rs | 14 | ||||
-rw-r--r-- | generic/threadshare/tests/pad.rs | 4 |
12 files changed, 21 insertions, 21 deletions
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")), |