mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
names: add standard factory name definitions
Define a set of standard factory names and document what they contain. This makes it possible to change the implementation by mapping the factory-name to a different shared library.
This commit is contained in:
parent
4494f9c7c9
commit
6720ded529
40 changed files with 188 additions and 55 deletions
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
#include <spa/node/node.h>
|
||||
#include <spa/utils/hook.h>
|
||||
#include <spa/utils/names.h>
|
||||
#include <spa/param/audio/format-utils.h>
|
||||
#include <spa/param/props.h>
|
||||
#include <spa/debug/dict.h>
|
||||
|
|
@ -314,7 +315,7 @@ static int start_monitor(struct impl *impl)
|
|||
int res;
|
||||
void *iface;
|
||||
|
||||
handle = pw_core_load_spa_handle(impl->core, "api.bluez5.monitor", NULL);
|
||||
handle = pw_core_load_spa_handle(impl->core, SPA_NAME_API_BLUEZ5_MONITOR, NULL);
|
||||
if (handle == NULL) {
|
||||
res = -errno;
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include <spa/node/io.h>
|
||||
#include <spa/node/utils.h>
|
||||
#include <spa/debug/format.h>
|
||||
#include <spa/utils/names.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
||||
|
|
@ -348,7 +349,7 @@ static int make_nodes(struct data *data)
|
|||
|
||||
factory = pw_core_find_factory(data->core, "spa-node-factory");
|
||||
props = pw_properties_new(SPA_KEY_LIBRARY_NAME, "v4l2/libspa-v4l2",
|
||||
SPA_KEY_FACTORY_NAME, "api.v4l2.source", NULL);
|
||||
SPA_KEY_FACTORY_NAME, SPA_NAME_API_V4L2_SOURCE, NULL);
|
||||
data->v4l2 = pw_factory_create_object(factory,
|
||||
NULL,
|
||||
PW_TYPE_INTERFACE_Node,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue