2023-02-08 18:12:00 +01:00
|
|
|
/* Spa Control plugin */
|
|
|
|
|
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
|
|
|
|
|
/* SPDX-License-Identifier: MIT */
|
2019-10-16 11:13:23 +02:00
|
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
|
|
#include <spa/support/plugin.h>
|
2024-03-10 17:32:56 +02:00
|
|
|
#include <spa/support/log.h>
|
2019-10-16 11:13:23 +02:00
|
|
|
|
|
|
|
|
extern const struct spa_handle_factory spa_control_mixer_factory;
|
|
|
|
|
|
2024-03-10 17:32:56 +02:00
|
|
|
SPA_LOG_TOPIC_ENUM_DEFINE_REGISTERED;
|
|
|
|
|
|
2019-10-16 11:13:23 +02:00
|
|
|
SPA_EXPORT
|
|
|
|
|
int spa_handle_factory_enum(const struct spa_handle_factory **factory, uint32_t *index)
|
|
|
|
|
{
|
|
|
|
|
spa_return_val_if_fail(factory != NULL, -EINVAL);
|
|
|
|
|
spa_return_val_if_fail(index != NULL, -EINVAL);
|
|
|
|
|
|
|
|
|
|
switch (*index) {
|
|
|
|
|
case 0:
|
|
|
|
|
*factory = &spa_control_mixer_factory;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
(*index)++;
|
|
|
|
|
return 1;
|
|
|
|
|
}
|