mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 13:01:07 +00:00
Update for pad default functions API changes
This commit is contained in:
parent
2bffdec691
commit
e49138516c
29 changed files with 102 additions and 101 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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::<gst::Element>() };
|
||||
|
||||
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::<gst::Element>() };
|
||||
|
||||
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::<gst::Element>() };
|
||||
|
||||
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::<gst::Element>() };
|
||||
|
||||
pad.gst_pad().query_default(Some(element), query)
|
||||
gst::Pad::query_default(pad.gst_pad(), Some(element), query)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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<gst::Pad> {
|
||||
|
|
|
@ -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<gst::Pad> {
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
|
|
|
@ -1360,7 +1360,7 @@ impl UriPlaylistBin {
|
|||
}
|
||||
false
|
||||
}
|
||||
_ => pad.event_default(parent, event),
|
||||
_ => gst::Pad::event_default(pad, parent, event),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -367,7 +367,7 @@ impl Cea608ToTt {
|
|||
_ => (),
|
||||
}
|
||||
|
||||
pad.event_default(Some(&*self.instance()), event)
|
||||
gst::Pad::event_default(pad, Some(&*self.instance()), event)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue