mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-19 16:46:35 +00:00
awstranscriber: release matching unsynced pad along request pads
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1930>
This commit is contained in:
parent
4720b575b6
commit
c57b74e269
1 changed files with 11 additions and 0 deletions
|
@ -1130,6 +1130,13 @@ impl ElementImpl for Transcriber {
|
||||||
self.obj().remove_pad(pad).unwrap();
|
self.obj().remove_pad(pad).unwrap();
|
||||||
self.state.lock().unwrap().srcpads.remove(pad);
|
self.state.lock().unwrap().srcpads.remove(pad);
|
||||||
|
|
||||||
|
let translate_srcpad = pad.downcast_ref::<super::TranslateSrcPad>().unwrap();
|
||||||
|
|
||||||
|
if let Some(unsynced_pad) = translate_srcpad.imp().take_unsynced_pad() {
|
||||||
|
unsynced_pad.set_active(false).unwrap();
|
||||||
|
self.obj().remove_pad(&unsynced_pad).unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
self.obj().child_removed(pad, &pad.name());
|
self.obj().child_removed(pad, &pad.name());
|
||||||
let _ = self
|
let _ = self
|
||||||
.obj()
|
.obj()
|
||||||
|
@ -1756,6 +1763,10 @@ impl TranslateSrcPad {
|
||||||
self.state.lock().unwrap().unsynced_pad = Some(pad.clone());
|
self.state.lock().unwrap().unsynced_pad = Some(pad.clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn take_unsynced_pad(&self) -> Option<gst::Pad> {
|
||||||
|
self.state.lock().unwrap().unsynced_pad.take()
|
||||||
|
}
|
||||||
|
|
||||||
fn start_task(&self) -> Result<(), gst::LoggableError> {
|
fn start_task(&self) -> Result<(), gst::LoggableError> {
|
||||||
gst::debug!(CAT, imp = self, "Starting task");
|
gst::debug!(CAT, imp = self, "Starting task");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue