monitor: return factory_name in the object_info

Pass a factory_name in the object_info of monitor and device.
Restructure the factory name to mean something functionaly. With
the factory to library mapping this then means that the implementation
of certain factories can be configured in the config file.
This commit is contained in:
Wim Taymans 2019-05-31 15:06:44 +02:00
parent 89a86db0c4
commit 1d1f035e78
26 changed files with 218 additions and 168 deletions

View file

@ -47,8 +47,6 @@
#define ACTION_CHANGE 1
#define ACTION_REMOVE 2
extern const struct spa_handle_factory spa_alsa_device_factory;
struct impl {
struct spa_handle handle;
struct spa_monitor monitor;
@ -111,7 +109,7 @@ static int emit_object_info(struct impl *this, uint32_t id, struct udev_device *
info = SPA_MONITOR_OBJECT_INFO_INIT();
info.type = SPA_TYPE_INTERFACE_Device;
info.factory = &spa_alsa_device_factory;
info.factory_name = "api.alsa.device";
info.change_mask = SPA_MONITOR_OBJECT_CHANGE_MASK_FLAGS |
SPA_MONITOR_OBJECT_CHANGE_MASK_PROPS;
info.flags = 0;
@ -481,7 +479,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
const struct spa_handle_factory spa_alsa_monitor_factory = {
SPA_VERSION_HANDLE_FACTORY,
NAME,
"api.alsa.monitor",
NULL,
impl_get_size,
impl_init,