Skip to content

Commit

Permalink
misc: only dump pipeline debug when it started
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Feb 27, 2024
1 parent 8c62708 commit d74ea5d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/recording.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,6 @@ impl Recording {
})?;
imp.pipeline.set(pipeline.clone()).unwrap();

// This is enabled by setting `GST_DEBUG_DUMP_DOT_DIR` to a directory (e.g. `GST_DEBUG_DUMP_DOT_DIR=.`).
pipeline.debug_to_dot_file_with_ts(gst::DebugGraphDetails::VERBOSE, "kooha-pipeline");

// Setup and run timer
let timer = Timer::new(
settings.record_delay(),
Expand Down Expand Up @@ -566,8 +563,10 @@ impl Recording {
MessageView::AsyncDone(ad) => {
tracing::trace!("Received async-done message on bus: {:?}", ad);

let pipeline = self.pipeline();

if tracing::enabled!(tracing::Level::DEBUG) {
self.pipeline()
pipeline
.iterate_all_by_element_factory_name("pipewiresrc")
.into_iter()
.filter_map(|element| {
Expand All @@ -584,6 +583,10 @@ impl Recording {
});
}

// This is enabled by setting `GST_DEBUG_DUMP_DOT_DIR` to a directory (e.g. `GST_DEBUG_DUMP_DOT_DIR=.`).
pipeline
.debug_to_dot_file_with_ts(gst::DebugGraphDetails::VERBOSE, "kooha-pipeline");

glib::ControlFlow::Continue
}
MessageView::Warning(w) => {
Expand Down

0 comments on commit d74ea5d

Please sign in to comment.