mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-22 08:56:59 -05:00
support: abstract some system functions
Make a new API to hide some the implementation of eventfd, timerfd and signalfd along with clock and read/write/ioctl/close functions. We would like to have plugins use the abstractions so that we can switch them to something else when needed.
This commit is contained in:
parent
98602f0343
commit
81c7dd4433
12 changed files with 492 additions and 50 deletions
|
|
@ -28,8 +28,9 @@
|
|||
#include <spa/support/plugin.h>
|
||||
|
||||
extern const struct spa_handle_factory spa_support_logger_factory;
|
||||
extern const struct spa_handle_factory spa_support_loop_factory;
|
||||
extern const struct spa_handle_factory spa_support_system_factory;
|
||||
extern const struct spa_handle_factory spa_support_cpu_factory;
|
||||
extern const struct spa_handle_factory spa_support_loop_factory;
|
||||
|
||||
SPA_EXPORT
|
||||
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
|
||||
|
|
@ -42,11 +43,14 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
|
|||
*factory = &spa_support_logger_factory;
|
||||
break;
|
||||
case 1:
|
||||
*factory = &spa_support_loop_factory;
|
||||
*factory = &spa_support_system_factory;
|
||||
break;
|
||||
case 2:
|
||||
*factory = &spa_support_cpu_factory;
|
||||
break;
|
||||
case 3:
|
||||
*factory = &spa_support_loop_factory;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue