[Bug 773091] check: Add API to filter g_warning/g_critical etc

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Oct 20 11:18:53 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=773091

Sebastian Dröge (slomo) <slomo at coaxion.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #337839|none                        |needs-work
             status|                            |

--- Comment #2 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
Review of attachment 337839:
 --> (https://bugzilla.gnome.org/review?bug=773091&attachment=337839)

::: libs/gst/check/gstcheck.c
@@ +113,3 @@
+    g_free (filter->log_domain);
+
+  if (filter->regex)

You allow regex==NULL here, and also log_domain. but the other code wouldn't
like that much :)

@@ +142,3 @@
+  filter = gst_check_log_filter_alloc (log_domain, log_level, regex,
+      func, user_data);
+  _gst_check_log_filters = g_list_append (_gst_check_log_filters, filter);

g_list_append() is expensive. Use a GQueue. Also probably needs a mutex for
thread-safety?

::: libs/gst/check/gstcheck.h
@@ +80,3 @@
 void gst_check_init (int *argc, char **argv[]);

+gpointer gst_check_log_filter_add (const gchar * log_domain,

Make this pointer some opaque typedef

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list