From 324ec9df150996eec700cbb3aa6f5af9472c3b5d Mon Sep 17 00:00:00 2001 From: columbarius Date: Thu, 31 Aug 2023 01:34:21 +0200 Subject: [PATCH] stream: conditionally wrap video streams with adapter node If the property video.adapt.videoconverter is set the video stream will be wrapped with the videoadapter from the videoconvert spa plugin. This allows testing the videoadapter and videoconverters while preserving the current behaviour. Later the chack for this property can be dropped. --- src/pipewire/stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pipewire/stream.c b/src/pipewire/stream.c index c6965cfd0..32c77f65b 100644 --- a/src/pipewire/stream.c +++ b/src/pipewire/stream.c @@ -2096,7 +2096,9 @@ pw_stream_connect(struct pw_stream *stream, pw_properties_set(props, PW_KEY_PORT_IGNORE_LATENCY, "true"); } - if (impl->media_type == SPA_MEDIA_TYPE_audio) { + if (impl->media_type == SPA_MEDIA_TYPE_audio + || (impl->media_type == SPA_MEDIA_TYPE_video + && pw_properties_get(props, "video.adapt.converter"))) { factory = pw_context_find_factory(impl->context, "adapter"); if (factory == NULL) { pw_log_error("%p: no adapter factory found", stream);