mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-30 15:31:01 +00:00
sink: Dot comsumer pipeline on state changes
This commit is contained in:
parent
ac0f9f41df
commit
444ee40f09
1 changed files with 11 additions and 0 deletions
|
@ -1419,6 +1419,7 @@ impl WebRTCSink {
|
|||
|
||||
let mut bus_stream = pipeline.bus().unwrap().stream();
|
||||
let element_clone = element.downgrade();
|
||||
let pipeline_clone = pipeline.downgrade();
|
||||
let peer_id_clone = peer_id.to_owned();
|
||||
|
||||
task::spawn(async move {
|
||||
|
@ -1430,6 +1431,16 @@ impl WebRTCSink {
|
|||
gst_error!(CAT, "Consumer {} error: {}", peer_id_clone, err.error());
|
||||
let _ = this.remove_consumer(&element, &peer_id_clone, true);
|
||||
}
|
||||
gst::MessageView::StateChanged(state_changed) => {
|
||||
if let Some(pipeline) = pipeline_clone.upgrade(){
|
||||
if Some(pipeline.clone().upcast()) == state_changed.src() {
|
||||
pipeline.debug_to_dot_file_with_ts(gst::DebugGraphDetails::all(),
|
||||
format!("webrtcsink-peer-{}-{:?}-to-{:?}", peer_id_clone,
|
||||
state_changed.old(),
|
||||
state_changed.current()));
|
||||
}
|
||||
}
|
||||
}
|
||||
gst::MessageView::Eos(..) => {
|
||||
gst_error!(
|
||||
CAT,
|
||||
|
|
Loading…
Reference in a new issue