mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 08:36:31 +00:00
examples: playbin: show how to use debug_to_dot_file()
This commit is contained in:
parent
7cb1dc9cb4
commit
3f6424d2ac
1 changed files with 15 additions and 0 deletions
|
@ -121,6 +121,21 @@ fn example_main() {
|
|||
);
|
||||
break;
|
||||
}
|
||||
MessageView::StateChanged(state_changed) =>
|
||||
// We are only interested in state-changed messages from playbin
|
||||
{
|
||||
if state_changed
|
||||
.get_src()
|
||||
.map(|s| s == playbin)
|
||||
.unwrap_or(false)
|
||||
&& state_changed.get_current() == gst::State::Playing
|
||||
{
|
||||
// Generate a dot graph of the pipeline to GST_DEBUG_DUMP_DOT_DIR if defined
|
||||
let bin_ref = playbin.downcast_ref::<gst::Bin>().unwrap();
|
||||
bin_ref.debug_to_dot_file(gst::DebugGraphDetails::all(), "PLAYING");
|
||||
}
|
||||
}
|
||||
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue