mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-24 07:00:05 -05:00
Add mapper
Ger rid of static ids for interfaces and replace with something we can register dynamically Implement logger.
This commit is contained in:
parent
a68e5d5124
commit
fc4fd1424a
43 changed files with 997 additions and 360 deletions
|
|
@ -39,7 +39,7 @@ enum {
|
|||
G_DEFINE_TYPE (PinosSpaVideoTestSrc, pinos_spa_videotestsrc, PINOS_TYPE_NODE);
|
||||
|
||||
static SpaResult
|
||||
make_node (SpaNode **node, const char *lib, const char *name)
|
||||
make_node (PinosDaemon *daemon, SpaNode **node, const char *lib, const char *name)
|
||||
{
|
||||
SpaHandle *handle;
|
||||
SpaResult res;
|
||||
|
|
@ -68,11 +68,13 @@ make_node (SpaNode **node, const char *lib, const char *name)
|
|||
continue;
|
||||
|
||||
handle = calloc (1, factory->size);
|
||||
if ((res = factory->init (factory, handle, NULL, NULL, 0)) < 0) {
|
||||
if ((res = factory->init (factory, handle, NULL, daemon->support, daemon->n_support)) < 0) {
|
||||
g_error ("can't make factory instance: %d", res);
|
||||
return res;
|
||||
}
|
||||
if ((res = handle->get_interface (handle, SPA_INTERFACE_ID_NODE, &iface)) < 0) {
|
||||
if ((res = handle->get_interface (handle,
|
||||
spa_id_map_get_id (daemon->map, SPA_NODE_URI),
|
||||
&iface)) < 0) {
|
||||
g_error ("can't get interface %d", res);
|
||||
return res;
|
||||
}
|
||||
|
|
@ -148,7 +150,8 @@ pinos_spa_videotestsrc_new (PinosDaemon *daemon,
|
|||
SpaNode *n;
|
||||
SpaResult res;
|
||||
|
||||
if ((res = make_node (&n,
|
||||
if ((res = make_node (daemon,
|
||||
&n,
|
||||
"build/spa/plugins/videotestsrc/libspa-videotestsrc.so",
|
||||
"videotestsrc")) < 0) {
|
||||
g_error ("can't create videotestsrc: %d", res);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue