WIP change object model

This commit is contained in:
Wim Taymans 2016-11-14 12:42:00 +01:00
parent 190f01d88e
commit c25ccbb4ba
44 changed files with 1557 additions and 2525 deletions

View file

@ -62,8 +62,6 @@ typedef struct
{
PinosMainLoop this;
PinosObject object;
SpaPoll poll;
GMainContext *context;
@ -343,6 +341,7 @@ static void
main_loop_quit (PinosMainLoop *loop)
{
PinosMainLoopImpl *impl = SPA_CONTAINER_OF (loop, PinosMainLoopImpl, this);
pinos_log_debug ("main-loop %p: quit", impl);
g_main_loop_quit (impl->loop);
}
@ -350,20 +349,10 @@ static void
main_loop_run (PinosMainLoop *loop)
{
PinosMainLoopImpl *impl = SPA_CONTAINER_OF (loop, PinosMainLoopImpl, this);
pinos_log_debug ("main-loop %p: run", impl);
g_main_loop_run (impl->loop);
}
void
pinos_main_loop_destroy (PinosMainLoop *loop)
{
PinosMainLoopImpl *impl = SPA_CONTAINER_OF (loop, PinosMainLoopImpl, this);
pinos_log_debug ("main-loop %p: destroy", impl);
g_slice_free_chain (WorkItem, impl->free_list, list.next);
free (impl);
}
/**
* pinos_main_loop_new:
* @context: a #GMainContext or %NULL to use the default context
@ -418,3 +407,18 @@ pinos_main_loop_new (GMainContext *context)
return this;
}
void
pinos_main_loop_destroy (PinosMainLoop *loop)
{
PinosMainLoopImpl *impl = SPA_CONTAINER_OF (loop, PinosMainLoopImpl, this);
pinos_log_debug ("main-loop %p: destroy", impl);
g_main_loop_unref (impl->loop);
close (impl->fds[0].fd);
g_slice_free_chain (WorkItem, impl->free_list, list.next);
free (impl);
}