From 91a8dba821f1457edd16a1e54029305193aa2e57 Mon Sep 17 00:00:00 2001 From: Denis Medyantsev <44088010+denisvmedyantsev@users.noreply.github.com> Date: Wed, 8 Mar 2023 22:20:50 -0800 Subject: [PATCH] Move draw func before output meta preparation. (#81) --- savant/config/module_config.py | 1 + savant/deepstream/pipeline.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/savant/config/module_config.py b/savant/config/module_config.py index 7ce76bde7..eca2aaf3a 100644 --- a/savant/config/module_config.py +++ b/savant/config/module_config.py @@ -198,6 +198,7 @@ def load(self, config_file_path: Union[str, Path]) -> Module: del self._default_cfg.pipeline.source logger.debug('Default conf\n%s', self._default_cfg) + logger.debug('Module conf\n%s', module_cfg) module_cfg = OmegaConf.unsafe_merge( self._config_schema, self._default_cfg, module_cfg ) diff --git a/savant/deepstream/pipeline.py b/savant/deepstream/pipeline.py index 839e7fd80..4fe54acb1 100644 --- a/savant/deepstream/pipeline.py +++ b/savant/deepstream/pipeline.py @@ -689,9 +689,9 @@ def _create_demuxer(self, link: bool) -> Gst.Element: demuxer, self._max_parallel_streams ) sink_peer_pad: Gst.Pad = demuxer.get_static_pad('sink').get_peer() - sink_peer_pad.add_probe(Gst.PadProbeType.BUFFER, self.update_frame_meta) if self._draw_func and self._output_frame_codec: sink_peer_pad.add_probe(Gst.PadProbeType.BUFFER, self._draw_on_frame_probe) + sink_peer_pad.add_probe(Gst.PadProbeType.BUFFER, self.update_frame_meta) return demuxer def _draw_on_frame_probe(