Add markers for warning and error log messages to the timeline display
authorRené Stadler <mail@renestadler.de>
Fri, 16 Nov 2007 13:56:57 +0000 (15:56 +0200)
committerStefan Sauer <ensonic@users.sf.net>
Thu, 11 Sep 2014 18:51:37 +0000 (20:51 +0200)
debug-viewer/GstDebugViewer/Plugins/LineFrequency.py

index 37b130d..36eee78 100644 (file)
@@ -241,6 +241,18 @@ class LineFrequencyWidget (gtk.DrawingArea):
         ctx.set_source_rgb (*(theme.colors_float (level)[1]))
         self.__draw_graph (ctx, w, h, maximum, [counts[level] for counts in dist_data])
 
+        for level in (Data.debug_level_warning, Data.debug_level_error,):
+            ctx.set_source_rgb (*(theme.colors_float (level)[1]))
+            for i, counts in enumerate (dist_data):
+                if counts[level] == 0:
+                    continue
+                SIZE = 8
+                ctx.move_to (i - SIZE // 2, 0)
+                ctx.line_to (i + SIZE // 2, 0)
+                ctx.line_to (i, SIZE / 1.41)
+                ctx.close_path ()
+                ctx.fill ()
+
     def __draw_graph (self, ctx, w, h, maximum, data):
 
         from operator import add