static void gst_bus_constructed (GObject * object) { GstBus *bus = GST_BUS_CAST (object); if (bus->priv->enable_async) { bus->priv->poll = gst_poll_new_timer (); gst_poll_get_read_gpollfd (bus->priv->poll, &bus->priv->pollfd); } }
/* test that you get the messages with pop from another thread. */ static gpointer pop_thread (gpointer data) { GstBus *bus = GST_BUS_CAST (data); guint i; for (i = 0; i < 10; i++) gst_message_unref (gst_bus_timed_pop (bus, GST_CLOCK_TIME_NONE)); return NULL; }
static void gst_bus_constructed (GObject * object) { GstBus *bus = GST_BUS_CAST (object); if (bus->priv->enable_async) { bus->priv->poll = gst_poll_new_timer (); gst_poll_get_read_gpollfd (bus->priv->poll, &bus->priv->pollfd); } G_OBJECT_CLASS (gst_bus_parent_class)->constructed (object); }
static void gst_bus_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstBus *bus = GST_BUS_CAST (object); switch (prop_id) { case PROP_ENABLE_ASYNC: bus->priv->enable_async = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }