[Bug 755554] gtk: Wait at most 5s for calling something on the main thread
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Thu Sep 24 10:41:23 PDT 2015
https://bugzilla.gnome.org/show_bug.cgi?id=755554
--- Comment #3 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
(In reply to Nicolas Dufresne (stormer) from comment #2)
> Review of attachment 312076 [details] [review]:
>
> ::: ext/gtk/gstgtkbasesink.c
> @@ +327,3 @@
> + gboolean timeout, ret;
> +
> + ret = ! !gst_gtk_invoke_on_main ((GThreadFunc)
>
> Was there before, but why would you want to use ! ! obscureness here, while
> you can write readable code ?
Boolean normalization.
> ::: ext/gtk/gstgtkutils.c
> @@ +29,3 @@
> GCond cond;
> gboolean fired;
> + gboolean timed_out;
>
> Consistency, timeout in basesink vs timed_out here.
Why does basesink matter here? :) And timeout is already the variable we use as
out parameter.
> @@ +52,3 @@
> + g_mutex_clear (&info->lock);
> + g_cond_clear (&info->cond);
> + g_free (info);
>
> Using g_main_context_invoke_full() with a destroy notify would avoid the
> duplication.
No, because otherwise the struct is already freed after g_main_context_invoke()
while we still want to get the result from it.
> @@ +71,1 @@
> + info = g_new0 (struct invoke_context, 1);
>
> Slice new please. I'd suggest having a new/free which will be clean with the
> invoke_full(),
No, GSlice is deprecated in newer GLib :)
--
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