Commit 60321edb authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

Update for new_with_XXX/new_from_XXX function renaming

parent 61f76548
Pipeline #162678 passed with stages
in 16 minutes and 27 seconds
......@@ -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);
......
......@@ -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();
......
......@@ -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();
......
......@@ -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 {
......
......@@ -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")),
......
......@@ -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();
......
......@@ -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")),
......
......@@ -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")),
......
......@@ -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]
......
......@@ -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 {
......
......@@ -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));
......
......@@ -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 {
......
......@@ -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")),
......
......@@ -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();
......
......@@ -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);
......
......@@ -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();
......
......@@ -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.
......
......@@ -117,7 +117,7 @@ fn create_ui(app: &gtk::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);
......
......@@ -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(),
......
......@@ -219,9 +219,9 @@ fn create_ui(app: &gtk::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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment