From e13e81881f335be25f4e749a5a633b0fcf4d9e4d Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 9 Mar 2020 18:05:51 +0100 Subject: [PATCH] examples: use dataType mask Set the dataType mask to MemFd because that is what we can produce. Check the negotiated buffer data types. --- src/examples/video-src-alloc.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/examples/video-src-alloc.c b/src/examples/video-src-alloc.c index 3ce5e374b..77014bbc7 100644 --- a/src/examples/video-src-alloc.c +++ b/src/examples/video-src-alloc.c @@ -224,6 +224,11 @@ static void on_stream_add_buffer(void *_data, struct pw_buffer *buffer) d = buf->datas; + if ((d[0].type & (1<stride * data->format.size.height), - SPA_PARAM_BUFFERS_stride, SPA_POD_Int(data->stride), - SPA_PARAM_BUFFERS_align, SPA_POD_Int(16)); + SPA_PARAM_BUFFERS_buffers, SPA_POD_CHOICE_RANGE_Int(8, 2, MAX_BUFFERS), + SPA_PARAM_BUFFERS_blocks, SPA_POD_Int(1), + SPA_PARAM_BUFFERS_size, SPA_POD_Int(data->stride * data->format.size.height), + SPA_PARAM_BUFFERS_stride, SPA_POD_Int(data->stride), + SPA_PARAM_BUFFERS_align, SPA_POD_Int(16), + SPA_PARAM_BUFFERS_dataType, SPA_POD_CHOICE_FLAGS_Int(1<