pipewire/spa/include/spa/param/buffers.h
Wim Taymans 00d983a40d meta: add metadata features
Add a new features property to the metadata param. This should be
of type CHOICE_FEATURES_Int and should contain the extra features
supported by this metadata.

Make a special features metadata type that is a combination of the
metadata type in the upper 16 bits and the features for that type in the
lower 16 bits. Make a function to search if a type has certain feature
bits.

On the server, when negotiating buffers and metadata, check the result
of the features after filtering and if they are not 0, place them as
0 sized extra feature metadata on the buffer.

Add some metadata features for the sync_timeline, one that specifies
that the RELEASE flag is supported. With this in place, a producer can
see if a consumer supports the UNSCHEDULED_RELEASE flag.

See #4885
2025-09-19 14:05:04 +02:00

54 lines
1.6 KiB
C

/* Simple Plugin API */
/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef SPA_PARAM_BUFFERS_H
#define SPA_PARAM_BUFFERS_H
#include <spa/param/param.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* \addtogroup spa_param
* \{
*/
/** properties for SPA_TYPE_OBJECT_ParamBuffers */
enum spa_param_buffers {
SPA_PARAM_BUFFERS_START,
SPA_PARAM_BUFFERS_buffers, /**< number of buffers (Int) */
SPA_PARAM_BUFFERS_blocks, /**< number of data blocks per buffer (Int) */
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 (flags choice Int, mask of enum spa_data_type) */
SPA_PARAM_BUFFERS_metaType, /**< required meta data types (Int, mask of enum spa_meta_type) */
};
/** properties for SPA_TYPE_OBJECT_ParamMeta */
enum spa_param_meta {
SPA_PARAM_META_START,
SPA_PARAM_META_type, /**< the metadata, one of enum spa_meta_type (Id enum spa_meta_type) */
SPA_PARAM_META_size, /**< the expected maximum size the meta (Int) */
SPA_PARAM_META_features, /**< meta data features (Features Int) */
};
/** properties for SPA_TYPE_OBJECT_ParamIO */
enum spa_param_io {
SPA_PARAM_IO_START,
SPA_PARAM_IO_id, /**< type ID, uniquely identifies the io area (Id enum spa_io_type) */
SPA_PARAM_IO_size, /**< size of the io area (Int) */
};
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* SPA_PARAM_BUFFERS_H */