PipeWire  0.3.33
buffer/buffer.h
Go to the documentation of this file.
1 /* Simple Plugin API
2  * Copyright © 2018 Wim Taymans
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 #ifndef SPA_BUFFER_H
25 #define SPA_BUFFER_H
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
31 #include <spa/utils/defs.h>
32 #include <spa/buffer/meta.h>
33 
54 };
55 
57 struct spa_chunk {
58  uint32_t offset;
61  uint32_t size;
63  int32_t stride;
64 #define SPA_CHUNK_FLAG_NONE 0
65 #define SPA_CHUNK_FLAG_CORRUPTED (1u<<0)
66  int32_t flags;
67 };
68 
70 struct spa_data {
71  uint32_t type;
79 #define SPA_DATA_FLAG_NONE 0
80 #define SPA_DATA_FLAG_READABLE (1u<<0)
81 #define SPA_DATA_FLAG_WRITABLE (1u<<1)
82 #define SPA_DATA_FLAG_DYNAMIC (1u<<2)
83 #define SPA_DATA_FLAG_READWRITE (SPA_DATA_FLAG_READABLE|SPA_DATA_FLAG_WRITABLE)
84  uint32_t flags;
85  int64_t fd;
86  uint32_t mapoffset;
87  uint32_t maxsize;
88  void *data;
89  struct spa_chunk *chunk;
90 };
91 
93 struct spa_buffer {
94  uint32_t n_metas;
95  uint32_t n_datas;
96  struct spa_meta *metas;
97  struct spa_data *datas;
98 };
99 
101 /* static */ inline struct spa_meta *spa_buffer_find_meta(const struct spa_buffer *b, uint32_t type)
102 {
103  uint32_t i;
104 
105  for (i = 0; i < b->n_metas; i++)
106  if (b->metas[i].type == type)
107  return &b->metas[i];
108 
109  return NULL;
110 }
111 
112 /* static */ inline void *spa_buffer_find_meta_data(const struct spa_buffer *b, uint32_t type, size_t size)
113 {
114  struct spa_meta *m;
115  if ((m = spa_buffer_find_meta(b, type)) && m->size >= size)
116  return m->data;
117  return NULL;
118 }
119 
124 #ifdef __cplusplus
125 } /* extern "C" */
126 #endif
127 
128 #endif /* SPA_BUFFER_H */
PW_KEY_DEVICE_NAME
#define PW_KEY_DEVICE_NAME
device name
Definition: src/pipewire/keys.h:211
pw_context_get_main_loop
struct pw_loop * pw_context_get_main_loop(struct pw_context *context)
get the context main loop
Definition: context.c:567
PW_DIRECTION_INPUT
#define PW_DIRECTION_INPUT
Definition: port.h:57
sm_media_session_create_object
struct pw_proxy * sm_media_session_create_object(struct sm_media_session *sess, const char *factory_name, const char *type, uint32_t version, const struct spa_dict *props, size_t user_data_size)
Definition: media-session.c:1692
PW_KEY_DEVICE_BUS
#define PW_KEY_DEVICE_BUS
bus of the device if applicable.
Definition: src/pipewire/keys.h:234
spa_meta::data
void * data
pointer to metadata
Definition: meta.h:64
pw_properties_get
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
spa_data::maxsize
uint32_t maxsize
max size of data
Definition: buffer/buffer.h:87
spa_pod_object
Definition: pod/pod.h:175
spa_audio_info_raw::rate
uint32_t rate
Definition: audio/raw.h:288
SPA_PARAM_Profile
@ SPA_PARAM_Profile
profile configuration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:53
impl::switched
bool switched
Definition: bluez-autoswitch.c:75
PW_KEY_MEDIA_ROLE
#define PW_KEY_MEDIA_ROLE
Role: Movie, Music, Camera, Screen, Communication, Game, Notification, DSP, Production,...
Definition: src/pipewire/keys.h:281
pw_properties_iterate
const char * pw_properties_iterate(const struct pw_properties *properties, void **state)
Iterate property values.
Definition: properties.c:510
spa_direction
spa_direction
Definition: defs.h:78
device::listener
struct spa_hook listener
Definition: alsa-monitor.c:105
node::props
struct pw_properties * props
Definition: alsa-monitor.c:74
impl::device_list
struct spa_list device_list
Definition: alsa-monitor.c:128
endpoint::format
struct spa_audio_info format
Definition: alsa-endpoint.c:86
PW_VERSION_NODE
#define PW_VERSION_NODE
Definition: src/pipewire/node.h:52
sm_media_session_add_listener
int sm_media_session_add_listener(struct sm_media_session *sess, struct spa_hook *listener, const struct sm_media_session_events *events, void *data)
Definition: media-session.c:1519
endpoint::impl
struct impl * impl
Definition: alsa-endpoint.c:67
sm_media_session_sanitize_description
char * sm_media_session_sanitize_description(char *name, int size, char sub, const char *fmt,...)
Definition: media-session.c:2059
SPA_POD_Pod
#define SPA_POD_Pod(val)
Definition: vararg.h:100
PW_TYPE_INTERFACE_Device
#define PW_TYPE_INTERFACE_Device
Definition: src/pipewire/device.h:37
device::priority
int priority
Definition: alsa-monitor.c:93
PW_KEY_DEVICE_CLASS
#define PW_KEY_DEVICE_CLASS
device class
Definition: src/pipewire/keys.h:228
SPA_POD_Int
#define SPA_POD_Int(val)
Definition: vararg.h:59
pw_properties_update
int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict)
Update properties.
Definition: properties.c:298
SPA_PARAM_PROFILE_name
@ SPA_PARAM_PROFILE_name
profile name (String)
Definition: param.h:114
pw_loop_update_timer
#define pw_loop_update_timer(l,...)
Definition: src/pipewire/loop.h:78
SPA_TYPE_INTERFACE_Device
#define SPA_TYPE_INTERFACE_Device
Definition: build-12775836/doc/spa/monitor/device.h:50
pw_core_info
The core information.
Definition: core.h:73
stream::link
struct spa_list link
Definition: alsa-endpoint.c:92
format-utils.h
endpoint::params
struct spa_param_info params[5]
Definition: alsa-endpoint.c:79
node::direction
enum pw_direction direction
Definition: alsa-monitor.c:69
find_data::type
const char * type
Definition: bluez-autoswitch.c:87
SPA_PARAM_PORT_CONFIG_format
@ SPA_PARAM_PORT_CONFIG_format
(Object) format filter
Definition: param.h:151
SPA_KEY_API_BLUEZ5_PROFILE
#define SPA_KEY_API_BLUEZ5_PROFILE
a bluetooth profile
Definition: build-12775836/doc/spa/utils/keys.h:122
spa_buffer::n_datas
uint32_t n_datas
number of data members
Definition: buffer/buffer.h:95
SPA_KEY_DEVICE_NICK
#define SPA_KEY_DEVICE_NICK
the device short name
Definition: build-12775836/doc/spa/monitor/device.h:264
spa_json_enter_object
int spa_json_enter_object(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:214
spa_device
Definition: build-12775836/doc/spa/monitor/device.h:53
endpoint::monitor
struct endpoint * monitor
Definition: alsa-endpoint.c:81
name
const char * name
Definition: media-session.c:2379
string.h
SPA_TYPE_EVENT_Device
@ SPA_TYPE_EVENT_Device
Definition: build-12775836/doc/spa/utils/type.h:76
spa_node_info::props
struct spa_dict * props
extra node properties
Definition: build-12775836/doc/spa/node/node.h:82
node::link
struct spa_list link
link in impl node_list
Definition: module-filter-chain.c:156
sm_bluez5_autoswitch_start
int sm_bluez5_autoswitch_start(struct sm_media_session *session)
Definition: bluez-autoswitch.c:581
data
user data to add to an object
Definition: filter.c:75
SPA_DATA_DmaBuf
@ SPA_DATA_DmaBuf
fd to dmabuf memory
Definition: buffer/buffer.h:50
SPA_KEY_DEVICE_DESCRIPTION
#define SPA_KEY_DEVICE_DESCRIPTION
a device description
Definition: build-12775836/doc/spa/monitor/device.h:265
impl::data
uint8_t data[MAX_BUFFER]
Definition: module-profiler.c:87
spa_streq
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
spa_list_for_each
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
spa_device_object_info::props
const struct spa_dict * props
extra object properties
Definition: build-12775836/doc/spa/monitor/device.h:92
pw_proxy_get_user_data
void * pw_proxy_get_user_data(struct pw_proxy *proxy)
Get the user_data.
Definition: proxy.c:146
device::impl
struct impl * impl
Definition: alsa-monitor.c:83
node::obj
struct sm_node * obj
Definition: bluez-autoswitch.c:79
sm_media_session_sync
int sm_media_session_sync(struct sm_media_session *sess, void(*callback)(void *data), void *data)
Definition: media-session.c:1582
endpoint::info
struct pw_endpoint_info info
Definition: alsa-endpoint.c:77
spa_atou32
bool spa_atou32(const char *str, uint32_t *val, int base)
Convert str to an uint32_t with the given base and store the result in val.
Definition: string.h:137
pw_loop
Definition: src/pipewire/loop.h:47
spa_chunk::stride
int32_t stride
stride of valid data
Definition: buffer/buffer.h:63
pw_device_set_param
#define pw_device_set_param(c,...)
Definition: src/pipewire/device.h:156
find_data::obj
struct sm_object * obj
Definition: bluez-autoswitch.c:90
spa_format_audio_raw_build
struct spa_pod * spa_format_audio_raw_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_raw *info)
Definition: audio/format-utils.h:72
SPA_DIRECTION_INPUT
@ SPA_DIRECTION_INPUT
Definition: defs.h:79
impl::listener
struct spa_hook listener
Definition: access-flatpak.c:46
device
Definition: alsa-monitor.c:82
node
Definition: module-filter-chain.c:155
node::listener
struct spa_hook listener
Definition: bluez-autoswitch.c:81
impl
Definition: control.c:33
sm_object_destroy
int sm_object_destroy(struct sm_object *obj)
Definition: media-session.c:359
spa_audio_info::raw
struct spa_audio_info_raw raw
Definition: param/audio/format.h:44
pw_proxy_destroy
void pw_proxy_destroy(struct pw_proxy *proxy)
destroy a proxy
Definition: proxy.c:229
impl::old_profiles
struct pw_properties * old_profiles
Definition: bluez-autoswitch.c:74
impl::props
struct pw_properties * props
Definition: module-example-sink.c:81
SPA_PARAM_PORT_CONFIG_direction
@ SPA_PARAM_PORT_CONFIG_direction
direction, input/output (Id enum spa_direction)
Definition: param.h:147
pw_node_subscribe_params
#define pw_node_subscribe_params(c,...)
Definition: src/pipewire/node.h:199
SPA_PARAM_INFO_READ
#define SPA_PARAM_INFO_READ
Definition: param.h:68
SESSION_CONF
#define SESSION_CONF
Definition: bluez-monitor.c:54
spa_pod_object_fixate
int spa_pod_object_fixate(struct spa_pod_object *pod)
Definition: iter.h:431
spa_buffer_find_meta
struct spa_meta * spa_buffer_find_meta(const struct spa_buffer *b, uint32_t type)
Find metadata in a buffer.
Definition: buffer/buffer.h:101
pw_proxy_events
Proxy events, use pw_proxy_add_listener.
Definition: proxy.h:111
node.h
SPA_EVENT_DEVICE_Object
@ SPA_EVENT_DEVICE_Object
Definition: monitor/event.h:46
spa_list
Definition: list.h:37
device::profile
int profile
Definition: alsa-monitor.c:95
SPA_MEDIA_TYPE_audio
@ SPA_MEDIA_TYPE_audio
Definition: param/format.h:42
sm_media_session_match_rules
int sm_media_session_match_rules(const char *rules, size_t size, struct pw_properties *props)
Definition: match-rules.c:91
impl::session_listener
struct spa_hook session_listener
Definition: alsa-monitor.c:118
sm_bluez5_monitor_start
int sm_bluez5_monitor_start(struct sm_media_session *session)
Definition: bluez-monitor.c:718
handle
Definition: pipewire.c:68
spa_strstartswith
bool spa_strstartswith(const char *s, const char *prefix)
Definition: string.h:71
impl::id
uint32_t id
Definition: module-echo-cancel.c:139
pw_properties_new_dict
struct pw_properties * pw_properties_new_dict(const struct spa_dict *dict)
Make a new properties object from the given dictionary.
Definition: properties.c:126
SPA_POD_OPT_Int
#define SPA_POD_OPT_Int(val)
Definition: parser.h:521
PW_KEY_NODE_AUTOCONNECT
#define PW_KEY_NODE_AUTOCONNECT
node wants to be automatically connected to a compatible node
Definition: src/pipewire/keys.h:150
NAME
#define NAME
Definition: bluez-endpoint.c:52
sm_bluez5_endpoint_start
int sm_bluez5_endpoint_start(struct sm_media_session *session)
Definition: bluez-endpoint.c:686
DEFAULT_AUDIO_SINK_KEY
#define DEFAULT_AUDIO_SINK_KEY
Definition: bluez-autoswitch.c:58
SPA_POD_BUILDER_INIT
#define SPA_POD_BUILDER_INIT(buffer, size)
Definition: builder.h:71
props
const char * props
Definition: media-session.c:2382
PW_KEY_DEVICE_FORM_FACTOR
#define PW_KEY_DEVICE_FORM_FACTOR
form factor if applicable.
Definition: src/pipewire/keys.h:229
impl::info
struct spa_audio_info_raw info
Definition: module-echo-cancel.c:145
SPA_PARAM_Props
@ SPA_PARAM_Props
properties as SPA_TYPE_OBJECT_Props
Definition: param.h:46
pod.h
impl.h
spa_source
Definition: build-12775836/doc/spa/support/loop.h:58
SPA_PARAM_PORT_CONFIG_MODE_dsp
@ SPA_PARAM_PORT_CONFIG_MODE_dsp
dsp configuration, depending on the external format.
Definition: param.h:139
spa_audio_info_raw::channels
uint32_t channels
Definition: audio/raw.h:289
pw_properties::dict
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
pw_loop_destroy_source
#define pw_loop_destroy_source(l,...)
Definition: src/pipewire/loop.h:80
stream
Definition: stream.c:97
spa_data::flags
uint32_t flags
data flags
Definition: buffer/buffer.h:84
SPA_CONTAINER_OF
#define SPA_CONTAINER_OF(p, t, m)
Definition: defs.h:170
SPA_KEY_API_BLUEZ5_CONNECTION
#define SPA_KEY_API_BLUEZ5_CONNECTION
bluez5 device connection status
Definition: build-12775836/doc/spa/utils/keys.h:120
node::communication
unsigned char communication
Definition: bluez-autoswitch.c:83
RESTORE_DELAY_SEC
#define RESTORE_DELAY_SEC
Definition: bluez-autoswitch.c:56
SPA_PARAM_INFO
#define SPA_PARAM_INFO(id, flags)
Definition: param.h:77
SPA_PARAM_Format
@ SPA_PARAM_Format
configured format as SPA_TYPE_OBJECT_Format
Definition: param.h:48
spa_list_consume
#define spa_list_consume(pos, head, member)
Definition: list.h:96
stream::format
struct spa_audio_info format
Definition: alsa-endpoint.c:98
SPA_TYPE_INTERFACE_Node
#define SPA_TYPE_INTERFACE_Node
Definition: build-12775836/doc/spa/node/node.h:50
endpoint::props
struct pw_properties * props
Definition: alsa-endpoint.c:69
node::impl
struct impl * impl
Definition: alsa-monitor.c:68
spa_buffer::metas
struct spa_meta * metas
array of metadata
Definition: buffer/buffer.h:96
PW_KEY_LINK_INPUT_NODE
#define PW_KEY_LINK_INPUT_NODE
input node id of a link
Definition: src/pipewire/keys.h:198
spa_pod
Definition: pod/pod.h:50
PW_VERSION_PROXY_EVENTS
#define PW_VERSION_PROXY_EVENTS
Definition: proxy.h:112
SPA_DEVICE_EVENT_ObjectConfig
@ SPA_DEVICE_EVENT_ObjectConfig
Definition: monitor/event.h:36
device::sdevice
struct sm_device * sdevice
Definition: alsa-monitor.c:104
endpoint::client_endpoint
struct pw_client_endpoint * client_endpoint
Definition: alsa-endpoint.c:74
spa_chunk::offset
uint32_t offset
offset of valid data.
Definition: buffer/buffer.h:58
SPA_TYPE_OBJECT_ParamProfile
@ SPA_TYPE_OBJECT_ParamProfile
Definition: build-12775836/doc/spa/utils/type.h:94
meta.h
dict.h
PW_DIRECTION_OUTPUT
#define PW_DIRECTION_OUTPUT
Definition: port.h:58
NAME
#define NAME
Definition: bluez-autoswitch.c:53
node::active
unsigned char active
Definition: bluez-autoswitch.c:82
spa_list_remove
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
keys.h
sm_media_session_create_links
int sm_media_session_create_links(struct sm_media_session *sess, const struct spa_dict *dict)
Definition: media-session.c:1901
impl::handle
struct spa_handle * handle
Definition: alsa-monitor.c:123
spa_format_audio_raw_parse
int spa_format_audio_raw_parse(const struct spa_pod *format, struct spa_audio_info_raw *info)
Definition: audio/format-utils.h:43
PW_KEY_LINK_INPUT_PORT
#define PW_KEY_LINK_INPUT_PORT
input port id of a link
Definition: src/pipewire/keys.h:199
PW_TYPE_INTERFACE_Node
#define PW_TYPE_INTERFACE_Node
Definition: src/pipewire/node.h:50
SESSION_KEY
#define SESSION_KEY
Definition: bluez-endpoint.c:53
spa_buffer::n_metas
uint32_t n_metas
number of metadata
Definition: buffer/buffer.h:94
spa_buffer
A Buffer.
Definition: buffer/buffer.h:93
SPA_PARAM_PORT_CONFIG_monitor
@ SPA_PARAM_PORT_CONFIG_monitor
(Bool) enable monitor output ports on input ports
Definition: param.h:149
endpoint::node
struct node * node
Definition: alsa-endpoint.c:71
PW_KEY_NODE_DESCRIPTION
#define PW_KEY_NODE_DESCRIPTION
localized human readable node one-line description.
Definition: src/pipewire/keys.h:140
SPA_PARAM_PortConfig
@ SPA_PARAM_PortConfig
port configuration as SPA_TYPE_OBJECT_ParamPortConfig
Definition: param.h:55
spa_device_object_info::factory_name
const char * factory_name
a factory name that implements the object
Definition: build-12775836/doc/spa/monitor/device.h:86
PW_KEY_NODE_NAME
#define PW_KEY_NODE_NAME
node name
Definition: src/pipewire/keys.h:138
spa_node
Definition: build-12775836/doc/spa/node/node.h:53
PW_KEY_DEVICE_API
#define PW_KEY_DEVICE_API
API this device is accessed with.
Definition: src/pipewire/keys.h:217
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
_SPA_DATA_LAST
@ _SPA_DATA_LAST
not part of ABI
Definition: buffer/buffer.h:53
FEATURES_CONF
#define FEATURES_CONF
Definition: bluez-monitor.c:55
spa_data::type
uint32_t type
memory type, one of enum spa_data_type, when allocating memory, the type contains a bitmask of allowe...
Definition: buffer/buffer.h:71
SPA_KEY_DEVICE_NAME
#define SPA_KEY_DEVICE_NAME
the name of the device
Definition: build-12775836/doc/spa/monitor/device.h:262
node::adapter
struct pw_impl_node * adapter
Definition: bluez-monitor.c:68
pw_impl_node_get_implementation
struct spa_node * pw_impl_node_get_implementation(struct pw_impl_node *node)
Get the node implementation.
Definition: impl-node.c:1686
spa_json_init
void spa_json_init(struct spa_json *iter, const char *data, size_t size)
Definition: json.h:59
sm_media_session_load_state
int sm_media_session_load_state(struct sm_media_session *sess, const char *name, struct pw_properties *props)
Definition: media-session.c:2019
sm_object_remove_data
int sm_object_remove_data(struct sm_object *obj, const char *id)
Definition: media-session.c:290
spa_handle
Definition: plugin.h:44
PW_KEY_PRIORITY_DRIVER
#define PW_KEY_PRIORITY_DRIVER
priority to be a driver
Definition: src/pipewire/keys.h:98
SPA_KEY_DEVICE_ALIAS
#define SPA_KEY_DEVICE_ALIAS
alternative name of the device
Definition: build-12775836/doc/spa/monitor/device.h:263
sm_object_get_data
void * sm_object_get_data(struct sm_object *obj, const char *id)
Definition: media-session.c:281
sm_media_session_export_node
struct sm_node * sm_media_session_export_node(struct sm_media_session *sess, const struct spa_dict *props, struct pw_impl_node *object)
Definition: media-session.c:1654
SPA_LOG_LEVEL_DEBUG
@ SPA_LOG_LEVEL_DEBUG
Definition: build-12775836/doc/spa/support/log.h:51
SPA_FLAG_IS_SET
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:73
spa_param_info
information about a parameter
Definition: param.h:64
spa_list_init
void spa_list_init(struct spa_list *list)
Definition: list.h:44
node::node
struct spa_node * node
Definition: alsa-monitor.c:76
PW_KEY_LINK_OUTPUT_PORT
#define PW_KEY_LINK_OUTPUT_PORT
output port id of a link
Definition: src/pipewire/keys.h:201
spa_meta
A metadata element.
Definition: meta.h:61
spa_pod_builder_init
void spa_pod_builder_init(struct spa_pod_builder *builder, void *data, uint32_t size)
Definition: builder.h:96
find_data::id
uint32_t id
Definition: bluez-autoswitch.c:89
SPA_PARAM_EnumRoute
@ SPA_PARAM_EnumRoute
routing enumeration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:56
device::handle
struct spa_handle * handle
Definition: alsa-monitor.c:100
SPA_VERSION_DEVICE_EVENTS
#define SPA_VERSION_DEVICE_EVENTS
version of the structure
Definition: build-12775836/doc/spa/monitor/device.h:119
SPA_PARAM_ROUTE_direction
@ SPA_PARAM_ROUTE_direction
direction, input/output (Id enum spa_direction)
Definition: param.h:158
PW_KEY_STREAM_MONITOR
#define PW_KEY_STREAM_MONITOR
Indicates that the stream is monitoring and might select a less accurate but faster conversion algori...
Definition: src/pipewire/keys.h:269
spa_data::chunk
struct spa_chunk * chunk
valid chunk of memory
Definition: buffer/buffer.h:89
pw_log_level_enabled
#define pw_log_level_enabled(lev)
Check if a loglevel is enabled.
Definition: src/pipewire/log.h:78
spa_dict
Definition: utils/dict.h:48
impl::seat_active
bool seat_active
Definition: bluez-monitor.c:100
spa_node_set_param
#define spa_node_set_param(n,...)
Definition: build-12775836/doc/spa/node/node.h:652
SPA_POD_Bool
#define SPA_POD_Bool(val)
Definition: vararg.h:53
spa_meta::type
uint32_t type
metadata type, one of enum spa_meta_type
Definition: meta.h:62
device.h
spa_data_type
spa_data_type
Definition: buffer/buffer.h:45
spa_device_object_info::type
const char * type
the object type managed by this device
Definition: build-12775836/doc/spa/monitor/device.h:85
sm_object_add_listener
int sm_object_add_listener(struct sm_object *obj, struct spa_hook *listener, const struct sm_object_events *events, void *data)
Definition: media-session.c:1512
pw_node_set_param
#define pw_node_set_param(c,...)
Definition: src/pipewire/node.h:201
spa_debug_dict
int spa_debug_dict(int indent, const struct spa_dict *dict)
Definition: debug/dict.h:43
find_data
Definition: bluez-autoswitch.c:86
spa_dict_lookup
const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:99
SPA_DATA_MemId
@ SPA_DATA_MemId
memory is identified with an id
Definition: buffer/buffer.h:51
spa_json_get_string
int spa_json_get_string(struct spa_json *iter, char *res, int maxlen)
Definition: json.h:360
spa_audio_info
Definition: param/audio/format.h:40
stream::info
struct spa_node_info info
Definition: stream.c:137
node::snode
struct sm_node * snode
Definition: alsa-monitor.c:78
SPA_PARAM_EnumFormat
@ SPA_PARAM_EnumFormat
available formats as SPA_TYPE_OBJECT_Format
Definition: param.h:47
SPA_PARAM_EnumProfile
@ SPA_PARAM_EnumProfile
profile enumeration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:52
spa_pod_parse_object
#define spa_pod_parse_object(pod, type, id,...)
Definition: parser.h:560
pw_context_load_spa_handle
struct spa_handle * pw_context_load_spa_handle(struct pw_context *context, const char *factory_name, const struct spa_dict *info)
Definition: context.c:1340
spa_strerror
#define spa_strerror(err)
Definition: result.h:51
spa_buffer_find_meta_data
void * spa_buffer_find_meta_data(const struct spa_buffer *b, uint32_t type, size_t size)
Definition: buffer/buffer.h:112
endpoint::link
struct spa_list link
link in impl endpoint_list
Definition: alsa-endpoint.c:65
result.h
device::id
uint32_t id
Definition: alsa-monitor.c:85
node::device
struct device * device
Definition: alsa-monitor.c:70
PW_ID_CORE
#define PW_ID_CORE
default ID for the core object after connect
Definition: core.h:66
sm_media_session_find_object
struct sm_object * sm_media_session_find_object(struct sm_media_session *sess, uint32_t id)
Definition: media-session.c:1539
spa_pod_get_array
void * spa_pod_get_array(const struct spa_pod *pod, uint32_t *n_values)
Definition: iter.h:337
param
Definition: filter.c:80
pw_loop_add_timer
#define pw_loop_add_timer(l,...)
Definition: src/pipewire/loop.h:77
pw_log_debug
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
spa_format_parse
int spa_format_parse(const struct spa_pod *format, uint32_t *media_type, uint32_t *media_subtype)
Definition: format-utils.h:42
device::device_listener
struct spa_hook device_listener
Definition: alsa-monitor.c:102
PW_KEY_LINK_OUTPUT_NODE
#define PW_KEY_LINK_OUTPUT_NODE
output node id of a link
Definition: src/pipewire/keys.h:200
spa_json_next
int spa_json_next(struct spa_json *iter, const char **value)
Get the next token.
Definition: json.h:74
impl::meta_listener
struct spa_hook meta_listener
Definition: bluez-autoswitch.c:64
device::endpoint_list
struct spa_list endpoint_list
Definition: alsa-endpoint.c:118
spa_handle_get_interface
#define spa_handle_get_interface(h,...)
Definition: plugin.h:73
endpoint::id
uint32_t id
Definition: policy-ep.c:71
impl::conf
struct pw_properties * conf
Definition: alsa-monitor.c:120
SESSION_KEY
#define SESSION_KEY
Definition: bluez-autoswitch.c:54
endpoint
Definition: alsa-endpoint.c:64
impl::monitor
struct spa_device * monitor
Definition: alsa-monitor.c:125
endpoint::proxy_listener
struct spa_hook proxy_listener
Definition: alsa-endpoint.c:75
sm_media_session_export_device
struct sm_device * sm_media_session_export_device(struct sm_media_session *sess, const struct spa_dict *props, struct spa_device *object)
Definition: media-session.c:1673
SPA_ID_INVALID
#define SPA_ID_INVALID
Definition: defs.h:182
pw_unload_spa_handle
int pw_unload_spa_handle(struct spa_handle *handle)
Definition: pipewire.c:321
pw_context_find_factory
struct pw_impl_factory * pw_context_find_factory(struct pw_context *context, const char *name)
Find a factory by name.
Definition: impl-factory.c:287
SPA_PARAM_ROUTE_profiles
@ SPA_PARAM_ROUTE_profiles
associated profile indexes (Array of Int)
Definition: param.h:169
impl::context
struct pw_context * context
Definition: settings.c:43
PW_KEY_MEDIA_CLASS
#define PW_KEY_MEDIA_CLASS
class Ex: "Video/Source"
Definition: src/pipewire/keys.h:285
pw_properties_update_string
int pw_properties_update_string(struct pw_properties *props, const char *str, size_t size)
Update the properties from the given string, overwriting any existing keys with the new values from s...
Definition: properties.c:154
pw_properties_set
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:435
impl::session
struct sm_media_session * session
Definition: access-flatpak.c:45
stream::props
struct pw_properties * props
Definition: alsa-endpoint.c:95
spa_data::mapoffset
uint32_t mapoffset
offset to map fd at
Definition: buffer/buffer.h:86
parser.h
spa_pod::type
uint32_t type
Definition: pod/pod.h:52
stream::endpoint
struct endpoint * endpoint
Definition: alsa-endpoint.c:93
spa_chunk::size
uint32_t size
size of valid data.
Definition: buffer/buffer.h:61
sm_object_add_data
void * sm_object_add_data(struct sm_object *obj, const char *id, size_t size)
Definition: media-session.c:261
SPA_DATA_MemFd
@ SPA_DATA_MemFd
generic fd, mmap to get to memory
Definition: buffer/buffer.h:49
SPA_PARAM_PROFILE_priority
@ SPA_PARAM_PROFILE_priority
profile priority (Int)
Definition: param.h:116
PW_KEY_DEVICE_ID
#define PW_KEY_DEVICE_ID
device properties
Definition: src/pipewire/keys.h:210
PW_KEY_DEVICE_ICON_NAME
#define PW_KEY_DEVICE_ICON_NAME
an XDG icon name for the device.
Definition: src/pipewire/keys.h:240
PW_CORE_CHANGE_MASK_PROPS
#define PW_CORE_CHANGE_MASK_PROPS
Definition: core.h:80
SPA_TYPE_OBJECT_ParamRoute
@ SPA_TYPE_OBJECT_ParamRoute
Definition: build-12775836/doc/spa/utils/type.h:96
sm_media_session_load_conf
int sm_media_session_load_conf(struct sm_media_session *sess, const char *name, struct pw_properties *conf)
Definition: media-session.c:2013
endpoint::client_endpoint_listener
struct spa_hook client_endpoint_listener
Definition: alsa-endpoint.c:76
PW_KEY_FACTORY_NAME
#define PW_KEY_FACTORY_NAME
the name of the factory
Definition: src/pipewire/keys.h:260
SPA_DATA_MemPtr
@ SPA_DATA_MemPtr
pointer to memory, the data field in struct spa_data is set.
Definition: buffer/buffer.h:47
pw_log_warn
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
device::device
struct spa_device * device
Definition: alsa-monitor.c:101
sm_object_sync_update
int sm_object_sync_update(struct sm_object *obj)
Definition: media-session.c:1163
SPA_POD_String
#define SPA_POD_String(val)
Definition: vararg.h:81
spa_buffer::datas
struct spa_data * datas
array of data members
Definition: buffer/buffer.h:97
spa_data
Data for a buffer this stays constant for a buffer.
Definition: buffer/buffer.h:70
device::node_list
struct spa_list node_list
Definition: alsa-monitor.c:113
stream::active
unsigned int active
Definition: alsa-endpoint.c:100
node::type
uint32_t type
Definition: policy-node.c:116
SPA_PARAM_PROFILE_index
@ SPA_PARAM_PROFILE_index
profile index (Int)
Definition: param.h:113
spa_event::pod
struct spa_pod pod
Definition: pod/event.h:44
json.h
device::device_id
uint32_t device_id
Definition: alsa-monitor.c:86
sm_media_session_save_state
int sm_media_session_save_state(struct sm_media_session *sess, const char *name, const struct pw_properties *props)
Definition: media-session.c:2025
spa_pod_builder_add_object
#define spa_pod_builder_add_object(b, type, id,...)
Definition: builder.h:650
pw_properties_copy
struct pw_properties * pw_properties_copy(const struct pw_properties *properties)
Copy a properties object.
Definition: properties.c:222
spa_event
Definition: pod/event.h:43
SPA_KEY_DEVICE_ICON_NAME
#define SPA_KEY_DEVICE_ICON_NAME
an XDG icon name for the device.
Definition: build-12775836/doc/spa/monitor/device.h:268
event.h
spa_audio_info::info
union spa_audio_info::@5 info
pw_proxy_add_listener
void pw_proxy_add_listener(struct pw_proxy *proxy, struct spa_hook *listener, const struct pw_proxy_events *events, void *data)
Add an event listener to proxy.
Definition: proxy.c:195
defs.h
spa_hook_remove
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
spa_meta::size
uint32_t size
size of metadata
Definition: meta.h:63
SPA_PARAM_PORT_CONFIG_mode
@ SPA_PARAM_PORT_CONFIG_mode
(Id enum spa_param_port_config_mode) mode
Definition: param.h:148
pw_log_info
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
spa_data::fd
int64_t fd
optional fd for data
Definition: buffer/buffer.h:85
NAME
#define NAME
Definition: bluez-monitor.c:53
endpoint::listener
struct spa_hook listener
Definition: alsa-endpoint.c:72
pw_impl_node_destroy
void pw_impl_node_destroy(struct pw_impl_node *node)
Destroy a node.
Definition: impl-node.c:1707
device::obj
struct sm_device * obj
Definition: default-profile.c:101
SPA_PARAM_INFO_READWRITE
#define SPA_PARAM_INFO_READWRITE
Definition: param.h:70
spa_debug_pod
int spa_debug_pod(int indent, const struct spa_type_info *info, const struct spa_pod *pod)
Definition: debug/pod.h:200
spa_data::data
void * data
optional data pointer
Definition: buffer/buffer.h:88
pipewire.h
spa_chunk
Chunk of memory, can change for each buffer.
Definition: buffer/buffer.h:57
impl::default_sink
char * default_sink
Definition: bluez-autoswitch.c:72
names.h
spa_dict::n_items
uint32_t n_items
Definition: utils/dict.h:51
SPA_PARAM_PropInfo
@ SPA_PARAM_PropInfo
property information as SPA_TYPE_OBJECT_PropInfo
Definition: param.h:45
spa_node_info::change_mask
uint64_t change_mask
Definition: build-12775836/doc/spa/node/node.h:66
find_data::name
const char * name
Definition: bluez-autoswitch.c:88
SPA_EVENT_DEVICE_Props
@ SPA_EVENT_DEVICE_Props
Definition: monitor/event.h:47
impl::restore_timeout
struct spa_source * restore_timeout
Definition: bluez-autoswitch.c:70
spa_device_add_listener
#define spa_device_add_listener(d,...)
Definition: build-12775836/doc/spa/monitor/device.h:253
SPA_POD_OPT_Pod
#define SPA_POD_OPT_Pod(val)
Definition: parser.h:533
SPA_PARAM_Route
@ SPA_PARAM_Route
routing configuration as SPA_TYPE_OBJECT_ParamRoute
Definition: param.h:57
SPA_POD_Id
#define SPA_POD_Id(val)
Definition: vararg.h:56
sm_media_session_sanitize_name
char * sm_media_session_sanitize_name(char *name, int size, char sub, const char *fmt,...)
Definition: media-session.c:2031
pw_impl_factory_create_object
void * pw_impl_factory_create_object(struct pw_impl_factory *factory, struct pw_resource *resource, const char *type, uint32_t version, struct pw_properties *properties, uint32_t new_id)
Definition: impl-factory.c:261
impl::record_count
unsigned int record_count
Definition: bluez-autoswitch.c:66
device::props
struct pw_properties * props
Definition: alsa-monitor.c:98
PW_KEY_PRIORITY_SESSION
#define PW_KEY_PRIORITY_SESSION
priority in session manager
Definition: src/pipewire/keys.h:97
impl::communication_count
unsigned int communication_count
Definition: bluez-autoswitch.c:67
SPA_NAME_API_BLUEZ5_ENUM_DBUS
#define SPA_NAME_API_BLUEZ5_ENUM_DBUS
keys for bluez5 factory names
Definition: names.h:112
device::link
struct spa_list link
Definition: alsa-monitor.c:84
pw_properties_new
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
SPA_TYPE_OBJECT_ParamPortConfig
@ SPA_TYPE_OBJECT_ParamPortConfig
Definition: build-12775836/doc/spa/utils/type.h:95
impl::have_info
bool have_info
Definition: bluez-monitor.c:99
device::appeared
unsigned int appeared
Definition: alsa-monitor.c:110
endpoint::stream_list
struct spa_list stream_list
Definition: alsa-endpoint.c:88
pw_properties_setf
int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...) 1(3
spa_device_events
spa_device_events:
Definition: build-12775836/doc/spa/monitor/device.h:117
sm_media_session_for_each_object
int sm_media_session_for_each_object(struct sm_media_session *sess, int(*callback)(void *data, struct sm_object *object), void *data)
Definition: media-session.c:1552
spa_pod_builder
Definition: builder.h:63
hook.h
props.h
spa_atob
bool spa_atob(const char *str)
Convert str to a boolean.
Definition: string.h:213
SPA_KEY_API_BLUEZ5_ADDRESS
#define SPA_KEY_API_BLUEZ5_ADDRESS
a bluetooth address
Definition: build-12775836/doc/spa/utils/keys.h:123
pw_direction
#define pw_direction
The direction of a port.
Definition: port.h:56
spa_device_object_info
Information about a device object.
Definition: build-12775836/doc/spa/monitor/device.h:81
SPA_MEDIA_SUBTYPE_raw
@ SPA_MEDIA_SUBTYPE_raw
Definition: param/format.h:53
spa_json
Definition: json.h:49
node::endpoint
struct endpoint * endpoint
Definition: alsa-endpoint.c:109
profile
Definition: default-profile.c:149
builder.h
pw_properties
Definition: properties.h:49
pw_properties_free
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
node::id
uint32_t id
Definition: alsa-monitor.c:72
pw_log_error
#define pw_log_error(...)
Definition: src/pipewire/log.h:86
spa_list_append
#define spa_list_append(list, item)
Definition: list.h:81
SPA_DATA_Invalid
@ SPA_DATA_Invalid
Definition: buffer/buffer.h:46