From e49138516cc5eb1d125e3139ae1cf24eb3b00016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 12 Oct 2022 17:48:47 +0300 Subject: [PATCH] Update for pad default functions API changes --- audio/audiofx/src/audioloudnorm/imp.rs | 4 ++-- generic/sodium/src/decrypter/imp.rs | 4 ++-- generic/sodium/src/encrypter/imp.rs | 10 +++++----- generic/threadshare/src/runtime/pad.rs | 10 +++++----- net/aws/src/aws_transcribe_parse/imp.rs | 6 +++--- net/aws/src/aws_transcriber/imp.rs | 8 ++++---- net/onvif/src/onvifmetadataoverlay/imp.rs | 4 ++-- net/onvif/src/onvifmetadataparse/imp.rs | 18 +++++++++--------- net/raptorq/src/raptorqdec/imp.rs | 4 ++-- net/raptorq/src/raptorqenc/imp.rs | 2 +- text/ahead/src/textahead/imp.rs | 6 +++--- text/json/src/jsongstenc/imp.rs | 4 ++-- text/json/src/jsongstparse/imp.rs | 10 +++++----- text/wrap/src/gsttextwrap/imp.rs | 10 +++++----- utils/fallbackswitch/src/fallbackswitch/imp.rs | 4 ++-- utils/uriplaylistbin/src/uriplaylistbin/imp.rs | 2 +- video/closedcaption/src/cea608overlay/imp.rs | 4 ++-- video/closedcaption/src/cea608tojson/imp.rs | 6 +++--- video/closedcaption/src/cea608tott/imp.rs | 2 +- video/closedcaption/src/jsontovtt/imp.rs | 10 +++++----- video/closedcaption/src/mcc_enc/imp.rs | 6 +++--- video/closedcaption/src/mcc_parse/imp.rs | 10 +++++----- video/closedcaption/src/scc_enc/imp.rs | 8 ++++---- video/closedcaption/src/scc_parse/imp.rs | 10 +++++----- video/closedcaption/src/transcriberbin/imp.rs | 9 +++++---- video/closedcaption/src/tttocea608/imp.rs | 6 +++--- video/closedcaption/src/tttojson/imp.rs | 4 ++-- video/flavors/src/flvdemux/imp.rs | 14 +++++++------- video/webp/src/dec/imp.rs | 8 ++++---- 29 files changed, 102 insertions(+), 101 deletions(-) diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs index 3ede79ba..6bbc1c1e 100644 --- a/audio/audiofx/src/audioloudnorm/imp.rs +++ b/audio/audiofx/src/audioloudnorm/imp.rs @@ -1659,7 +1659,7 @@ impl AudioLoudNorm { _ => (), } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } #[allow(clippy::single_match)] @@ -1682,7 +1682,7 @@ impl AudioLoudNorm { false } } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/generic/sodium/src/decrypter/imp.rs b/generic/sodium/src/decrypter/imp.rs index d53234ce..f51efd1e 100644 --- a/generic/sodium/src/decrypter/imp.rs +++ b/generic/sodium/src/decrypter/imp.rs @@ -300,7 +300,7 @@ impl Decrypter { } QueryViewMut::Duration(q) => { if q.format() != gst::Format::Bytes { - return pad.query_default(Some(&*self.instance()), query); + return gst::Pad::query_default(pad, Some(&*self.instance()), query); } /* First let's query the bytes duration upstream */ @@ -341,7 +341,7 @@ impl Decrypter { true } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } diff --git a/generic/sodium/src/encrypter/imp.rs b/generic/sodium/src/encrypter/imp.rs index 9ba3a1f3..ba511f71 100644 --- a/generic/sodium/src/encrypter/imp.rs +++ b/generic/sodium/src/encrypter/imp.rs @@ -243,9 +243,9 @@ impl Encrypter { } } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -256,7 +256,7 @@ impl Encrypter { match event.view() { EventView::Seek(_) => false, - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -278,7 +278,7 @@ impl Encrypter { } QueryViewMut::Duration(q) => { if q.format() != gst::Format::Bytes { - return pad.query_default(Some(&*self.instance()), query); + return gst::Pad::query_default(pad, Some(&*self.instance()), query); } /* First let's query the bytes duration upstream */ @@ -318,7 +318,7 @@ impl Encrypter { true } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/generic/threadshare/src/runtime/pad.rs b/generic/threadshare/src/runtime/pad.rs index 28afb780..449a4a05 100644 --- a/generic/threadshare/src/runtime/pad.rs +++ b/generic/threadshare/src/runtime/pad.rs @@ -170,7 +170,7 @@ pub trait PadSrcHandler: Clone + Send + Sync + 'static { // Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`. let element = unsafe { elem.unsafe_cast_ref::() }; - pad.gst_pad().event_default(Some(element), event) + gst::Pad::event_default(pad.gst_pad(), Some(element), event) } fn src_event_full( @@ -206,7 +206,7 @@ pub trait PadSrcHandler: Clone + Send + Sync + 'static { // Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`. let element = unsafe { elem.unsafe_cast_ref::() }; - pad.gst_pad().query_default(Some(element), query) + gst::Pad::query_default(pad.gst_pad(), Some(element), query) } } } @@ -578,7 +578,7 @@ pub trait PadSinkHandler: Clone + Send + Sync + 'static { // Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`. let element = unsafe { elem.unsafe_cast_ref::() }; - pad.gst_pad().event_default(Some(element), event) + gst::Pad::event_default(pad.gst_pad(), Some(element), event) } fn sink_event_serialized( @@ -598,7 +598,7 @@ pub trait PadSinkHandler: Clone + Send + Sync + 'static { let pad = pad.upgrade().expect("PadSink no longer exists"); gst::log!(RUNTIME_CAT, obj: pad.gst_pad(), "Handling {:?}", event); - pad.gst_pad().event_default(Some(&element), event) + gst::Pad::event_default(pad.gst_pad(), Some(&element), event) } .boxed() } @@ -653,7 +653,7 @@ pub trait PadSinkHandler: Clone + Send + Sync + 'static { // Safety: `Self::ElementImpl` is bound to `gst::subclass::ElementImpl`. let element = unsafe { elem.unsafe_cast_ref::() }; - pad.gst_pad().query_default(Some(element), query) + gst::Pad::query_default(pad.gst_pad(), Some(element), query) } } } diff --git a/net/aws/src/aws_transcribe_parse/imp.rs b/net/aws/src/aws_transcribe_parse/imp.rs index 3259cadb..12dc1352 100644 --- a/net/aws/src/aws_transcribe_parse/imp.rs +++ b/net/aws/src/aws_transcribe_parse/imp.rs @@ -225,10 +225,10 @@ impl TranscribeParse { EventView::FlushStop(..) => { let mut state = self.state.lock().unwrap(); *state = State::default(); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Eos(..) => match self.drain() { - Ok(()) => pad.event_default(Some(&*self.instance()), event), + Ok(()) => gst::Pad::event_default(pad, Some(&*self.instance()), event), Err(err) => { gst::error!(CAT, imp: self, "failed to drain on EOS: {}", err); element_imp_error!( @@ -241,7 +241,7 @@ impl TranscribeParse { } }, EventView::Segment(..) | EventView::Caps(..) => true, - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/net/aws/src/aws_transcriber/imp.rs b/net/aws/src/aws_transcriber/imp.rs index 49593680..c38d9097 100644 --- a/net/aws/src/aws_transcriber/imp.rs +++ b/net/aws/src/aws_transcriber/imp.rs @@ -648,7 +648,7 @@ impl Transcriber { false } } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } @@ -667,7 +667,7 @@ impl Transcriber { }, EventView::FlushStart(_) => { gst::info!(CAT, imp: self, "Received flush start, disconnecting"); - let mut ret = pad.event_default(Some(&*self.instance()), event); + let mut ret = gst::Pad::event_default(pad, Some(&*self.instance()), event); match self.srcpad.stop_task() { Err(err) => { @@ -687,7 +687,7 @@ impl Transcriber { EventView::FlushStop(_) => { gst::info!(CAT, imp: self, "Received flush stop, restarting task"); - if pad.event_default(Some(&*self.instance()), event) { + if gst::Pad::event_default(pad, Some(&*self.instance()), event) { match self.start_task() { Err(err) => { gst::error!(CAT, imp: self, "Failed to start srcpad task: {}", err); @@ -725,7 +725,7 @@ impl Transcriber { true } EventView::StreamStart(_) => true, - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } diff --git a/net/onvif/src/onvifmetadataoverlay/imp.rs b/net/onvif/src/onvifmetadataoverlay/imp.rs index cd9d599b..5217a68b 100644 --- a/net/onvif/src/onvifmetadataoverlay/imp.rs +++ b/net/onvif/src/onvifmetadataoverlay/imp.rs @@ -705,9 +705,9 @@ impl OnvifMetadataOverlay { EventView::FlushStop(..) => { let mut state = self.state.lock().unwrap(); state.composition = None; - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/net/onvif/src/onvifmetadataparse/imp.rs b/net/onvif/src/onvifmetadataparse/imp.rs index 79f7c9b2..ba3600ca 100644 --- a/net/onvif/src/onvifmetadataparse/imp.rs +++ b/net/onvif/src/onvifmetadataparse/imp.rs @@ -821,7 +821,7 @@ impl OnvifMetadataParse { drop(state); self.cond.notify_all(); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } gst::EventView::FlushStop(_) => { let _ = self.srcpad.stop_task(); @@ -835,7 +835,7 @@ impl OnvifMetadataParse { state.out_segment.set_position(gst::ClockTime::NONE); state.last_flow_ret = Ok(gst::FlowSuccess::Ok); drop(state); - let mut res = pad.event_default(Some(&*self.instance()), event); + let mut res = gst::Pad::event_default(pad, Some(&*self.instance()), event); if res { res = self.src_start_task().is_ok(); } @@ -991,7 +991,7 @@ impl OnvifMetadataParse { gst::StreamError::Failed, ["Got EOS event before creating UTC/running time mapping"] ); - return pad.event_default(Some(&*self.instance()), event); + return gst::Pad::event_default(pad, Some(&*self.instance()), event); } let current_running_time = in_segment @@ -1009,7 +1009,7 @@ impl OnvifMetadataParse { true } } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -1040,7 +1040,7 @@ impl OnvifMetadataParse { gst::fixme!(CAT, obj: pad, "Dropping allocation query"); false } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } @@ -1057,7 +1057,7 @@ impl OnvifMetadataParse { drop(state); self.cond.notify_all(); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } gst::EventView::FlushStop(_) => { let _ = self.srcpad.stop_task(); @@ -1071,13 +1071,13 @@ impl OnvifMetadataParse { state.out_segment.set_position(gst::ClockTime::NONE); state.last_flow_ret = Ok(gst::FlowSuccess::Ok); drop(state); - let mut res = pad.event_default(Some(&*self.instance()), event); + let mut res = gst::Pad::event_default(pad, Some(&*self.instance()), event); if res { res = self.src_start_task().is_ok(); } res } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -1132,7 +1132,7 @@ impl OnvifMetadataParse { ret } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } diff --git a/net/raptorq/src/raptorqdec/imp.rs b/net/raptorq/src/raptorqdec/imp.rs index 0d6212c5..f8cc4a6b 100644 --- a/net/raptorq/src/raptorqdec/imp.rs +++ b/net/raptorq/src/raptorqdec/imp.rs @@ -497,7 +497,7 @@ impl RaptorqDec { self.reset(); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } fn fec_sink_event(&self, pad: &gst::Pad, event: gst::Event) -> bool { @@ -516,7 +516,7 @@ impl RaptorqDec { } } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } fn iterate_internal_links(&self, pad: &gst::Pad) -> gst::Iterator { diff --git a/net/raptorq/src/raptorqenc/imp.rs b/net/raptorq/src/raptorqenc/imp.rs index 6333b540..339d6d3a 100644 --- a/net/raptorq/src/raptorqenc/imp.rs +++ b/net/raptorq/src/raptorqenc/imp.rs @@ -543,7 +543,7 @@ impl RaptorqEnc { _ => (), } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } fn iterate_internal_links(&self, pad: &gst::Pad) -> gst::Iterator { diff --git a/text/ahead/src/textahead/imp.rs b/text/ahead/src/textahead/imp.rs index 4cda3e56..7aa99f49 100644 --- a/text/ahead/src/textahead/imp.rs +++ b/text/ahead/src/textahead/imp.rs @@ -304,7 +304,7 @@ impl TextAhead { while !state.pending.is_empty() { let _ = self.push_pending(&mut state); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } gst::EventView::Caps(_caps) => { // set caps on src pad @@ -326,9 +326,9 @@ impl TextAhead { } } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } diff --git a/text/json/src/jsongstenc/imp.rs b/text/json/src/jsongstenc/imp.rs index ce504f05..19e4ad4f 100644 --- a/text/json/src/jsongstenc/imp.rs +++ b/text/json/src/jsongstenc/imp.rs @@ -169,8 +169,8 @@ impl JsonGstEnc { let caps = gst::Caps::builder("application/x-json").build(); self.srcpad.push_event(gst::event::Caps::new(&caps)) } - EventView::Eos(_) => pad.event_default(Some(&*self.instance()), event), - _ => pad.event_default(Some(&*self.instance()), event), + EventView::Eos(_) => gst::Pad::event_default(pad, Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/text/json/src/jsongstparse/imp.rs b/text/json/src/jsongstparse/imp.rs index d6fb1637..a34f7247 100644 --- a/text/json/src/jsongstparse/imp.rs +++ b/text/json/src/jsongstparse/imp.rs @@ -633,14 +633,14 @@ impl JsonGstParse { self.flush(&mut state); drop(state); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Eos(_) => { gst::log!(CAT, obj: pad, "Draining"); if let Err(err) = self.handle_buffer(None) { gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } _ => { if event.is_sticky() @@ -652,7 +652,7 @@ impl JsonGstParse { state.pending_events.push(event); true } else { - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } } } @@ -757,7 +757,7 @@ impl JsonGstParse { gst::log!(CAT, obj: pad, "Handling event {:?}", event); match event.view() { EventView::Seek(e) => self.perform_seek(e), - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -811,7 +811,7 @@ impl JsonGstParse { self.sinkpad.peer_query(query) } } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/text/wrap/src/gsttextwrap/imp.rs b/text/wrap/src/gsttextwrap/imp.rs index 7535520b..c1aab864 100644 --- a/text/wrap/src/gsttextwrap/imp.rs +++ b/text/wrap/src/gsttextwrap/imp.rs @@ -324,7 +324,7 @@ impl TextWrap { if state.start_ts.is_some() { true } else { - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } } EventView::FlushStart(_) => { @@ -333,7 +333,7 @@ impl TextWrap { *state = State::default(); state.options = options; drop(state); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Eos(_) => { let mut state = self.state.lock().unwrap(); @@ -357,9 +357,9 @@ impl TextWrap { } else { drop(state); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -388,7 +388,7 @@ impl TextWrap { } ret } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/utils/fallbackswitch/src/fallbackswitch/imp.rs b/utils/fallbackswitch/src/fallbackswitch/imp.rs index e0a75448..f649128e 100644 --- a/utils/fallbackswitch/src/fallbackswitch/imp.rs +++ b/utils/fallbackswitch/src/fallbackswitch/imp.rs @@ -953,7 +953,7 @@ impl FallbackSwitch { self.active_sinkpad.lock().as_ref() == Some(pad) } _ => { - pad.query_default(Some(&*self.instance()), query); + gst::Pad::query_default(pad, Some(&*self.instance()), query); false } }; @@ -1017,7 +1017,7 @@ impl FallbackSwitch { if let Some(sinkpad) = sinkpad { sinkpad.peer_query(query) } else { - pad.query_default(Some(&*self.instance()), query) + gst::Pad::query_default(pad, Some(&*self.instance()), query) } } _ => { diff --git a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs index 6c6ce73f..890b4266 100644 --- a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs +++ b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs @@ -1360,7 +1360,7 @@ impl UriPlaylistBin { } false } - _ => pad.event_default(parent, event), + _ => gst::Pad::event_default(pad, parent, event), }); } diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs index e52eb690..d7b89247 100644 --- a/video/closedcaption/src/cea608overlay/imp.rs +++ b/video/closedcaption/src/cea608overlay/imp.rs @@ -527,9 +527,9 @@ impl Cea608Overlay { let mut state = self.state.lock().unwrap(); state.caption_frame = CaptionFrame::default(); state.composition = None; - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/video/closedcaption/src/cea608tojson/imp.rs b/video/closedcaption/src/cea608tojson/imp.rs index 633982ae..d3bfb8e8 100644 --- a/video/closedcaption/src/cea608tojson/imp.rs +++ b/video/closedcaption/src/cea608tojson/imp.rs @@ -932,7 +932,7 @@ impl Cea608ToJson { *state = State::default(); state.settings = old_settings; drop(state); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Eos(..) => { if let Some(lines) = self.state.borrow_mut().drain_pending(self) { @@ -942,9 +942,9 @@ impl Cea608ToJson { let _ = self.output(lines); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/video/closedcaption/src/cea608tott/imp.rs b/video/closedcaption/src/cea608tott/imp.rs index f0dcdccf..c7231643 100644 --- a/video/closedcaption/src/cea608tott/imp.rs +++ b/video/closedcaption/src/cea608tott/imp.rs @@ -367,7 +367,7 @@ impl Cea608ToTt { _ => (), } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } } diff --git a/video/closedcaption/src/jsontovtt/imp.rs b/video/closedcaption/src/jsontovtt/imp.rs index 9818fcf1..842a055d 100644 --- a/video/closedcaption/src/jsontovtt/imp.rs +++ b/video/closedcaption/src/jsontovtt/imp.rs @@ -435,10 +435,10 @@ impl JsonToVtt { ), } } - pad.event_default(Some(&*self.instance()), event); + gst::Pad::event_default(pad, Some(&*self.instance()), event); true } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -453,7 +453,7 @@ impl JsonToVtt { let buffers = state.handle_eos(self); drop(state); let _ = self.output(buffers); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Caps(..) => { let mut downstream_caps = match self.srcpad.allowed_caps() { @@ -506,7 +506,7 @@ impl JsonToVtt { }; /* FIXME: Handle segment updates by draining? */ - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Gap(ev) => { gst::log!(CAT, obj: pad, "Handling gap {:?}", ev); @@ -516,7 +516,7 @@ impl JsonToVtt { let _ = self.output(buffers); true } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } diff --git a/video/closedcaption/src/mcc_enc/imp.rs b/video/closedcaption/src/mcc_enc/imp.rs index 36a66434..d6112de9 100644 --- a/video/closedcaption/src/mcc_enc/imp.rs +++ b/video/closedcaption/src/mcc_enc/imp.rs @@ -375,7 +375,7 @@ impl MccEnc { .build(); self.srcpad.push_event(gst::event::Caps::new(&caps)) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -388,7 +388,7 @@ impl MccEnc { gst::log!(CAT, obj: pad, "Dropping seek event"); false } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -408,7 +408,7 @@ impl MccEnc { ); true } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/video/closedcaption/src/mcc_parse/imp.rs b/video/closedcaption/src/mcc_parse/imp.rs index 0c2e40bb..16d0558f 100644 --- a/video/closedcaption/src/mcc_parse/imp.rs +++ b/video/closedcaption/src/mcc_parse/imp.rs @@ -883,14 +883,14 @@ impl MccParse { let state = self.flush(state); drop(state); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Eos(_) => { gst::log!(CAT, obj: pad, "Draining"); if let Err(err) = self.handle_buffer(None, false) { gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } _ => { if event.is_sticky() @@ -902,7 +902,7 @@ impl MccParse { state.pending_events.push(event); true } else { - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } } } @@ -1007,7 +1007,7 @@ impl MccParse { gst::log!(CAT, obj: pad, "Handling event {:?}", event); match event.view() { EventView::Seek(e) => self.perform_seek(e), - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -1061,7 +1061,7 @@ impl MccParse { self.sinkpad.peer_query(query) } } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/video/closedcaption/src/scc_enc/imp.rs b/video/closedcaption/src/scc_enc/imp.rs index 2b37a4f6..4fa33191 100644 --- a/video/closedcaption/src/scc_enc/imp.rs +++ b/video/closedcaption/src/scc_enc/imp.rs @@ -307,9 +307,9 @@ impl SccEnc { gst::error!(CAT, obj: pad, "Failed to write a line after EOS: {:?}", err); return false; } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -322,7 +322,7 @@ impl SccEnc { gst::log!(CAT, obj: pad, "Dropping seek event"); false } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -342,7 +342,7 @@ impl SccEnc { ); true } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/video/closedcaption/src/scc_parse/imp.rs b/video/closedcaption/src/scc_parse/imp.rs index f6c4f220..9aafb49c 100644 --- a/video/closedcaption/src/scc_parse/imp.rs +++ b/video/closedcaption/src/scc_parse/imp.rs @@ -762,14 +762,14 @@ impl SccParse { let state = self.flush(state); drop(state); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Eos(_) => { gst::log!(CAT, obj: pad, "Draining"); if let Err(err) = self.handle_buffer(None) { gst::error!(CAT, obj: pad, "Failed to drain parser: {:?}", err); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } _ => { if event.is_sticky() @@ -781,7 +781,7 @@ impl SccParse { state.pending_events.push(event); true } else { - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } } } @@ -886,7 +886,7 @@ impl SccParse { gst::log!(CAT, obj: pad, "Handling event {:?}", event); match event.view() { EventView::Seek(e) => self.perform_seek(e), - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -940,7 +940,7 @@ impl SccParse { self.sinkpad.peer_query(query) } } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } } diff --git a/video/closedcaption/src/transcriberbin/imp.rs b/video/closedcaption/src/transcriberbin/imp.rs index 5bb928e9..07710c96 100644 --- a/video/closedcaption/src/transcriberbin/imp.rs +++ b/video/closedcaption/src/transcriberbin/imp.rs @@ -411,7 +411,8 @@ impl TranscriberBin { QueryViewMut::Latency(q) => { let mut upstream_query = gst::query::Latency::new(); - let ret = pad.query_default(Some(&*self.instance()), &mut upstream_query); + let ret = + gst::Pad::query_default(pad, Some(&*self.instance()), &mut upstream_query); if ret { let (_, mut min, _) = upstream_query.result(); @@ -436,7 +437,7 @@ impl TranscriberBin { ret } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } @@ -510,9 +511,9 @@ impl TranscriberBin { } } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs index 22ca651b..c1b6d90f 100644 --- a/video/closedcaption/src/tttocea608/imp.rs +++ b/video/closedcaption/src/tttocea608/imp.rs @@ -929,7 +929,7 @@ impl TtToCea608 { drop(state); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::FlushStop(_) => { let mut state = self.state.lock().unwrap(); @@ -946,9 +946,9 @@ impl TtToCea608 { drop(settings); drop(state); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/video/closedcaption/src/tttojson/imp.rs b/video/closedcaption/src/tttojson/imp.rs index 030efe63..87b2636f 100644 --- a/video/closedcaption/src/tttojson/imp.rs +++ b/video/closedcaption/src/tttojson/imp.rs @@ -132,8 +132,8 @@ impl TtToJson { .build(); self.srcpad.push_event(gst::event::Caps::new(&caps)) } - EventView::Eos(_) => pad.event_default(Some(&*self.instance()), event), - _ => pad.event_default(Some(&*self.instance()), event), + EventView::Eos(_) => gst::Pad::event_default(pad, Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } } diff --git a/video/flavors/src/flvdemux/imp.rs b/video/flavors/src/flvdemux/imp.rs index 80c683d1..7905a969 100644 --- a/video/flavors/src/flvdemux/imp.rs +++ b/video/flavors/src/flvdemux/imp.rs @@ -370,21 +370,21 @@ impl FlvDemux { match event.view() { EventView::Eos(..) => { // TODO implement - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Segment(..) => { // TODO implement - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::FlushStart(..) => { // TODO implement - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::FlushStop(..) => { // TODO implement - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -432,7 +432,7 @@ impl FlvDemux { false } } - _ => pad.query_default(Some(&*self.instance()), query), + _ => gst::Pad::query_default(pad, Some(&*self.instance()), query), } } @@ -444,7 +444,7 @@ impl FlvDemux { // TODO: Implement false } - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } diff --git a/video/webp/src/dec/imp.rs b/video/webp/src/dec/imp.rs index 8c90375a..e9f327d8 100644 --- a/video/webp/src/dec/imp.rs +++ b/video/webp/src/dec/imp.rs @@ -241,16 +241,16 @@ impl WebPDec { EventView::FlushStop(..) => { let mut state = self.state.lock().unwrap(); *state = State::default(); - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Eos(..) => { if let Err(err) = self.decode() { self.post_error_message(err); } - pad.event_default(Some(&*self.instance()), event) + gst::Pad::event_default(pad, Some(&*self.instance()), event) } EventView::Segment(..) => true, - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } @@ -260,7 +260,7 @@ impl WebPDec { gst::log!(CAT, obj: pad, "Handling event {:?}", event); match event.view() { EventView::Seek(..) => false, - _ => pad.event_default(Some(&*self.instance()), event), + _ => gst::Pad::event_default(pad, Some(&*self.instance()), event), } } }