pipewire/spa/plugins/videoconvert/plugin.c
columbarius 4caff02d86 Merge branch 'videoconvert' into 'master'
Draft: videoconvert: Add vulkan converter

See merge request pipewire/pipewire!1704
2024-01-22 13:39:40 +00:00

33 lines
780 B
C

/* Spa videoconvert plugin */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#include <errno.h>
#include <spa/support/plugin.h>
#include <spa/support/log.h>
extern const struct spa_handle_factory spa_videoadapter_factory;
extern const struct spa_handle_factory spa_videoconvert_vulkan_factory;
SPA_LOG_TOPIC_ENUM_DEFINE_REGISTERED;
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_videoadapter_factory;
break;
case 1:
*factory = &spa_videoconvert_vulkan_factory;
break;
default:
return 0;
}
(*index)++;
return 1;
}