mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 08:56:56 -05:00
bluez5: expose factories in the plugin
This commit is contained in:
parent
f205504c26
commit
0a5bce4a3b
3 changed files with 14 additions and 2 deletions
|
|
@ -1526,7 +1526,7 @@ static const struct spa_dict_item info_items[] = {
|
||||||
|
|
||||||
static const struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
|
static const struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
|
||||||
|
|
||||||
struct spa_handle_factory spa_a2dp_sink_factory = {
|
const struct spa_handle_factory spa_a2dp_sink_factory = {
|
||||||
SPA_VERSION_HANDLE_FACTORY,
|
SPA_VERSION_HANDLE_FACTORY,
|
||||||
"api.bluez5.a2dp.sink",
|
"api.bluez5.a2dp.sink",
|
||||||
&info,
|
&info,
|
||||||
|
|
|
||||||
|
|
@ -1224,7 +1224,7 @@ static const struct spa_dict_item info_items[] = {
|
||||||
|
|
||||||
static const struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
|
static const struct spa_dict info = SPA_DICT_INIT_ARRAY(info_items);
|
||||||
|
|
||||||
struct spa_handle_factory spa_a2dp_source_factory = {
|
const struct spa_handle_factory spa_a2dp_source_factory = {
|
||||||
SPA_VERSION_HANDLE_FACTORY,
|
SPA_VERSION_HANDLE_FACTORY,
|
||||||
"api.bluez5.a2dp.source",
|
"api.bluez5.a2dp.source",
|
||||||
&info,
|
&info,
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@
|
||||||
#include <spa/support/plugin.h>
|
#include <spa/support/plugin.h>
|
||||||
|
|
||||||
extern const struct spa_handle_factory spa_bluez5_monitor_factory;
|
extern const struct spa_handle_factory spa_bluez5_monitor_factory;
|
||||||
|
extern const struct spa_handle_factory spa_bluez5_device_factory;
|
||||||
|
extern const struct spa_handle_factory spa_a2dp_sink_factory;
|
||||||
|
extern const struct spa_handle_factory spa_a2dp_source_factory;
|
||||||
|
|
||||||
SPA_EXPORT
|
SPA_EXPORT
|
||||||
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
|
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
|
||||||
|
|
@ -39,6 +42,15 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
|
||||||
case 0:
|
case 0:
|
||||||
*factory = &spa_bluez5_monitor_factory;
|
*factory = &spa_bluez5_monitor_factory;
|
||||||
break;
|
break;
|
||||||
|
case 1:
|
||||||
|
*factory = &spa_bluez5_device_factory;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
*factory = &spa_a2dp_sink_factory;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
*factory = &spa_a2dp_source_factory;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue