mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-04 13:08:01 +02:00
event*.c: add a few more log msgs
This commit is contained in:
parent
03e6de9894
commit
27c1ea869b
4 changed files with 22 additions and 3 deletions
|
|
@ -127,7 +127,8 @@ wp_event_source_dispatch (GSource * s, GSourceFunc callback, gpointer user_data)
|
|||
|
||||
event_data->current_hook_in_async = g_object_ref (hook);
|
||||
|
||||
wp_trace_object (d, "running hook <%p>(%s)", hook, name);
|
||||
wp_trace_object(d, "dispatching event (%s) running hook <%p>(%s)",
|
||||
wp_event_get_name(event), hook, name);
|
||||
|
||||
/* execute the hook, possibly async */
|
||||
wp_event_hook_run (hook, event, cancellable,
|
||||
|
|
@ -227,6 +228,8 @@ wp_event_dispatcher_get_instance (WpCore * core)
|
|||
|
||||
g_source_attach (dispatcher->source, wp_core_get_g_main_context (core));
|
||||
wp_core_register_object (core, g_object_ref (dispatcher));
|
||||
|
||||
wp_info_object (dispatcher, "event-dispatcher inited");
|
||||
}
|
||||
|
||||
return dispatcher;
|
||||
|
|
@ -257,8 +260,7 @@ wp_event_dispatcher_push_event (WpEventDispatcher * self, WpEvent * event)
|
|||
|
||||
self->events = g_list_insert_sorted (self->events, event_data,
|
||||
(GCompareFunc) event_cmp_func);
|
||||
// wp_debug_object (self, "pushed event (%s)" WP_OBJECT_FORMAT " priority(%d)",
|
||||
// event->name, WP_OBJECT_ARGS (event->subject), event->priority);
|
||||
wp_trace_object (self, "pushed event (%s)", wp_event_get_name (event));
|
||||
|
||||
/* wakeup the GSource */
|
||||
spa_system_eventfd_write (self->system, self->eventfd, 1);
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ void
|
|||
wp_event_hook_set_dispatcher (WpEventHook * self, WpEventDispatcher * dispatcher)
|
||||
{
|
||||
WpEventHookPrivate *priv = wp_event_hook_get_instance_private (self);
|
||||
wp_trace_object (dispatcher, "hook (%s) registered", priv->name);
|
||||
g_weak_ref_set (&priv->dispatcher, dispatcher);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,6 +139,19 @@ wp_event_new (const gchar * type, gint priority, WpProperties * properties,
|
|||
return self;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Gets the name of the event
|
||||
* \ingroup wpevent
|
||||
* \param self the event
|
||||
* \return the event name
|
||||
*/
|
||||
const gchar *
|
||||
wp_event_get_name(WpEvent *self)
|
||||
{
|
||||
g_return_val_if_fail(self != NULL, NULL);
|
||||
return self->name;
|
||||
}
|
||||
|
||||
static void
|
||||
wp_event_free (WpEvent * self)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ WpProperties * wp_event_get_properties (WpEvent * self);
|
|||
WP_API
|
||||
GObject * wp_event_get_source (WpEvent * self);
|
||||
|
||||
WP_API
|
||||
const gchar *wp_event_get_name(WpEvent *self);
|
||||
|
||||
WP_API
|
||||
GObject * wp_event_get_subject (WpEvent * self);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue