PipeWire: param-types.h Source File

PipeWire 0.3.66

Loading...
Searching...
No Matches
param-types.h
Go to the documentation of this file.
1/* Simple Plugin API
2 *
3 * Copyright © 2018 Wim Taymans
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef SPA_PARAM_TYPES_H
26#define SPA_PARAM_TYPES_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
37#include <spa/param/props.h>
38#include <spa/param/format.h>
39#include <spa/buffer/type-info.h>
40
41/* base for parameter object enumerations */
42#define SPA_TYPE_INFO_ParamId SPA_TYPE_INFO_ENUM_BASE "ParamId"
43#define SPA_TYPE_INFO_PARAM_ID_BASE SPA_TYPE_INFO_ParamId ":"
44
45static const struct spa_type_info spa_type_param[] = {
46 { SPA_PARAM_Invalid, SPA_TYPE_None, SPA_TYPE_INFO_PARAM_ID_BASE "Invalid", NULL },
47 { SPA_PARAM_PropInfo, SPA_TYPE_OBJECT_PropInfo, SPA_TYPE_INFO_PARAM_ID_BASE "PropInfo", NULL },
48 { SPA_PARAM_Props, SPA_TYPE_OBJECT_Props, SPA_TYPE_INFO_PARAM_ID_BASE "Props", NULL },
49 { SPA_PARAM_EnumFormat, SPA_TYPE_OBJECT_Format, SPA_TYPE_INFO_PARAM_ID_BASE "EnumFormat", NULL },
50 { SPA_PARAM_Format, SPA_TYPE_OBJECT_Format, SPA_TYPE_INFO_PARAM_ID_BASE "Format", NULL },
51 { SPA_PARAM_Buffers, SPA_TYPE_OBJECT_ParamBuffers, SPA_TYPE_INFO_PARAM_ID_BASE "Buffers", NULL },
52 { SPA_PARAM_Meta, SPA_TYPE_OBJECT_ParamMeta, SPA_TYPE_INFO_PARAM_ID_BASE "Meta", NULL },
53 { SPA_PARAM_IO, SPA_TYPE_OBJECT_ParamIO, SPA_TYPE_INFO_PARAM_ID_BASE "IO", NULL },
54 { SPA_PARAM_EnumProfile, SPA_TYPE_OBJECT_ParamProfile, SPA_TYPE_INFO_PARAM_ID_BASE "EnumProfile", NULL },
55 { SPA_PARAM_Profile, SPA_TYPE_OBJECT_ParamProfile, SPA_TYPE_INFO_PARAM_ID_BASE "Profile", NULL },
56 { SPA_PARAM_EnumPortConfig, SPA_TYPE_OBJECT_ParamPortConfig, SPA_TYPE_INFO_PARAM_ID_BASE "EnumPortConfig", NULL },
57 { SPA_PARAM_PortConfig, SPA_TYPE_OBJECT_ParamPortConfig, SPA_TYPE_INFO_PARAM_ID_BASE "PortConfig", NULL },
58 { SPA_PARAM_EnumRoute, SPA_TYPE_OBJECT_ParamRoute, SPA_TYPE_INFO_PARAM_ID_BASE "EnumRoute", NULL },
59 { SPA_PARAM_Route, SPA_TYPE_OBJECT_ParamRoute, SPA_TYPE_INFO_PARAM_ID_BASE "Route", NULL },
60 { SPA_PARAM_Control, SPA_TYPE_Sequence, SPA_TYPE_INFO_PARAM_ID_BASE "Control", NULL },
61 { SPA_PARAM_Latency, SPA_TYPE_OBJECT_ParamLatency, SPA_TYPE_INFO_PARAM_ID_BASE "Latency", NULL },
62 { SPA_PARAM_ProcessLatency, SPA_TYPE_OBJECT_ParamProcessLatency, SPA_TYPE_INFO_PARAM_ID_BASE "ProcessLatency", NULL },
63 { 0, 0, NULL, NULL },
64};
65
66/* base for parameter objects */
67#define SPA_TYPE_INFO_Param SPA_TYPE_INFO_OBJECT_BASE "Param"
68#define SPA_TYPE_INFO_PARAM_BASE SPA_TYPE_INFO_Param ":"
69
70#include <spa/param/audio/type-info.h>
71
72static const struct spa_type_info spa_type_prop_float_array[] = {
73 { SPA_PROP_START, SPA_TYPE_Float, SPA_TYPE_INFO_BASE "floatArray", NULL, },
74 { 0, 0, NULL, NULL },
75};
76
77 static const struct spa_type_info spa_type_prop_channel_map[] = {
78 { SPA_PROP_START, SPA_TYPE_Id, SPA_TYPE_INFO_BASE "channelMap", spa_type_audio_channel, },
79 { 0, 0, NULL, NULL },
80};
81
82static const struct spa_type_info spa_type_prop_iec958_codec[] = {
83 { SPA_PROP_START, SPA_TYPE_Id, SPA_TYPE_INFO_BASE "iec958Codec", spa_type_audio_iec958_codec, },
84 { 0, 0, NULL, NULL },
85};
86
87#define SPA_TYPE_INFO_ParamBitorder SPA_TYPE_INFO_ENUM_BASE "ParamBitorder"
88#define SPA_TYPE_INFO_PARAM_BITORDER_BASE SPA_TYPE_INFO_ParamBitorder ":"
89
90static const struct spa_type_info spa_type_param_bitorder[] = {
91 { SPA_PARAM_BITORDER_unknown, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_BITORDER_BASE "unknown", NULL },
92 { SPA_PARAM_BITORDER_msb, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_BITORDER_BASE "msb", NULL },
93 { SPA_PARAM_BITORDER_lsb, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_BITORDER_BASE "lsb", NULL },
94 { 0, 0, NULL, NULL },
95};
96
97#define SPA_TYPE_INFO_ParamAvailability SPA_TYPE_INFO_ENUM_BASE "ParamAvailability"
98#define SPA_TYPE_INFO_PARAM_AVAILABILITY_BASE SPA_TYPE_INFO_ParamAvailability ":"
99
100static const struct spa_type_info spa_type_param_availability[] = {
101 { SPA_PARAM_AVAILABILITY_unknown, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_AVAILABILITY_BASE "unknown", NULL },
102 { SPA_PARAM_AVAILABILITY_no, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_AVAILABILITY_BASE "no", NULL },
103 { SPA_PARAM_AVAILABILITY_yes, SPA_TYPE_Int, SPA_TYPE_INFO_PARAM_AVAILABILITY_BASE "yes", NULL },
104 { 0, 0, NULL, NULL },
105};
106
111#ifdef __cplusplus
112} /* extern "C" */
113#endif
114
115#endif /* SPA_PARAM_TYPES_H */
type-info.h
spa/buffer/type-info.h
spa_type_prop_channel_map
static const struct spa_type_info spa_type_prop_channel_map[]
Definition: param-types.h:86
spa_type_param_availability
static const struct spa_type_info spa_type_param_availability[]
Definition: param-types.h:113
SPA_TYPE_INFO_PARAM_BITORDER_BASE
#define SPA_TYPE_INFO_PARAM_BITORDER_BASE
Definition: param-types.h:99
spa_type_prop_float_array
static const struct spa_type_info spa_type_prop_float_array[]
Definition: param-types.h:81
SPA_TYPE_INFO_PARAM_ID_BASE
#define SPA_TYPE_INFO_PARAM_ID_BASE
Definition: param-types.h:50
spa_type_audio_channel
static const struct spa_type_info spa_type_audio_channel[]
Definition: audio/raw-types.h:174
SPA_TYPE_INFO_PARAM_AVAILABILITY_BASE
#define SPA_TYPE_INFO_PARAM_AVAILABILITY_BASE
Definition: param-types.h:111
spa_type_param_bitorder
static const struct spa_type_info spa_type_param_bitorder[]
Definition: param-types.h:101
spa_type_param
static const struct spa_type_info spa_type_param[]
Definition: param-types.h:52
spa_type_prop_iec958_codec
static const struct spa_type_info spa_type_prop_iec958_codec[]
Definition: param-types.h:91
SPA_PROP_START
@ SPA_PROP_START
Definition: props.h:62
SPA_PARAM_BITORDER_unknown
@ SPA_PARAM_BITORDER_unknown
unknown bitorder
Definition: param.h:93
SPA_PARAM_BITORDER_msb
@ SPA_PARAM_BITORDER_msb
most significant bit
Definition: param.h:94
SPA_PARAM_BITORDER_lsb
@ SPA_PARAM_BITORDER_lsb
least significant bit
Definition: param.h:95
SPA_PARAM_Route
@ SPA_PARAM_Route
routing configuration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:63
SPA_PARAM_Format
@ SPA_PARAM_Format
configured format as SPA_TYPE_OBJECT_Format
Definition: param.h:54
SPA_PARAM_EnumRoute
@ SPA_PARAM_EnumRoute
routing enumeration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:62
SPA_PARAM_Meta
@ SPA_PARAM_Meta
allowed metadata for buffers as SPA_TYPE_OBJECT_ParamMeta
Definition: param.h:56
SPA_PARAM_IO
@ SPA_PARAM_IO
configurable IO areas as SPA_TYPE_OBJECT_ParamIO
Definition: param.h:57
SPA_PARAM_EnumProfile
@ SPA_PARAM_EnumProfile
profile enumeration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:58
SPA_PARAM_EnumPortConfig
@ SPA_PARAM_EnumPortConfig
port configuration enumeration as SPA_TYPE_OBJECT_ParamPortConfig
Definition: param.h:60
SPA_PARAM_EnumFormat
@ SPA_PARAM_EnumFormat
available formats as SPA_TYPE_OBJECT_Format
Definition: param.h:53
SPA_PARAM_Profile
@ SPA_PARAM_Profile
profile configuration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:59
SPA_PARAM_Latency
@ SPA_PARAM_Latency
latency reporting, a SPA_TYPE_OBJECT_ParamLatency
Definition: param.h:65
SPA_PARAM_PortConfig
@ SPA_PARAM_PortConfig
port configuration as SPA_TYPE_OBJECT_ParamPortConfig
Definition: param.h:61
SPA_PARAM_Control
@ SPA_PARAM_Control
Control parameter, a SPA_TYPE_Sequence.
Definition: param.h:64
SPA_PARAM_Props
@ SPA_PARAM_Props
properties as SPA_TYPE_OBJECT_Props
Definition: param.h:52
SPA_PARAM_PropInfo
@ SPA_PARAM_PropInfo
property information as SPA_TYPE_OBJECT_PropInfo
Definition: param.h:51
SPA_PARAM_Buffers
@ SPA_PARAM_Buffers
buffer configurations as SPA_TYPE_OBJECT_ParamBuffers
Definition: param.h:55
SPA_PARAM_ProcessLatency
@ SPA_PARAM_ProcessLatency
processing latency, a SPA_TYPE_OBJECT_ParamProcessLatency
Definition: param.h:66
SPA_PARAM_Invalid
@ SPA_PARAM_Invalid
invalid
Definition: param.h:50
SPA_PARAM_AVAILABILITY_unknown
@ SPA_PARAM_AVAILABILITY_unknown
unknown availability
Definition: param.h:99
SPA_PARAM_AVAILABILITY_yes
@ SPA_PARAM_AVAILABILITY_yes
available
Definition: param.h:101
SPA_PARAM_AVAILABILITY_no
@ SPA_PARAM_AVAILABILITY_no
not available
Definition: param.h:100
SPA_TYPE_INFO_BASE
#define SPA_TYPE_INFO_BASE
Definition: spa/include/spa/utils/type.h:115
SPA_TYPE_OBJECT_ParamPortConfig
@ SPA_TYPE_OBJECT_ParamPortConfig
Definition: spa/include/spa/utils/type.h:101
SPA_TYPE_Int
@ SPA_TYPE_Int
Definition: spa/include/spa/utils/type.h:54
SPA_TYPE_OBJECT_ParamProfile
@ SPA_TYPE_OBJECT_ParamProfile
Definition: spa/include/spa/utils/type.h:100
SPA_TYPE_OBJECT_PropInfo
@ SPA_TYPE_OBJECT_PropInfo
Definition: spa/include/spa/utils/type.h:94
SPA_TYPE_Float
@ SPA_TYPE_Float
Definition: spa/include/spa/utils/type.h:56
SPA_TYPE_OBJECT_ParamBuffers
@ SPA_TYPE_OBJECT_ParamBuffers
Definition: spa/include/spa/utils/type.h:97
SPA_TYPE_None
@ SPA_TYPE_None
Definition: spa/include/spa/utils/type.h:51
SPA_TYPE_OBJECT_ParamIO
@ SPA_TYPE_OBJECT_ParamIO
Definition: spa/include/spa/utils/type.h:99
SPA_TYPE_OBJECT_Props
@ SPA_TYPE_OBJECT_Props
Definition: spa/include/spa/utils/type.h:95
SPA_TYPE_Sequence
@ SPA_TYPE_Sequence
Definition: spa/include/spa/utils/type.h:66
SPA_TYPE_OBJECT_ParamLatency
@ SPA_TYPE_OBJECT_ParamLatency
Definition: spa/include/spa/utils/type.h:104
SPA_TYPE_Id
@ SPA_TYPE_Id
Definition: spa/include/spa/utils/type.h:53
SPA_TYPE_OBJECT_ParamProcessLatency
@ SPA_TYPE_OBJECT_ParamProcessLatency
Definition: spa/include/spa/utils/type.h:105
SPA_TYPE_OBJECT_ParamMeta
@ SPA_TYPE_OBJECT_ParamMeta
Definition: spa/include/spa/utils/type.h:98
SPA_TYPE_OBJECT_ParamRoute
@ SPA_TYPE_OBJECT_ParamRoute
Definition: spa/include/spa/utils/type.h:102
SPA_TYPE_OBJECT_Format
@ SPA_TYPE_OBJECT_Format
Definition: spa/include/spa/utils/type.h:96
format.h
spa/param/format.h
props.h
spa_type_info
Definition: spa/include/spa/utils/type.h:162