mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
device: add device object
Make a device object, let the v4l2 monitor create device objects The device object is responsible for dynamically creating nodes.
This commit is contained in:
parent
79253c6d46
commit
e1bd12e599
43 changed files with 1784 additions and 237 deletions
|
|
@ -186,6 +186,7 @@ fill_item(struct impl *this, snd_ctl_card_info_t *card_info,
|
|||
SPA_MONITOR_ITEM_name, &SPA_POD_Stringv(name),
|
||||
SPA_MONITOR_ITEM_class, &SPA_POD_Stringv(klass),
|
||||
SPA_MONITOR_ITEM_factory, &SPA_POD_Pointer(SPA_TYPE_INTERFACE_HandleFactory, factory),
|
||||
SPA_MONITOR_ITEM_type, &SPA_POD_Id(SPA_TYPE_INTERFACE_Node),
|
||||
0);
|
||||
|
||||
spa_pod_builder_prop(builder, SPA_MONITOR_ITEM_info, 0);
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
extern const struct spa_handle_factory spa_alsa_source_factory;
|
||||
extern const struct spa_handle_factory spa_alsa_sink_factory;
|
||||
extern const struct spa_handle_factory spa_alsa_monitor_factory;
|
||||
extern const struct spa_handle_factory spa_alsa_device_factory;
|
||||
|
||||
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
|
||||
{
|
||||
|
|
@ -45,6 +46,9 @@ int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t
|
|||
case 2:
|
||||
*factory = &spa_alsa_monitor_factory;
|
||||
break;
|
||||
case 3:
|
||||
*factory = &spa_alsa_device_factory;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
spa_alsa_sources = ['alsa.c',
|
||||
'alsa-monitor.c',
|
||||
'alsa-device.c',
|
||||
'alsa-sink.c',
|
||||
'alsa-source.c',
|
||||
'alsa-utils.c']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue