diff --git a/spa/plugins/videoconvert/videoadapter.c b/spa/plugins/videoconvert/videoadapter.c index 872c9e308..d83943faf 100644 --- a/spa/plugins/videoconvert/videoadapter.c +++ b/spa/plugins/videoconvert/videoadapter.c @@ -28,6 +28,11 @@ #define SPA_LOG_TOPIC_DEFAULT log_topic static struct spa_log_topic *log_topic = &SPA_LOG_TOPIC(0, "spa.videoadapter"); +#if 0 +#define VIDEOCONVERTER 1 +#define VIDEOCONVERTER_FACTORY spa_videoconvert_vulkan_factory +#endif + #define DEFAULT_ALIGN 16 #define MAX_PORTS (1+1) @@ -534,7 +539,7 @@ static int configure_convert(struct impl *this, uint32_t mode) return spa_node_set_param(this->convert, SPA_PARAM_PortConfig, 0, param); } -extern const struct spa_handle_factory spa_videoconvert_factory; +extern const struct spa_handle_factory VIDEOCONVERTER_FACTORY; static const struct spa_node_events follower_node_events; @@ -1642,8 +1647,8 @@ impl_get_size(const struct spa_handle_factory *factory, { size_t size = 0; -#if 0 - size += spa_handle_factory_get_size(&spa_videoconvert_factory, params); +#if VIDEOCONVERTER + size += spa_handle_factory_get_size(&VIDEOCONVERTER_FACTORY, params); #endif size += sizeof(struct impl); @@ -1658,7 +1663,7 @@ impl_init(const struct spa_handle_factory *factory, uint32_t n_support) { struct impl *this; -#if 0 +#if VIDEOCONVERTER void *iface; #endif const char *str; @@ -1694,9 +1699,9 @@ impl_init(const struct spa_handle_factory *factory, SPA_VERSION_NODE, &impl_node, this); -#if 0 +#if VIDEOCONVERTER this->hnd_convert = SPA_PTROFF(this, sizeof(struct impl), struct spa_handle); - spa_handle_factory_init(&spa_videoconvert_factory, + spa_handle_factory_init(&VIDEOCONVERTER_FACTORY, this->hnd_convert, info, support, n_support); @@ -1734,8 +1739,8 @@ impl_init(const struct spa_handle_factory *factory, if (this->direction == SPA_DIRECTION_INPUT) { // MODE: CONVERT - // configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_convert); - reconfigure_mode(this, true, this->direction, NULL); + configure_convert(this, SPA_PARAM_PORT_CONFIG_MODE_convert); + // reconfigure_mode(this, true, this->direction, NULL); } else { // MODE: PASSTHROUGH reconfigure_mode(this, true, this->direction, NULL);