mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
WIP change object model
This commit is contained in:
parent
190f01d88e
commit
c25ccbb4ba
44 changed files with 1557 additions and 2525 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue