context: add method to get the data loop

Handy for invoking or adding/removing sources.
This commit is contained in:
Wim Taymans 2022-07-13 11:25:10 +02:00
parent ed88cad583
commit 0c24d66dc3
2 changed files with 9 additions and 0 deletions

View file

@ -542,6 +542,12 @@ struct pw_loop *pw_context_get_main_loop(struct pw_context *context)
return context->main_loop;
}
SPA_EXPORT
struct pw_data_loop *pw_context_get_data_loop(struct pw_context *context)
{
return context->data_loop_impl;
}
SPA_EXPORT
struct pw_work_queue *pw_context_get_work_queue(struct pw_context *context)
{

View file

@ -136,6 +136,9 @@ const struct spa_support *pw_context_get_support(struct pw_context *context, uin
/** get the context main loop */
struct pw_loop *pw_context_get_main_loop(struct pw_context *context);
/** get the context data loop. Since 0.3.56 */
struct pw_data_loop *pw_context_get_data_loop(struct pw_context *context);
/** Get the work queue from the context: Since 0.3.26 */
struct pw_work_queue *pw_context_get_work_queue(struct pw_context *context);