mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -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
|
|
@ -33,6 +33,7 @@
|
|||
#include <spa/support/system.h>
|
||||
#include <spa/utils/list.h>
|
||||
#include <spa/utils/keys.h>
|
||||
#include <spa/utils/names.h>
|
||||
#include <spa/monitor/device.h>
|
||||
|
||||
#include <spa/node/node.h>
|
||||
|
|
@ -1528,7 +1529,7 @@ static const struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
|
|||
|
||||
const struct spa_handle_factory spa_a2dp_sink_factory = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
"api.bluez5.a2dp.sink",
|
||||
SPA_NAME_API_BLUEZ5_A2DP_SINK,
|
||||
&info,
|
||||
impl_get_size,
|
||||
impl_init,
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include <spa/support/system.h>
|
||||
#include <spa/utils/list.h>
|
||||
#include <spa/utils/keys.h>
|
||||
#include <spa/utils/names.h>
|
||||
#include <spa/monitor/device.h>
|
||||
|
||||
#include <spa/node/node.h>
|
||||
|
|
@ -1226,7 +1227,7 @@ static const struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
|
|||
|
||||
const struct spa_handle_factory spa_a2dp_source_factory = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
"api.bluez5.a2dp.source",
|
||||
SPA_NAME_API_BLUEZ5_A2DP_SOURCE,
|
||||
&info,
|
||||
impl_get_size,
|
||||
impl_init,
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <spa/support/log.h>
|
||||
#include <spa/utils/type.h>
|
||||
#include <spa/utils/keys.h>
|
||||
#include <spa/utils/names.h>
|
||||
#include <spa/support/loop.h>
|
||||
#include <spa/support/plugin.h>
|
||||
#include <spa/monitor/device.h>
|
||||
|
|
@ -107,7 +108,7 @@ static int emit_source_node(struct impl *this)
|
|||
|
||||
info = SPA_DEVICE_OBJECT_INFO_INIT();
|
||||
info.type = SPA_TYPE_INTERFACE_Node;
|
||||
info.factory_name = "api.bluez5.a2dp.source";
|
||||
info.factory_name = SPA_NAME_API_BLUEZ5_A2DP_SOURCE;
|
||||
info.change_mask = SPA_DEVICE_OBJECT_CHANGE_MASK_PROPS;
|
||||
info.props = &SPA_DICT_INIT_ARRAY(items);
|
||||
|
||||
|
|
@ -154,7 +155,7 @@ static int emit_sink_node(struct impl *this)
|
|||
|
||||
info = SPA_DEVICE_OBJECT_INFO_INIT();
|
||||
info.type = SPA_TYPE_INTERFACE_Node;
|
||||
info.factory_name = "api.bluez5.a2dp.sink";
|
||||
info.factory_name = SPA_NAME_API_BLUEZ5_A2DP_SINK;
|
||||
info.change_mask = SPA_DEVICE_OBJECT_CHANGE_MASK_PROPS;
|
||||
info.props = &SPA_DICT_INIT_ARRAY(items);
|
||||
|
||||
|
|
@ -348,7 +349,7 @@ static const struct spa_dict handle_info = SPA_DICT_INIT_ARRAY(handle_info_items
|
|||
|
||||
const struct spa_handle_factory spa_bluez5_device_factory = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
"api.bluez5.device",
|
||||
SPA_NAME_API_BLUEZ5_DEVICE,
|
||||
&handle_info,
|
||||
impl_get_size,
|
||||
impl_init,
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
#include <spa/monitor/utils.h>
|
||||
#include <spa/utils/type.h>
|
||||
#include <spa/utils/keys.h>
|
||||
#include <spa/utils/names.h>
|
||||
|
||||
#include "a2dp-codecs.h"
|
||||
#include "defs.h"
|
||||
|
|
@ -499,7 +500,7 @@ static int device_add(struct spa_bt_monitor *monitor, struct spa_bt_device *devi
|
|||
|
||||
info = SPA_MONITOR_OBJECT_INFO_INIT();
|
||||
info.type = SPA_TYPE_INTERFACE_Device;
|
||||
info.factory_name = "api.bluez5.device";
|
||||
info.factory_name = SPA_NAME_API_BLUEZ5_DEVICE;
|
||||
info.change_mask = SPA_MONITOR_OBJECT_CHANGE_MASK_FLAGS |
|
||||
SPA_MONITOR_OBJECT_CHANGE_MASK_PROPS;
|
||||
info.flags = 0;
|
||||
|
|
@ -2292,7 +2293,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
|
|||
|
||||
const struct spa_handle_factory spa_bluez5_monitor_factory = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
"api.bluez5.monitor",
|
||||
SPA_NAME_API_BLUEZ5_MONITOR,
|
||||
NULL,
|
||||
impl_get_size,
|
||||
impl_init,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue