mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 06:50:59 +00:00
fallbackswitch: Forward custom downstream events from active sinkpad
This will allow us to forward e.g. SCTE-35 events
This commit is contained in:
parent
4874c7eb1f
commit
9ebbae9d27
1 changed files with 19 additions and 0 deletions
|
@ -1097,6 +1097,25 @@ impl AggregatorImpl for FallbackSwitch {
|
||||||
|
|
||||||
self.parent_sink_event(agg, agg_pad, event)
|
self.parent_sink_event(agg, agg_pad, event)
|
||||||
}
|
}
|
||||||
|
EventView::CustomDownstream(ev) => {
|
||||||
|
{
|
||||||
|
let active_sinkpad_guard = self.active_sinkpad.lock().unwrap();
|
||||||
|
if let Some(active_sinkpad) = &*active_sinkpad_guard {
|
||||||
|
if active_sinkpad == agg_pad.upcast_ref::<gst::Pad>() {
|
||||||
|
drop(active_sinkpad_guard);
|
||||||
|
let src_pad = agg.static_pad("src").unwrap();
|
||||||
|
src_pad.push_event(event.clone());
|
||||||
|
gst::debug!(
|
||||||
|
CAT,
|
||||||
|
obj: agg_pad,
|
||||||
|
"Forwarding custom downstream event: {:?}",
|
||||||
|
ev
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.parent_sink_event(agg, agg_pad, event)
|
||||||
|
}
|
||||||
_ => self.parent_sink_event(agg, agg_pad, event),
|
_ => self.parent_sink_event(agg, agg_pad, event),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue