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.
This commit is contained in:
columbarius 2023-08-31 01:34:21 +02:00
parent 805e5cf9c1
commit 324ec9df15

View file

@ -2096,7 +2096,9 @@ pw_stream_connect(struct pw_stream *stream,
pw_properties_set(props, PW_KEY_PORT_IGNORE_LATENCY, "true"); 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"); factory = pw_context_find_factory(impl->context, "adapter");
if (factory == NULL) { if (factory == NULL) {
pw_log_error("%p: no adapter factory found", stream); pw_log_error("%p: no adapter factory found", stream);