From e85799b9d6ba89e3f3e76a5d092bc7145121af03 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 11 Jun 2020 12:45:15 +0200 Subject: [PATCH] use new constructor names --- audio/audiofx/src/audioloudnorm.rs | 4 ++-- audio/csound/tests/csound_filter.rs | 2 +- generic/sodium/src/decrypter.rs | 4 ++-- generic/sodium/src/encrypter.rs | 4 ++-- generic/sodium/tests/encrypter.rs | 2 +- generic/threadshare/src/appsrc.rs | 2 +- generic/threadshare/src/inputselector.rs | 4 ++-- generic/threadshare/src/jitterbuffer/jitterbuffer.rs | 4 ++-- generic/threadshare/src/proxy.rs | 4 ++-- generic/threadshare/src/queue.rs | 4 ++-- generic/threadshare/src/tcpclientsrc.rs | 2 +- generic/threadshare/src/udpsink.rs | 2 +- generic/threadshare/src/udpsrc.rs | 2 +- generic/threadshare/tests/inputselector.rs | 4 ++-- generic/threadshare/tests/pad.rs | 4 ++-- net/rusoto/src/aws_transcribe_parse.rs | 4 ++-- text/wrap/src/gsttextwrap.rs | 4 ++-- tutorial/src/identity.rs | 4 ++-- utils/fallbackswitch/src/fallbacksrc.rs | 4 ++-- utils/fallbackswitch/src/fallbackswitch.rs | 6 +++--- utils/togglerecord/src/togglerecord.rs | 8 ++++---- video/closedcaption/src/cea608overlay.rs | 4 ++-- video/closedcaption/src/cea608tott.rs | 4 ++-- video/closedcaption/src/mcc_enc.rs | 4 ++-- video/closedcaption/src/mcc_parse.rs | 4 ++-- video/closedcaption/src/scc_enc.rs | 4 ++-- video/closedcaption/src/scc_parse.rs | 4 ++-- video/closedcaption/src/tttocea608.rs | 4 ++-- video/flavors/src/flvdemux.rs | 4 ++-- 29 files changed, 55 insertions(+), 55 deletions(-) diff --git a/audio/audiofx/src/audioloudnorm.rs b/audio/audiofx/src/audioloudnorm.rs index cdeb8079..f3b67069 100644 --- a/audio/audiofx/src/audioloudnorm.rs +++ b/audio/audiofx/src/audioloudnorm.rs @@ -1746,10 +1746,10 @@ impl ObjectSubclass for AudioLoudNorm { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); sinkpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); srcpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); sinkpad.set_chain_function(|pad, parent, buffer| { diff --git a/audio/csound/tests/csound_filter.rs b/audio/csound/tests/csound_filter.rs index 0f808332..3870a747 100644 --- a/audio/csound/tests/csound_filter.rs +++ b/audio/csound/tests/csound_filter.rs @@ -68,7 +68,7 @@ fn build_harness(src_caps: gst::Caps, sink_caps: gst::Caps, csd: &str) -> gst_ch let filter = gst::ElementFactory::make("csoundfilter", None).unwrap(); filter.set_property("csd-text", &csd).unwrap(); - let mut h = gst_check::Harness::new_with_element(&filter, Some("sink"), Some("src")); + let mut h = gst_check::Harness::with_element(&filter, Some("sink"), Some("src")); h.set_caps(src_caps, sink_caps); h diff --git a/generic/sodium/src/decrypter.rs b/generic/sodium/src/decrypter.rs index 39891ee1..b6eae734 100644 --- a/generic/sodium/src/decrypter.rs +++ b/generic/sodium/src/decrypter.rs @@ -596,9 +596,9 @@ impl ObjectSubclass for Decrypter { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); Decrypter::set_pad_functions(&sinkpad, &srcpad); let props = Mutex::new(Props::default()); diff --git a/generic/sodium/src/encrypter.rs b/generic/sodium/src/encrypter.rs index 60a6e01e..431316e8 100644 --- a/generic/sodium/src/encrypter.rs +++ b/generic/sodium/src/encrypter.rs @@ -425,9 +425,9 @@ impl ObjectSubclass for Encrypter { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); Encrypter::set_pad_functions(&sinkpad, &srcpad); let props = Mutex::new(Props::default()); diff --git a/generic/sodium/tests/encrypter.rs b/generic/sodium/tests/encrypter.rs index e2f6dc83..b7b92fe2 100644 --- a/generic/sodium/tests/encrypter.rs +++ b/generic/sodium/tests/encrypter.rs @@ -83,7 +83,7 @@ fn encrypt_file() { enc.set_property("block-size", &1024u32) .expect("failed to set property"); - let mut h = gst_check::Harness::new_with_element(&enc, None, None); + let mut h = gst_check::Harness::with_element(&enc, None, None); h.add_element_src_pad(&enc.get_static_pad("src").expect("failed to get src pad")); h.add_element_sink_pad(&enc.get_static_pad("sink").expect("failed to get src pad")); h.set_src_caps_str("application/x-sodium-encrypted"); diff --git a/generic/threadshare/src/appsrc.rs b/generic/threadshare/src/appsrc.rs index 8bc92302..3590b853 100644 --- a/generic/threadshare/src/appsrc.rs +++ b/generic/threadshare/src/appsrc.rs @@ -630,7 +630,7 @@ impl ObjectSubclass for AppSrc { Self { src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), src_pad_handler.clone(), ), src_pad_handler, diff --git a/generic/threadshare/src/inputselector.rs b/generic/threadshare/src/inputselector.rs index 45e84a65..83dec550 100644 --- a/generic/threadshare/src/inputselector.rs +++ b/generic/threadshare/src/inputselector.rs @@ -470,7 +470,7 @@ impl ObjectSubclass for InputSelector { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { Self { src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), InputSelectorPadSrcHandler, ), state: Mutex::new(State::default()), @@ -598,7 +598,7 @@ impl ElementImpl for InputSelector { let mut state = self.state.lock().unwrap(); let mut pads = self.pads.lock().unwrap(); let sink_pad = - gst::Pad::new_from_template(&templ, Some(format!("sink_{}", pads.pad_serial).as_str())); + gst::Pad::from_template(&templ, Some(format!("sink_{}", pads.pad_serial).as_str())); pads.pad_serial += 1; sink_pad.set_active(true).unwrap(); element.add_pad(&sink_pad).unwrap(); diff --git a/generic/threadshare/src/jitterbuffer/jitterbuffer.rs b/generic/threadshare/src/jitterbuffer/jitterbuffer.rs index 8d490f87..0e4c2e85 100644 --- a/generic/threadshare/src/jitterbuffer/jitterbuffer.rs +++ b/generic/threadshare/src/jitterbuffer/jitterbuffer.rs @@ -1478,11 +1478,11 @@ impl ObjectSubclass for JitterBuffer { Self { sink_pad: PadSink::new( - gst::Pad::new_from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), + gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), sink_pad_handler.clone(), ), src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), src_pad_handler.clone(), ), sink_pad_handler, diff --git a/generic/threadshare/src/proxy.rs b/generic/threadshare/src/proxy.rs index 6972b008..45dfec11 100644 --- a/generic/threadshare/src/proxy.rs +++ b/generic/threadshare/src/proxy.rs @@ -683,7 +683,7 @@ impl ObjectSubclass for ProxySink { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { Self { sink_pad: PadSink::new( - gst::Pad::new_from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), + gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), ProxySinkPadHandler, ), proxy_ctx: StdMutex::new(None), @@ -1204,7 +1204,7 @@ impl ObjectSubclass for ProxySrc { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { Self { src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), ProxySrcPadHandler, ), task: Task::default(), diff --git a/generic/threadshare/src/queue.rs b/generic/threadshare/src/queue.rs index 02164335..a51afd74 100644 --- a/generic/threadshare/src/queue.rs +++ b/generic/threadshare/src/queue.rs @@ -792,11 +792,11 @@ impl ObjectSubclass for Queue { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { Self { sink_pad: PadSink::new( - gst::Pad::new_from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), + gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), QueuePadSinkHandler, ), src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), QueuePadSrcHandler, ), task: Task::default(), diff --git a/generic/threadshare/src/tcpclientsrc.rs b/generic/threadshare/src/tcpclientsrc.rs index f2333eb5..9e0ab696 100644 --- a/generic/threadshare/src/tcpclientsrc.rs +++ b/generic/threadshare/src/tcpclientsrc.rs @@ -646,7 +646,7 @@ impl ObjectSubclass for TcpClientSrc { Self { src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), src_pad_handler.clone(), ), src_pad_handler, diff --git a/generic/threadshare/src/udpsink.rs b/generic/threadshare/src/udpsink.rs index 04a39146..1f2b7151 100644 --- a/generic/threadshare/src/udpsink.rs +++ b/generic/threadshare/src/udpsink.rs @@ -1294,7 +1294,7 @@ impl ObjectSubclass for UdpSink { Self { sink_pad: PadSink::new( - gst::Pad::new_from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), + gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), sink_pad_handler.clone(), ), sink_pad_handler, diff --git a/generic/threadshare/src/udpsrc.rs b/generic/threadshare/src/udpsrc.rs index fa49a40c..62f832a6 100644 --- a/generic/threadshare/src/udpsrc.rs +++ b/generic/threadshare/src/udpsrc.rs @@ -823,7 +823,7 @@ impl ObjectSubclass for UdpSrc { Self { src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), src_pad_handler.clone(), ), src_pad_handler, diff --git a/generic/threadshare/tests/inputselector.rs b/generic/threadshare/tests/inputselector.rs index 9401abda..cc7489f3 100644 --- a/generic/threadshare/tests/inputselector.rs +++ b/generic/threadshare/tests/inputselector.rs @@ -34,8 +34,8 @@ fn test_active_pad() { let is = gst::ElementFactory::make("ts-input-selector", None).unwrap(); - let mut h1 = gst_check::Harness::new_with_element(&is, Some("sink_%u"), Some("src")); - let mut h2 = gst_check::Harness::new_with_element(&is, Some("sink_%u"), None); + let mut h1 = gst_check::Harness::with_element(&is, Some("sink_%u"), Some("src")); + let mut h2 = gst_check::Harness::with_element(&is, Some("sink_%u"), None); let active_pad = is .get_property("active-pad") diff --git a/generic/threadshare/tests/pad.rs b/generic/threadshare/tests/pad.rs index 0cea0126..182db318 100644 --- a/generic/threadshare/tests/pad.rs +++ b/generic/threadshare/tests/pad.rs @@ -325,7 +325,7 @@ impl ObjectSubclass for ElementSrcTest { fn new_with_class(klass: &glib::subclass::simple::ClassStruct) -> Self { ElementSrcTest { src_pad: PadSrc::new( - gst::Pad::new_from_template(&klass.get_pad_template("src").unwrap(), Some("src")), + gst::Pad::from_template(&klass.get_pad_template("src").unwrap(), Some("src")), PadSrcTestHandler, ), task: Task::default(), @@ -639,7 +639,7 @@ impl ObjectSubclass for ElementSinkTest { fn new_with_class(klass: &glib::subclass::simple::ClassStruct) -> Self { ElementSinkTest { sink_pad: PadSink::new( - gst::Pad::new_from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), + gst::Pad::from_template(&klass.get_pad_template("sink").unwrap(), Some("sink")), PadSinkTestHandler, ), flushing: AtomicBool::new(true), diff --git a/net/rusoto/src/aws_transcribe_parse.rs b/net/rusoto/src/aws_transcribe_parse.rs index c8eecfea..406e8fd2 100644 --- a/net/rusoto/src/aws_transcribe_parse.rs +++ b/net/rusoto/src/aws_transcribe_parse.rs @@ -1031,9 +1031,9 @@ impl ObjectSubclass for Transcriber { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); srcpad.use_fixed_caps(); diff --git a/text/wrap/src/gsttextwrap.rs b/text/wrap/src/gsttextwrap.rs index 92de0de9..ed5b803a 100644 --- a/text/wrap/src/gsttextwrap.rs +++ b/text/wrap/src/gsttextwrap.rs @@ -279,10 +279,10 @@ impl ObjectSubclass for TextWrap { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); sinkpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); srcpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); srcpad.use_fixed_caps(); diff --git a/tutorial/src/identity.rs b/tutorial/src/identity.rs index 1395d457..2616f1fe 100644 --- a/tutorial/src/identity.rs +++ b/tutorial/src/identity.rs @@ -175,9 +175,9 @@ impl ObjectSubclass for Identity { // Create our two pads from the templates that were registered with // the class let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); // And then set all our pad functions for handling anything that happens // on these pads diff --git a/utils/fallbackswitch/src/fallbacksrc.rs b/utils/fallbackswitch/src/fallbacksrc.rs index 8927be8b..9883bb32 100644 --- a/utils/fallbackswitch/src/fallbacksrc.rs +++ b/utils/fallbackswitch/src/fallbacksrc.rs @@ -773,7 +773,7 @@ impl FallbackSrc { .get_pad_template(if is_audio { "audio" } else { "video" }) .unwrap(); let ghostpad = - gst::GhostPad::new_from_template(Some(&templ.get_name()), &srcpad, &templ).unwrap(); + gst::GhostPad::from_template(Some(&templ.get_name()), &srcpad, &templ).unwrap(); element.add_pad(&ghostpad).unwrap(); @@ -2215,7 +2215,7 @@ mod custom_source { (element.get_pad_template("video_%u").unwrap(), name) }; - let ghost_pad = gst::GhostPad::new_from_template(Some(&name), pad, &templ).unwrap(); + let ghost_pad = gst::GhostPad::from_template(Some(&name), pad, &templ).unwrap(); let stream = Stream { source_pad: pad.clone(), diff --git a/utils/fallbackswitch/src/fallbackswitch.rs b/utils/fallbackswitch/src/fallbackswitch.rs index 5f41ec16..36c4c1e5 100644 --- a/utils/fallbackswitch/src/fallbackswitch.rs +++ b/utils/fallbackswitch/src/fallbackswitch.rs @@ -392,7 +392,7 @@ impl ObjectSubclass for FallbackSwitch { ); let caps = gst::Caps::new_any(); - let src_pad_template = gst::PadTemplate::new_with_gtype( + let src_pad_template = gst::PadTemplate::with_gtype( "src", gst::PadDirection::Src, gst::PadPresence::Always, @@ -402,7 +402,7 @@ impl ObjectSubclass for FallbackSwitch { .unwrap(); klass.add_pad_template(src_pad_template); - let sink_pad_template = gst::PadTemplate::new_with_gtype( + let sink_pad_template = gst::PadTemplate::with_gtype( "sink", gst::PadDirection::Sink, gst::PadPresence::Always, @@ -412,7 +412,7 @@ impl ObjectSubclass for FallbackSwitch { .unwrap(); klass.add_pad_template(sink_pad_template); - let fallbacksink_pad_template = gst::PadTemplate::new_with_gtype( + let fallbacksink_pad_template = gst::PadTemplate::with_gtype( "fallback_sink", gst::PadDirection::Sink, gst::PadPresence::Request, diff --git a/utils/togglerecord/src/togglerecord.rs b/utils/togglerecord/src/togglerecord.rs index 152c181b..3efd904c 100644 --- a/utils/togglerecord/src/togglerecord.rs +++ b/utils/togglerecord/src/togglerecord.rs @@ -1537,9 +1537,9 @@ impl ObjectSubclass for ToggleRecord { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); ToggleRecord::set_pad_functions(&sinkpad, &srcpad); @@ -1734,10 +1734,10 @@ impl ElementImpl for ToggleRecord { *pad_count += 1; let templ = element.get_pad_template("sink_%u").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some(format!("sink_{}", id).as_str())); + let sinkpad = gst::Pad::from_template(&templ, Some(format!("sink_{}", id).as_str())); let templ = element.get_pad_template("src_%u").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some(format!("src_{}", id).as_str())); + let srcpad = gst::Pad::from_template(&templ, Some(format!("src_{}", id).as_str())); ToggleRecord::set_pad_functions(&sinkpad, &srcpad); diff --git a/video/closedcaption/src/cea608overlay.rs b/video/closedcaption/src/cea608overlay.rs index dbb08bab..92908b8d 100644 --- a/video/closedcaption/src/cea608overlay.rs +++ b/video/closedcaption/src/cea608overlay.rs @@ -413,10 +413,10 @@ impl ObjectSubclass for Cea608Overlay { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); sinkpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); srcpad.set_pad_flags(gst::PadFlags::PROXY_CAPS); Cea608Overlay::set_pad_functions(&sinkpad, &srcpad); diff --git a/video/closedcaption/src/cea608tott.rs b/video/closedcaption/src/cea608tott.rs index 94ce105a..b9de70ef 100644 --- a/video/closedcaption/src/cea608tott.rs +++ b/video/closedcaption/src/cea608tott.rs @@ -379,9 +379,9 @@ impl ObjectSubclass for Cea608ToTt { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); sinkpad.set_chain_function(|pad, parent, buffer| { Cea608ToTt::catch_panic_pad_function( diff --git a/video/closedcaption/src/mcc_enc.rs b/video/closedcaption/src/mcc_enc.rs index d7586092..1231b2ad 100644 --- a/video/closedcaption/src/mcc_enc.rs +++ b/video/closedcaption/src/mcc_enc.rs @@ -502,9 +502,9 @@ impl ObjectSubclass for MccEnc { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); MccEnc::set_pad_functions(&sinkpad, &srcpad); diff --git a/video/closedcaption/src/mcc_parse.rs b/video/closedcaption/src/mcc_parse.rs index c7f765df..24f3bc5b 100644 --- a/video/closedcaption/src/mcc_parse.rs +++ b/video/closedcaption/src/mcc_parse.rs @@ -1174,9 +1174,9 @@ impl ObjectSubclass for MccParse { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); MccParse::set_pad_functions(&sinkpad, &srcpad); diff --git a/video/closedcaption/src/scc_enc.rs b/video/closedcaption/src/scc_enc.rs index 654be477..24b10a14 100644 --- a/video/closedcaption/src/scc_enc.rs +++ b/video/closedcaption/src/scc_enc.rs @@ -370,9 +370,9 @@ impl ObjectSubclass for SccEnc { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); SccEnc::set_pad_functions(&sinkpad, &srcpad); diff --git a/video/closedcaption/src/scc_parse.rs b/video/closedcaption/src/scc_parse.rs index c2bc2a2e..872754eb 100644 --- a/video/closedcaption/src/scc_parse.rs +++ b/video/closedcaption/src/scc_parse.rs @@ -453,9 +453,9 @@ impl ObjectSubclass for SccParse { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); SccParse::set_pad_functions(&sinkpad, &srcpad); diff --git a/video/closedcaption/src/tttocea608.rs b/video/closedcaption/src/tttocea608.rs index 875ff364..306afa99 100644 --- a/video/closedcaption/src/tttocea608.rs +++ b/video/closedcaption/src/tttocea608.rs @@ -793,9 +793,9 @@ impl ObjectSubclass for TtToCea608 { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); let templ = klass.get_pad_template("src").unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some("src")); + let srcpad = gst::Pad::from_template(&templ, Some("src")); sinkpad.set_chain_function(|pad, parent, buffer| { TtToCea608::catch_panic_pad_function( diff --git a/video/flavors/src/flvdemux.rs b/video/flavors/src/flvdemux.rs index bab8bcd7..583c3ba9 100644 --- a/video/flavors/src/flvdemux.rs +++ b/video/flavors/src/flvdemux.rs @@ -132,7 +132,7 @@ impl ObjectSubclass for FlvDemux { fn new_with_class(klass: &subclass::simple::ClassStruct) -> Self { let templ = klass.get_pad_template("sink").unwrap(); - let sinkpad = gst::Pad::new_from_template(&templ, Some("sink")); + let sinkpad = gst::Pad::from_template(&templ, Some("sink")); sinkpad.set_activate_function(|pad, parent| { FlvDemux::catch_panic_pad_function( @@ -639,7 +639,7 @@ impl FlvDemux { fn create_srcpad(&self, element: &gst::Element, name: &str, caps: &gst::Caps) -> gst::Pad { let templ = element.get_element_class().get_pad_template(name).unwrap(); - let srcpad = gst::Pad::new_from_template(&templ, Some(name)); + let srcpad = gst::Pad::from_template(&templ, Some(name)); srcpad.set_event_function(|pad, parent, event| { FlvDemux::catch_panic_pad_function(