GNOME Bugzilla – Bug 647005
GstBus: Only create the socketpair for async message delivery if required
Last modified: 2011-04-08 07:17:22 UTC
This adds a new construct-only property to disable the creation of the sockets.
Created attachment 185400 [details] [review] bus: Use a construct-only property to distinguish between child buses and normal buses This allows to only create the socketpair when it is really required instead of always creating it and immediately destroying it again for child buses.
Created attachment 185401 [details] [review] bus: Immediately drop messages after calling the sync handler if this is a synchronous bus Otherwise we might wait forever for the message to be popped from the queue if a sync handler returned GST_BUS_ASYNC.
Any better suggestions for the name of the property?
Review of attachment 185400 [details] [review]: ::: gst/gstbus.c @@ +150,3 @@ + case PROP_ENABLE_ASYNC: + /* Do nothing, already handled in GObject::constructor */ + break; whooo. please not. Just handle it. See comment below. @@ +172,3 @@ + construct_properties); + bus = GST_BUS_CAST (object); + Imho chaining up here should call the gst_bus_set_property(). This would spare you the ugly hack below and the global variable for the pspec.
Another comment from irc discussion, kill _construct() vmethod, but used _constructed(), that ensures that the (construct-only)-object-properties are set.
Pushed with Stefan's changes commit 80eb160e0f62350271f061daa5f289d9d4277cf4 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Thu Apr 7 11:24:35 2011 +0200 bus: Immediately drop messages after calling the sync handler if this is a s Otherwise we might wait forever for the message to be popped from the queue if a sync handler returned GST_BUS_ASYNC. https://bugzilla.gnome.org/show_bug.cgi?id=647005 commit c41b0ade28790ffdb0e484b41cd7929c4e145dec Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Thu Apr 7 11:19:57 2011 +0200 bus: Use a construct-only property to distinguish between child buses and no This allows to only create the socketpair when it is really required instead of always creating it and immediately destroying it again for child buses. https://bugzilla.gnome.org/show_bug.cgi?id=647005