From 7c2cf9c95384ea0182de26de0be905695b600cb7 Mon Sep 17 00:00:00 2001 From: Columbariu S Date: Tue, 6 Feb 2024 23:02:58 +0100 Subject: [PATCH] plugins/screencast: Announce size and stride only for SHM buffers DmaBufs don't have a welldefined size or stride. Clients and PipeWire shouldn't rely on those values. Therefore we better omit them. --- src/plugins/screencast/screencaststream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/screencast/screencaststream.cpp b/src/plugins/screencast/screencaststream.cpp index 63d9dddd46..5976e0c8fb 100644 --- a/src/plugins/screencast/screencaststream.cpp +++ b/src/plugins/screencast/screencaststream.cpp @@ -120,13 +120,13 @@ void ScreenCastStream::newStreamParams() struct spa_pod_frame f; spa_pod_builder_push_object(&pod_builder, &f, SPA_TYPE_OBJECT_ParamBuffers, SPA_PARAM_Buffers); spa_pod_builder_add(&pod_builder, - SPA_PARAM_BUFFERS_size, SPA_POD_Int(stride * m_resolution.height()), SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(16, 2, 16), - SPA_PARAM_BUFFERS_stride, SPA_POD_Int(stride), SPA_PARAM_BUFFERS_dataType, SPA_POD_CHOICE_FLAGS_Int(buffertypes), 0); if (!m_dmabufParams) { spa_pod_builder_add(&pod_builder, SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1), + SPA_PARAM_BUFFERS_size, SPA_POD_Int(stride * m_resolution.height()), + SPA_PARAM_BUFFERS_stride, SPA_POD_Int(stride), SPA_PARAM_BUFFERS_align, SPA_POD_Int(16), 0); } else { spa_pod_builder_add(&pod_builder,