Rename self_ variables to imp for consistency

This commit is contained in:
Sebastian Dröge 2022-01-17 20:09:18 +02:00
parent b2d0172422
commit 763ad0cb18
4 changed files with 22 additions and 22 deletions

View file

@ -74,14 +74,14 @@ impl ObjectSubclass for TextAhead {
TextAhead::catch_panic_pad_function(
parent,
|| Err(gst::FlowError::Error),
|self_, element| self_.sink_chain(pad, element, buffer),
|imp, element| imp.sink_chain(pad, element, buffer),
)
})
.event_function(|pad, parent, event| {
TextAhead::catch_panic_pad_function(
parent,
|| false,
|self_, element| self_.sink_event(pad, element, event),
|imp, element| imp.sink_event(pad, element, event),
)
})
.build();

View file

@ -840,8 +840,8 @@ impl BinImpl for UriPlaylistBin {
}
gst::MessageView::Error(error) => {
// find item which raised the error
let self_ = element.imp();
let mut state_guard = self_.state.lock().unwrap();
let imp = element.imp();
let mut state_guard = imp.state.lock().unwrap();
let state = state_guard.as_mut().unwrap();
let src = error.src().unwrap();
@ -1050,10 +1050,10 @@ impl UriPlaylistBin {
Some(element) => element,
None => return,
};
let self_ = element.imp();
let imp = element.imp();
let item = {
let mut state_guard = self_.state.lock().unwrap();
let mut state_guard = imp.state.lock().unwrap();
let state = state_guard.as_mut().unwrap();
state.waiting_for_ss_eos.as_ref().cloned()
};
@ -1092,7 +1092,7 @@ impl UriPlaylistBin {
item.add_blocked_pad(src_pad.clone());
} else {
self_.process_decodebin_pad(src_pad);
imp.process_decodebin_pad(src_pad);
}
});
@ -1289,10 +1289,10 @@ impl UriPlaylistBin {
Some(element) => element,
None => return gst::PadProbeReturn::Remove,
};
let self_ = element.imp();
let imp = element.imp();
let item = {
let mut state_guard = self_.state.lock().unwrap();
let mut state_guard = imp.state.lock().unwrap();
let state = state_guard.as_mut().unwrap();
state.waiting_for_ss_eos.as_ref().cloned()
};
@ -1300,7 +1300,7 @@ impl UriPlaylistBin {
if let Some(item) = item {
if item.dec_waiting_eos_ss() {
gst_debug!(CAT, obj: &element, "streamsynchronizer has been flushed, reorganize pipeline to fit new streams topology and unblock item");
self_.handle_topology_change(&element);
imp.handle_topology_change(&element);
gst::PadProbeReturn::Drop
} else {
gst::PadProbeReturn::Drop
@ -1427,9 +1427,9 @@ impl UriPlaylistBin {
item.index()
);
let self_ = element.imp();
let imp = element.imp();
{
let mut state_guard = self_.state.lock().unwrap();
let mut state_guard = imp.state.lock().unwrap();
let state = state_guard.as_mut().unwrap();
let index = item.index();
@ -1446,8 +1446,8 @@ impl UriPlaylistBin {
}
}
if let Err(e) = self_.start_next_item(&element) {
self_.failed(&element, e);
if let Err(e) = imp.start_next_item(&element) {
imp.failed(&element, e);
}
}

View file

@ -46,8 +46,8 @@ impl PaintableSink {
}
fn pending_frame(&self) -> Option<Frame> {
let self_ = self.imp();
self_.pending_frame.lock().unwrap().take()
let imp = self.imp();
imp.pending_frame.lock().unwrap().take()
}
fn initialize_paintable(
@ -84,13 +84,13 @@ impl PaintableSink {
**paintable_storage = Some(paintable);
let self_ = self.imp();
*self_.sender.lock().unwrap() = Some(sender);
let imp = self.imp();
*imp.sender.lock().unwrap() = Some(sender);
}
fn do_action(&self, action: SinkEvent) -> glib::Continue {
let self_ = self.imp();
let paintable = self_.paintable.lock().unwrap().clone();
let imp = self.imp();
let paintable = imp.paintable.lock().unwrap().clone();
let paintable = match paintable {
Some(paintable) => paintable,
None => return glib::Continue(false),

View file

@ -35,7 +35,7 @@ impl Default for SinkPaintable {
impl SinkPaintable {
pub(crate) fn handle_frame_changed(&self, frame: Option<Frame>) {
let self_ = self.imp();
self_.handle_frame_changed(self, frame);
let imp = self.imp();
imp.handle_frame_changed(self, frame);
}
}