param: add dataType buffer parameter

The dataType parameter is a bitmask of allowed data types for the
buffer memory. Make the mask by or-ing all (1 << enum spa_data_type)
you accept/produce.
This commit is contained in:
Wim Taymans 2020-03-09 12:52:35 +01:00
parent 387fcfdc8a
commit 66f4834df3
2 changed files with 8 additions and 6 deletions

View file

@ -74,6 +74,7 @@ enum spa_param_buffers {
SPA_PARAM_BUFFERS_size, /**< size of a data block memory (Int)*/
SPA_PARAM_BUFFERS_stride, /**< stride of data block memory (Int) */
SPA_PARAM_BUFFERS_align, /**< alignment of data block memory (Int) */
SPA_PARAM_BUFFERS_dataType, /**< possible memory types (Int, mask of enum spa_data_type) */
};
/** properties for SPA_TYPE_OBJECT_ParamMeta */

View file

@ -264,6 +264,7 @@ static const struct spa_type_info spa_type_param_buffers[] = {
{ SPA_PARAM_BUFFERS_size, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_BLOCK_INFO_BASE "size", NULL },
{ SPA_PARAM_BUFFERS_stride, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_BLOCK_INFO_BASE "stride", NULL },
{ SPA_PARAM_BUFFERS_align, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_BLOCK_INFO_BASE "align", NULL },
{ SPA_PARAM_BUFFERS_dataType, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_BLOCK_INFO_BASE "dataType", NULL },
{ 0, 0, NULL, NULL },
};