2017-05-22 13:06:18 +02:00
|
|
|
/* Simple Plugin API
|
|
|
|
|
*
|
2018-11-05 17:48:52 +01:00
|
|
|
* Copyright © 2018 Wim Taymans
|
2017-05-22 13:06:18 +02:00
|
|
|
*
|
2018-11-05 17:48:52 +01:00
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
2017-05-22 13:06:18 +02:00
|
|
|
*
|
2018-11-05 17:48:52 +01:00
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
|
* Software.
|
|
|
|
|
*
|
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
|
* DEALINGS IN THE SOFTWARE.
|
2017-05-22 13:06:18 +02:00
|
|
|
*/
|
|
|
|
|
|
2019-01-14 12:58:23 +01:00
|
|
|
#ifndef SPA_PARAM_H
|
|
|
|
|
#define SPA_PARAM_H
|
2017-05-22 13:06:18 +02:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-10-02 20:55:53 +03:00
|
|
|
/** \defgroup spa_param Parameters
|
2021-10-04 00:00:41 +03:00
|
|
|
* Parameter value enumerations and type information
|
2021-05-21 14:03:07 +10:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* \addtogroup spa_param
|
|
|
|
|
* \{
|
|
|
|
|
*/
|
|
|
|
|
|
2017-11-10 13:36:14 +01:00
|
|
|
#include <spa/utils/defs.h>
|
2017-05-22 13:06:18 +02:00
|
|
|
|
2018-08-25 12:08:29 +02:00
|
|
|
/** different parameter types that can be queried */
|
|
|
|
|
enum spa_param_type {
|
2018-08-29 18:08:52 +02:00
|
|
|
SPA_PARAM_Invalid, /**< invalid */
|
2019-01-18 13:37:41 +01:00
|
|
|
SPA_PARAM_PropInfo, /**< property information as SPA_TYPE_OBJECT_PropInfo */
|
|
|
|
|
SPA_PARAM_Props, /**< properties as SPA_TYPE_OBJECT_Props */
|
|
|
|
|
SPA_PARAM_EnumFormat, /**< available formats as SPA_TYPE_OBJECT_Format */
|
|
|
|
|
SPA_PARAM_Format, /**< configured format as SPA_TYPE_OBJECT_Format */
|
|
|
|
|
SPA_PARAM_Buffers, /**< buffer configurations as SPA_TYPE_OBJECT_ParamBuffers*/
|
|
|
|
|
SPA_PARAM_Meta, /**< allowed metadata for buffers as SPA_TYPE_OBJECT_ParamMeta*/
|
|
|
|
|
SPA_PARAM_IO, /**< configurable IO areas as SPA_TYPE_OBJECT_ParamIO */
|
|
|
|
|
SPA_PARAM_EnumProfile, /**< profile enumeration as SPA_TYPE_OBJECT_ParamProfile */
|
|
|
|
|
SPA_PARAM_Profile, /**< profile configuration as SPA_TYPE_OBJECT_ParamProfile */
|
2019-08-06 12:45:20 +02:00
|
|
|
SPA_PARAM_EnumPortConfig, /**< port configuration enumeration as SPA_TYPE_OBJECT_ParamPortConfig */
|
|
|
|
|
SPA_PARAM_PortConfig, /**< port configuration as SPA_TYPE_OBJECT_ParamPortConfig */
|
2019-11-13 09:38:40 +01:00
|
|
|
SPA_PARAM_EnumRoute, /**< routing enumeration as SPA_TYPE_OBJECT_ParamRoute */
|
|
|
|
|
SPA_PARAM_Route, /**< routing configuration as SPA_TYPE_OBJECT_ParamRoute */
|
2020-02-05 10:01:14 +01:00
|
|
|
SPA_PARAM_Control, /**< Control parameter, a SPA_TYPE_Sequence */
|
2021-05-21 09:55:31 +02:00
|
|
|
SPA_PARAM_Latency, /**< latency reporting, a SPA_TYPE_OBJECT_ParamLatency */
|
2021-06-22 16:10:13 +02:00
|
|
|
SPA_PARAM_ProcessLatency, /**< processing latency, a SPA_TYPE_OBJECT_ParamProcessLatency */
|
2018-08-25 12:08:29 +02:00
|
|
|
};
|
|
|
|
|
|
2019-10-26 09:49:13 +02:00
|
|
|
/** information about a parameter */
|
|
|
|
|
struct spa_param_info {
|
|
|
|
|
uint32_t id; /**< enum spa_param_type */
|
|
|
|
|
#define SPA_PARAM_INFO_SERIAL (1<<0) /**< bit to signal update even when the
|
|
|
|
|
* read/write flags don't change */
|
|
|
|
|
#define SPA_PARAM_INFO_READ (1<<1)
|
|
|
|
|
#define SPA_PARAM_INFO_WRITE (1<<2)
|
|
|
|
|
#define SPA_PARAM_INFO_READWRITE (SPA_PARAM_INFO_WRITE|SPA_PARAM_INFO_READ)
|
|
|
|
|
uint32_t flags;
|
2020-03-06 15:13:12 +01:00
|
|
|
uint32_t user; /**< private user field. You can use this to keep
|
|
|
|
|
* state. */
|
2022-10-27 20:10:33 +02:00
|
|
|
int32_t seq; /**< private seq field. You can use this to keep
|
|
|
|
|
* state of a pending update. */
|
|
|
|
|
uint32_t padding[4];
|
2017-11-07 17:39:31 +01:00
|
|
|
};
|
2017-05-22 13:06:18 +02:00
|
|
|
|
2022-09-01 17:02:44 -04:00
|
|
|
#define SPA_PARAM_INFO(id,flags) ((struct spa_param_info){ (id), (flags) })
|
2019-10-26 09:49:13 +02:00
|
|
|
|
2023-01-13 10:59:35 +01:00
|
|
|
enum spa_param_bitorder {
|
|
|
|
|
SPA_PARAM_BITORDER_unknown, /**< unknown bitorder */
|
|
|
|
|
SPA_PARAM_BITORDER_msb, /**< most significant bit */
|
|
|
|
|
SPA_PARAM_BITORDER_lsb, /**< least significant bit */
|
2018-08-25 12:08:29 +02:00
|
|
|
};
|
2017-05-22 13:06:18 +02:00
|
|
|
|
2020-05-30 09:08:41 +02:00
|
|
|
enum spa_param_availability {
|
|
|
|
|
SPA_PARAM_AVAILABILITY_unknown, /**< unknown availability */
|
|
|
|
|
SPA_PARAM_AVAILABILITY_no, /**< not available */
|
|
|
|
|
SPA_PARAM_AVAILABILITY_yes, /**< available */
|
|
|
|
|
};
|
|
|
|
|
|
2023-01-13 10:59:35 +01:00
|
|
|
#include <spa/param/buffers.h>
|
|
|
|
|
#include <spa/param/profile.h>
|
|
|
|
|
#include <spa/param/port-config.h>
|
|
|
|
|
#include <spa/param/route.h>
|
2021-09-10 12:03:11 +02:00
|
|
|
|
2021-05-21 14:03:07 +10:00
|
|
|
/**
|
|
|
|
|
* \}
|
|
|
|
|
*/
|
|
|
|
|
|
2017-05-22 13:06:18 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
} /* extern "C" */
|
|
|
|
|
#endif
|
|
|
|
|
|
2019-01-14 12:58:23 +01:00
|
|
|
#endif /* SPA_PARAM_H */
|