PipeWire  0.3.33
src/pipewire/mem.h
Go to the documentation of this file.
1 /* PipeWire
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 PIPEWIRE_MEM_H
26 #define PIPEWIRE_MEM_H
27 
28 #include <pipewire/properties.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
48  PW_MEMBLOCK_FLAG_SEAL = (1 << 2),
49  PW_MEMBLOCK_FLAG_MAP = (1 << 3),
54 };
55 
58  PW_MEMMAP_FLAG_READ = (1 << 0),
59  PW_MEMMAP_FLAG_WRITE = (1 << 1),
60  PW_MEMMAP_FLAG_TWICE = (1 << 2),
63  PW_MEMMAP_FLAG_LOCKED = (1 << 4),
65 };
66 
67 struct pw_memchunk;
68 
72 struct pw_mempool {
74 };
75 
78 struct pw_memblock {
79  struct pw_mempool *pool;
80  uint32_t id;
81  int ref;
82  uint32_t flags;
83  uint32_t type;
84  int fd;
85  uint32_t size;
86  struct pw_memmap *map;
87 };
88 
90 struct pw_memmap {
91  struct pw_memblock *block;
92  void *ptr;
93  uint32_t flags;
94  uint32_t offset;
95  uint32_t size;
96  uint32_t tag[5];
97 };
98 
100 #define PW_VERSION_MEMPOOL_EVENTS 0
101  uint32_t version;
102 
104  void (*destroy) (void *data);
105 
107  void (*added) (void *data, struct pw_memblock *block);
108 
110  void (*removed) (void *data, struct pw_memblock *block);
111 };
112 
115 
117 void pw_mempool_add_listener(struct pw_mempool *pool,
118  struct spa_hook *listener,
119  const struct pw_mempool_events *events,
120  void *data);
121 
123 void pw_mempool_clear(struct pw_mempool *pool);
124 
126 void pw_mempool_destroy(struct pw_mempool *pool);
127 
128 
131  enum pw_memblock_flags flags, uint32_t type, size_t size);
132 
135  struct pw_memblock *mem);
136 
139  enum pw_memblock_flags flags, uint32_t type, int fd);
140 
142 void pw_memblock_free(struct pw_memblock *mem);
143 
145 static inline void pw_memblock_unref(struct pw_memblock *mem)
146 {
147  if (--mem->ref == 0)
148  pw_memblock_free(mem);
149 }
150 
152 int pw_mempool_remove_id(struct pw_mempool *pool, uint32_t id);
153 
155 struct pw_memblock * pw_mempool_find_ptr(struct pw_mempool *pool, const void *ptr);
156 
158 struct pw_memblock * pw_mempool_find_id(struct pw_mempool *pool, uint32_t id);
159 
161 struct pw_memblock * pw_mempool_find_fd(struct pw_mempool *pool, int fd);
162 
163 
165 struct pw_memmap * pw_memblock_map(struct pw_memblock *block,
166  enum pw_memmap_flags flags, uint32_t offset, uint32_t size,
167  uint32_t tag[5]);
168 
170 struct pw_memmap * pw_mempool_map_id(struct pw_mempool *pool, uint32_t id,
171  enum pw_memmap_flags flags, uint32_t offset, uint32_t size,
172  uint32_t tag[5]);
173 
174 struct pw_memmap * pw_mempool_import_map(struct pw_mempool *pool,
175  struct pw_mempool *other, void *data, uint32_t size, uint32_t tag[5]);
176 
178 struct pw_memmap * pw_mempool_find_tag(struct pw_mempool *pool, uint32_t tag[5], size_t size);
179 
181 int pw_memmap_free(struct pw_memmap *map);
182 
183 
185 struct pw_map_range {
186  uint32_t start;
187  uint32_t offset;
188  uint32_t size;
189 };
190 
191 #define PW_MAP_RANGE_INIT (struct pw_map_range){ 0, }
192 
195 static inline void pw_map_range_init(struct pw_map_range *range,
196  uint32_t offset, uint32_t size,
197  uint32_t page_size)
198 {
199  range->offset = SPA_ROUND_DOWN_N(offset, page_size);
200  range->start = offset - range->offset;
201  range->size = SPA_ROUND_UP_N(range->start + size, page_size);
202 }
203 
208 #ifdef __cplusplus
209 }
210 #endif
211 
212 #endif /* PIPEWIRE_MEM_H */
pw_map_range
parameters to map a memory range
Definition: src/pipewire/mem.h:185
PW_VERSION_MODULE
#define PW_VERSION_MODULE
Definition: module.h:39
pw_mempool_events::version
uint32_t version
Definition: src/pipewire/mem.h:101
pw_memblock::pool
struct pw_mempool * pool
owner pool
Definition: src/pipewire/mem.h:79
PW_KEY_FORMAT_DSP
#define PW_KEY_FORMAT_DSP
format related properties
Definition: src/pipewire/keys.h:302
PW_VERSION_FACTORY
#define PW_VERSION_FACTORY
Definition: factory.h:42
pw_mempool
A memory pool is a collection of pw_memblocks.
Definition: src/pipewire/mem.h:72
PW_DIRECTION_INPUT
#define PW_DIRECTION_INPUT
Definition: port.h:57
memblock
Definition: mem.c:108
memmap::link
struct spa_list link
Definition: mem.c:130
pw_mempool_import_map
struct pw_memmap * pw_mempool_import_map(struct pw_mempool *pool, struct pw_mempool *other, void *data, uint32_t size, uint32_t tag[5])
Definition: mem.c:613
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_properties_get
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
pw_node_info_update
struct pw_node_info * pw_node_info_update(struct pw_node_info *info, const struct pw_node_info *update)
Definition: introspect.c:168
pw_memmap
a mapped region of a pw_memblock
Definition: src/pipewire/mem.h:90
pw_mempool_find_id
struct pw_memblock * pw_mempool_find_id(struct pw_mempool *pool, uint32_t id)
Find memblock for given id.
Definition: mem.c:747
memblock::link
struct spa_list link
Definition: mem.c:110
sm_media_session_remove_links
int sm_media_session_remove_links(struct sm_media_session *sess, const struct spa_dict *dict)
Definition: media-session.c:1983
spa_hook_list_join
void spa_hook_list_join(struct spa_hook_list *list, struct spa_hook_list *save)
Definition: hook.h:366
object_info::size
size_t size
Definition: media-session.c:200
SPA_FLAG_CLEAR
#define SPA_FLAG_CLEAR(field, flag)
Definition: defs.h:75
memmap::mapping
struct mapping * mapping
Definition: mem.c:129
pw_mempool_events::added
void(* added)(void *data, struct pw_memblock *block)
a new memory block is added to the pool
Definition: src/pipewire/mem.h:107
pw_mempool_events::removed
void(* removed)(void *data, struct pw_memblock *block)
a memory block is removed from the pool
Definition: src/pipewire/mem.h:110
mempool
Definition: mem.c:98
sm_object_emit_update
#define sm_object_emit_update(s)
Definition: media-session.c:71
PW_VERSION_NODE
#define PW_VERSION_NODE
Definition: src/pipewire/node.h:52
PW_KEY_NODE_ID
#define PW_KEY_NODE_ID
Node keys.
Definition: src/pipewire/keys.h:137
mapping::ptr
void * ptr
Definition: mem.c:123
PW_VERSION_CLIENT_EVENTS
#define PW_VERSION_CLIENT_EVENTS
Definition: client.h:78
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
impl::endpoint_links
struct pw_map endpoint_links
list of struct endpoint_link
Definition: media-session.c:158
MFD_CLOEXEC
#define MFD_CLOEXEC
Definition: mem.c:70
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
memmap
Definition: mem.c:127
registry_event::props
const struct spa_dict * props
Definition: media-session.c:210
pw_registry_events::version
uint32_t version
Definition: core.h:430
pw_mempool_new
struct pw_mempool * pw_mempool_new(struct pw_properties *props)
Create a new memory pool.
Definition: mem.c:133
pw_map_range::start
uint32_t start
Definition: src/pipewire/mem.h:186
PW_TYPE_INTERFACE_Device
#define PW_TYPE_INTERFACE_Device
Definition: src/pipewire/device.h:37
pw_memblock::id
uint32_t id
unique id
Definition: src/pipewire/mem.h:80
PW_MEMMAP_FLAG_NONE
@ PW_MEMMAP_FLAG_NONE
Definition: src/pipewire/mem.h:57
impl::rescan_pending
unsigned int rescan_pending
Definition: media-session.c:167
main
int main(int argc, char *argv[])
Definition: media-session.c:2431
PW_MEMBLOCK_FLAG_READWRITE
@ PW_MEMBLOCK_FLAG_READWRITE
Definition: src/pipewire/mem.h:53
sm_restore_stream_start
int sm_restore_stream_start(struct sm_media_session *sess)
Definition: restore-stream.c:531
pw_properties_update
int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict)
Update properties.
Definition: properties.c:298
SPA_AUDIO_CHANNEL_RR
@ SPA_AUDIO_CHANNEL_RR
rear right
Definition: audio/raw.h:184
pw_context_get_support
const struct spa_support * pw_context_get_support(struct pw_context *context, uint32_t *n_support)
Get the context support objects.
Definition: context.c:560
spa_zero
#define spa_zero(x)
Definition: defs.h:303
SPA_TYPE_INTERFACE_Device
#define SPA_TYPE_INTERFACE_Device
Definition: build-12683127/doc/spa/monitor/device.h:50
MFD_ALLOW_SEALING
#define MFD_ALLOW_SEALING
Definition: mem.c:74
impl::last_seq
int last_seq
Definition: media-session.c:164
port::info
struct spa_port_info info
Definition: filter.c:101
pw_proxy_get_type
const char * pw_proxy_get_type(struct pw_proxy *proxy, uint32_t *version)
Get the type and version of the proxy.
Definition: proxy.c:173
pw_core_info
The core information.
Definition: core.h:73
spa_json_container_len
int spa_json_container_len(struct spa_json *iter, const char *value, int len)
Definition: json.h:198
stream::link
struct spa_list link
Definition: alsa-endpoint.c:92
mempool::blocks
struct spa_list blocks
Definition: mem.c:104
pw_registry_destroy
#define pw_registry_destroy(p,...)
Definition: core.h:521
format-utils.h
pw_context_new
struct pw_context * pw_context_new(struct pw_loop *main_loop, struct pw_properties *props, size_t user_data_size)
Make a new context object for a given main_loop.
Definition: context.c:249
port::props
struct pw_properties * props
Definition: filter.c:98
sync::link
struct spa_list link
Definition: media-session.c:120
SPA_AUDIO_CHANNEL_MONO
@ SPA_AUDIO_CHANNEL_MONO
mono stream
Definition: audio/raw.h:172
SPA_AUDIO_CHANNEL_SL
@ SPA_AUDIO_CHANNEL_SL
side left
Definition: audio/raw.h:178
pw_mempool_find_fd
struct pw_memblock * pw_mempool_find_fd(struct pw_mempool *pool, int fd)
Find memblock for given fd.
Definition: mem.c:761
PW_MEMMAP_FLAG_PRIVATE
@ PW_MEMMAP_FLAG_PRIVATE
writes will be private
Definition: src/pipewire/mem.h:62
impl::monitor_registry_listener
struct spa_hook monitor_registry_listener
Definition: media-session.c:148
pw_init
void pw_init(int *argc, char **argv[])
Initialize PipeWire.
Definition: pipewire.c:483
dbus.h
spa_json_enter_object
int spa_json_enter_object(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:212
pw_mempool_destroy
void pw_mempool_destroy(struct pw_mempool *pool)
Clear and destroy a pool.
Definition: mem.c:168
node.h
spa_device
Definition: build-12683127/doc/spa/monitor/device.h:53
spa_type_info::type
uint32_t type
Definition: build-12683127/doc/spa/utils/type.h:138
sync::callback
void(* callback)(void *data)
Definition: media-session.c:122
impl::registry_event_list
struct spa_list registry_event_list
pending registry events
Definition: media-session.c:153
spa_type_audio_channel
const struct spa_type_info spa_type_audio_channel[]
Definition: param/audio/type-info.h:159
pw_memmap::block
struct pw_memblock * block
owner memblock
Definition: src/pipewire/mem.h:91
pw_loop_leave
#define pw_loop_leave(l)
Definition: src/pipewire/loop.h:69
pw_port_info_free
void pw_port_info_free(struct pw_port_info *info)
Definition: introspect.c:283
name
const char * name
Definition: media-session.c:2379
string.h
node::link
struct spa_list link
link in impl node_list
Definition: module-filter-chain.c:151
impl::dbus_connection_listener
struct spa_hook dbus_connection_listener
Definition: media-session.c:134
PW_KEY_CONFIG_NAME
#define PW_KEY_CONFIG_NAME
a config file name
Definition: src/pipewire/keys.h:74
mempool::pagesize
uint32_t pagesize
Definition: mem.c:105
data
user data to add to an object
Definition: filter.c:75
pw_context_load_module
struct pw_impl_module * pw_context_load_module(struct pw_context *context, const char *name, const char *args, struct pw_properties *properties)
Load a module.
Definition: impl-module.c:158
mem.h
impl::data
uint8_t data[MAX_BUFFER]
Definition: module-profiler.c:87
pw_mempool_alloc
struct pw_memblock * pw_mempool_alloc(struct pw_mempool *pool, enum pw_memblock_flags flags, uint32_t type, size_t size)
Create a new memblock.
Definition: mem.c:464
pw_mempool_add_listener
void pw_mempool_add_listener(struct pw_mempool *pool, struct spa_hook *listener, const struct pw_mempool_events *events, void *data)
Listen for events.
Definition: mem.c:186
spa_streq
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
mapping::block
struct memblock * block
Definition: mem.c:117
spa_list_for_each
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
impl::loop
struct pw_main_loop * loop
Definition: media-session.c:132
pw_proxy_get_user_data
void * pw_proxy_get_user_data(struct pw_proxy *proxy)
Get the user_data.
Definition: proxy.c:146
pw_memblock::size
uint32_t size
size of memory
Definition: src/pipewire/mem.h:85
pw_memblock::flags
uint32_t flags
flags for the memory block on of enum pw_memblock_flags
Definition: src/pipewire/mem.h:82
SPA_ROUND_DOWN_N
#define SPA_ROUND_DOWN_N(num, align)
Definition: defs.h:222
PW_MEMBLOCK_FLAG_NONE
@ PW_MEMBLOCK_FLAG_NONE
Definition: src/pipewire/mem.h:45
PW_TYPE_INTERFACE_Module
#define PW_TYPE_INTERFACE_Module
Definition: module.h:37
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
PW_VERSION_CORE
#define PW_VERSION_CORE
Definition: core.h:57
pw_loop
Definition: src/pipewire/loop.h:47
pw_mempool::props
struct pw_properties * props
Definition: src/pipewire/mem.h:73
SPA_EXPORT
#define SPA_EXPORT
Definition: defs.h:208
pw_port_events
Port events.
Definition: port.h:87
SPA_LOG_LEVEL_WARN
@ SPA_LOG_LEVEL_WARN
Definition: build-12683127/doc/spa/support/log.h:49
impl::seq
int seq
Definition: policy-ep.c:65
PW_VERSION_REGISTRY_EVENTS
#define PW_VERSION_REGISTRY_EVENTS
Definition: core.h:429
pw_log_trace
#define pw_log_trace(...)
Definition: src/pipewire/log.h:90
PW_MEMBLOCK_FLAG_WRITABLE
@ PW_MEMBLOCK_FLAG_WRITABLE
memory is writable
Definition: src/pipewire/mem.h:47
registry_event::permissions
uint32_t permissions
Definition: media-session.c:207
PW_VERSION_DEVICE
#define PW_VERSION_DEVICE
Definition: src/pipewire/device.h:39
PW_MEMMAP_FLAG_WRITE
@ PW_MEMMAP_FLAG_WRITE
map in write mode
Definition: src/pipewire/mem.h:59
SPA_ROUND_UP_N
#define SPA_ROUND_UP_N(num, align)
Definition: defs.h:223
PW_MEMMAP_FLAG_LOCKED
@ PW_MEMMAP_FLAG_LOCKED
lock the memory into RAM
Definition: src/pipewire/mem.h:63
sm_media_session_emit_info
#define sm_media_session_emit_info(s, i)
Definition: media-session.c:77
SPA_FLAG_UPDATE
#define SPA_FLAG_UPDATE(field, flag, val)
Definition: defs.h:76
device
Definition: alsa-monitor.c:82
node
Definition: module-filter-chain.c:150
pw_mempool_emit_added
#define pw_mempool_emit_added(p, b)
Definition: mem.c:95
impl
Definition: control.c:33
registry_event::type
const char * type
Definition: media-session.c:208
sm_object_destroy
int sm_object_destroy(struct sm_object *obj)
Definition: media-session.c:359
spa_dbus
Definition: dbus.h:42
pw_proxy_destroy
void pw_proxy_destroy(struct pw_proxy *proxy)
destroy a proxy
Definition: proxy.c:229
pw_mempool_find_ptr
struct pw_memblock * pw_mempool_find_ptr(struct pw_mempool *pool, const void *ptr)
Find memblock for given ptr.
Definition: mem.c:728
pw_map_range::offset
uint32_t offset
offset in first page with start of data
Definition: src/pipewire/mem.h:187
PW_MEMMAP_FLAG_READWRITE
@ PW_MEMMAP_FLAG_READWRITE
Definition: src/pipewire/mem.h:64
SPA_PARAM_INFO_READ
#define SPA_PARAM_INFO_READ
Definition: param.h:68
pw_proxy_events
Proxy events, use pw_proxy_add_listener.
Definition: proxy.h:111
pw_mempool_import_block
struct pw_memblock * pw_mempool_import_block(struct pw_mempool *pool, struct pw_memblock *mem)
Import a block from another pool.
Definition: mem.c:602
spa_hook_list_append
void spa_hook_list_append(struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data)
Append a hook.
Definition: hook.h:316
spa_list
Definition: list.h:37
pw_memmap::ptr
void * ptr
mapped pointer
Definition: src/pipewire/mem.h:92
pw_main_loop_new
struct pw_main_loop * pw_main_loop_new(const struct spa_dict *props)
Create a new main loop.
Definition: main-loop.c:86
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
sm_bluez5_autoswitch_start
int sm_bluez5_autoswitch_start(struct sm_media_session *sess)
Definition: bluez-autoswitch.c:581
SPA_PTRDIFF
#define SPA_PTRDIFF(p1, p2)
Definition: defs.h:172
impl::endpoint_link_list
struct spa_list endpoint_link_list
Definition: media-session.c:157
SPA_PTROFF
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:159
port::node
struct spa_node * node
Definition: buffers.c:45
mapping::link
struct spa_list link
Definition: mem.c:122
param::id
uint32_t id
Definition: filter.c:81
pw_device_info_free
void pw_device_info_free(struct pw_device_info *info)
Free a pw_device_info.
Definition: introspect.c:412
sm_media_session_emit_create
#define sm_media_session_emit_create(s, obj)
Definition: media-session.c:78
registry_event::props_store
struct pw_properties * props_store
Definition: media-session.c:215
SPA_POD_OBJECT_ID
#define SPA_POD_OBJECT_ID(obj)
Definition: pod/pod.h:167
impl::sync_list
struct spa_list sync_list
list of struct link
Definition: media-session.c:162
sm_bluez5_monitor_start
int sm_bluez5_monitor_start(struct sm_media_session *sess)
Definition: bluez-monitor.c:718
handle
Definition: pipewire.c:68
sm_media_session_destroy_object
int sm_media_session_destroy_object(struct sm_media_session *sess, uint32_t id)
Definition: media-session.c:1545
pw_deinit
void pw_deinit(void)
Definition: pipewire.c:563
PW_NODE_CHANGE_MASK_PARAMS
#define PW_NODE_CHANGE_MASK_PARAMS
Definition: src/pipewire/node.h:78
sm_object_emit_destroy
#define sm_object_emit_destroy(s)
Definition: media-session.c:72
pw_proxy_add_object_listener
void pw_proxy_add_object_listener(struct pw_proxy *proxy, struct spa_hook *listener, const void *funcs, void *data)
Add a listener for the events received from the remote object.
Definition: proxy.c:204
sm_default_profile_start
int sm_default_profile_start(struct sm_media_session *sess)
Definition: default-profile.c:478
endpoint::priority
int32_t priority
Definition: policy-ep.c:80
pw_memmap::size
uint32_t size
size in memblock
Definition: src/pipewire/mem.h:95
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
pw_core_sync
#define pw_core_sync(c,...)
Definition: core.h:327
PW_TYPE_INTERFACE_Core
#define PW_TYPE_INTERFACE_Core
Definition: core.h:54
PW_MEMBLOCK_FLAG_DONT_NOTIFY
@ PW_MEMBLOCK_FLAG_DONT_NOTIFY
don't notify events
Definition: src/pipewire/mem.h:51
props
const char * props
Definition: media-session.c:2382
impl::info
struct spa_audio_info_raw info
Definition: module-echo-cancel.c:145
sync::data
void * data
Definition: media-session.c:123
pod.h
param::this
struct sm_param this
Definition: media-session.c:116
pw_properties::dict
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
impl::link_list
struct spa_list link_list
map of endpoint_link
Definition: media-session.c:160
spa_dict_item
Definition: utils/dict.h:41
mapping::do_unmap
unsigned int do_unmap
Definition: mem.c:121
stream
Definition: stream.c:97
impl::monitor_listener
struct spa_hook monitor_listener
Definition: media-session.c:137
SPA_CONTAINER_OF
#define SPA_CONTAINER_OF(p, t, m)
Definition: defs.h:170
pw_context_connect
struct pw_core * pw_context_connect(struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
Connect to a PipeWire instance.
Definition: core.c:401
SESSION_CONF
#define SESSION_CONF
Definition: media-session.c:67
spa_list_consume
#define spa_list_consume(pos, head, member)
Definition: list.h:96
pw_mempool_clear
void pw_mempool_clear(struct pw_mempool *pool)
Clear a pool.
Definition: mem.c:156
spa_hook_list_isolate
void spa_hook_list_isolate(struct spa_hook_list *list, struct spa_hook_list *save, struct spa_hook *hook, const void *funcs, void *data)
Definition: hook.h:352
registry_event
Definition: media-session.c:205
port::link
struct spa_list link
Definition: filter.c:89
item
Definition: impl-metadata.c:49
pw_registry_events
Registry events.
Definition: core.h:428
client::obj
struct sm_client * obj
Definition: access-flatpak.c:52
pw_memmap::flags
uint32_t flags
flags for the mapping on of enum pw_memmap_flags
Definition: src/pipewire/mem.h:93
spa_type_info::name
const char * name
Definition: build-12683127/doc/spa/utils/type.h:140
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
registry_event::monitor
unsigned int monitor
Definition: media-session.c:218
impl::modules
struct pw_properties * modules
Definition: media-session.c:130
PW_VERSION_PROXY_EVENTS
#define PW_VERSION_PROXY_EVENTS
Definition: proxy.h:112
pw_port_info
Definition: port.h:63
pw_main_loop_get_loop
struct pw_loop * pw_main_loop_get_loop(struct pw_main_loop *loop)
Get the loop implementation.
Definition: main-loop.c:119
memmap::this
struct pw_memmap this
Definition: mem.c:128
pw_mempool_events::destroy
void(* destroy)(void *data)
the pool is destroyed
Definition: src/pipewire/mem.h:104
sm_media_session_emit_destroy
#define sm_media_session_emit_destroy(s)
Definition: media-session.c:82
sync
Definition: media-session.c:119
F_SEAL_GROW
#define F_SEAL_GROW
Definition: mem.c:89
PW_DIRECTION_OUTPUT
#define PW_DIRECTION_OUTPUT
Definition: port.h:58
memblock::memmaps
struct spa_list memmaps
Definition: mem.c:112
pw_mempool_events
Definition: src/pipewire/mem.h:99
memblock::this
struct pw_memblock this
Definition: mem.c:109
registry_event::id
uint32_t id
Definition: media-session.c:206
spa_list_remove
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
buffer.h
port
Definition: buffers.c:44
pw_main_loop_run
int pw_main_loop_run(struct pw_main_loop *loop)
Run a main loop.
Definition: main-loop.c:145
sm_media_session_export
struct pw_proxy * sm_media_session_export(struct sm_media_session *sess, const char *type, const struct spa_dict *props, void *object, size_t user_data_size)
Definition: media-session.c:1637
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::monitor_registry
struct pw_registry * monitor_registry
Definition: media-session.c:147
SPA_N_ELEMENTS
#define SPA_N_ELEMENTS(arr)
Definition: defs.h:109
pw_mempool_find_tag
struct pw_memmap * pw_mempool_find_tag(struct pw_mempool *pool, uint32_t tag[5], size_t size)
find a map with the given tag
Definition: mem.c:773
pw_client_info_update
struct pw_client_info * pw_client_info_update(struct pw_client_info *info, const struct pw_client_info *update)
Update and existing pw_client_info with update.
Definition: introspect.c:421
mapping::ref
int ref
Definition: mem.c:118
spa_json_is_object
int spa_json_is_object(const char *val, int len)
Definition: json.h:208
PW_KEY_LINK_INPUT_PORT
#define PW_KEY_LINK_INPUT_PORT
input port id of a link
Definition: src/pipewire/keys.h:199
pw_memblock::fd
int fd
fd
Definition: src/pipewire/mem.h:84
pw_map_range::size
uint32_t size
page aligned offset to map
Definition: src/pipewire/mem.h:188
mapping::size
uint32_t size
Definition: mem.c:120
PW_TYPE_INTERFACE_Node
#define PW_TYPE_INTERFACE_Node
Definition: src/pipewire/node.h:50
pw_memblock::ref
int ref
refcount
Definition: src/pipewire/mem.h:81
impl::registry_listener
struct spa_hook registry_listener
Definition: media-session.c:145
mapping
Definition: mem.c:116
PW_VERSION_NODE_EVENTS
#define PW_VERSION_NODE_EVENTS
Definition: src/pipewire/node.h:103
pw_proxy_unref
void pw_proxy_unref(struct pw_proxy *proxy)
Definition: proxy.c:290
F_ADD_SEALS
#define F_ADD_SEALS
Definition: mem.c:84
PW_MEMBLOCK_FLAG_SEAL
@ PW_MEMBLOCK_FLAG_SEAL
seal the fd
Definition: src/pipewire/mem.h:48
pw_memblock_free
void pw_memblock_free(struct pw_memblock *block)
Free a memblock.
Definition: mem.c:688
pw_core_events::info
void(* info)(void *object, const struct pw_core_info *info)
Notify new core info.
Definition: core.h:126
sm_suspend_node_start
int sm_suspend_node_start(struct sm_media_session *sess)
Definition: suspend-node.c:248
SESSION_PREFIX
#define SESSION_PREFIX
Definition: media-session.c:66
pw_core_export
struct pw_proxy * pw_core_export(struct pw_core *core, const char *type, const struct spa_dict *props, void *object, size_t user_data_size)
Export an object into the PipeWire instance associated with core.
Definition: core.c:274
spa_dict_for_each
#define spa_dict_for_each(item, dict)
Definition: utils/dict.h:58
mapping::offset
uint32_t offset
Definition: mem.c:119
PW_KEY_CONFIG_PREFIX
#define PW_KEY_CONFIG_PREFIX
a config prefix directory
Definition: src/pipewire/keys.h:73
PW_KEY_NODE_PASSIVE
#define PW_KEY_NODE_PASSIVE
indicate that a node wants passive links on output/input/all ports when the value is "out"/"in"/"true...
Definition: src/pipewire/keys.h:176
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
spa_json_is_null
bool spa_json_is_null(const char *val, int len)
Definition: json.h:228
sm_media_session_emit_remove
#define sm_media_session_emit_remove(s, obj)
Definition: media-session.c:79
SPA_VERSION_DBUS_CONNECTION_EVENTS
#define SPA_VERSION_DBUS_CONNECTION_EVENTS
Definition: dbus.h:55
object_info::events
const void * events
Definition: media-session.c:199
pw_client_info
The client information.
Definition: client.h:55
sm_alsa_monitor_start
int sm_alsa_monitor_start(struct sm_media_session *sess)
Definition: alsa-monitor.c:1100
impl::loop
struct pw_loop * loop
Definition: module-protocol-simple.c:86
data::link
struct spa_list link
Definition: media-session.c:110
F_SEAL_SEAL
#define F_SEAL_SEAL
Definition: mem.c:87
pw_mempool_map_id
struct pw_memmap * pw_mempool_map_id(struct pw_mempool *pool, uint32_t id, enum pw_memmap_flags flags, uint32_t offset, uint32_t size, uint32_t tag[5])
Map a region of a memory block with id.
Definition: mem.c:401
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
start
int(* start)(struct sm_media_session *sess)
Definition: media-session.c:2381
F_SEAL_SHRINK
#define F_SEAL_SHRINK
Definition: mem.c:88
spa_audio_info_raw::flags
uint32_t flags
Definition: audio/raw.h:287
pw_core_disconnect
int pw_core_disconnect(struct pw_core *core)
disconnect and destroy a core
Definition: core.c:488
sm_object_remove_data
int sm_object_remove_data(struct sm_object *obj, const char *id)
Definition: media-session.c:290
sm_media_session_emit_rescan
#define sm_media_session_emit_rescan(s, seq)
Definition: media-session.c:80
sm_object_emit_free
#define sm_object_emit_free(s)
Definition: media-session.c:73
PW_MEMBLOCK_FLAG_MAP
@ PW_MEMBLOCK_FLAG_MAP
mmap the fd
Definition: src/pipewire/mem.h:49
conf.h
sm_object_get_data
void * sm_object_get_data(struct sm_object *obj, const char *id)
Definition: media-session.c:281
sm_media_session_emit_seat_active
#define sm_media_session_emit_seat_active(s,...)
Definition: media-session.c:83
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_FLAG_IS_SET
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:73
pw_core_set_paused
int pw_core_set_paused(struct pw_core *core, bool paused)
Pause or resume the core.
Definition: core.c:475
pw_memblock::map
struct pw_memmap * map
optional map when PW_MEMBLOCK_FLAG_MAP was given
Definition: src/pipewire/mem.h:86
spa_list_init
void spa_list_init(struct spa_list *list)
Definition: list.h:44
spa_list_for_each_safe
#define spa_list_for_each_safe(pos, tmp, head, member)
Definition: list.h:129
PW_KEY_LINK_OUTPUT_PORT
#define PW_KEY_LINK_OUTPUT_PORT
output port id of a link
Definition: src/pipewire/keys.h:201
pw_node_info_free
void pw_node_info_free(struct pw_node_info *info)
Definition: introspect.c:226
sm_default_nodes_start
int sm_default_nodes_start(struct sm_media_session *sess)
Definition: default-nodes.c:169
PW_VERSION_REGISTRY
#define PW_VERSION_REGISTRY
Definition: core.h:59
NAME
#define NAME
Definition: mem.c:44
pw_mempool_emit_removed
#define pw_mempool_emit_removed(p, b)
Definition: mem.c:96
PW_VERSION_PORT
#define PW_VERSION_PORT
Definition: port.h:52
spa_dict
Definition: utils/dict.h:48
sm_media_session_emit_shutdown
#define sm_media_session_emit_shutdown(s)
Definition: media-session.c:81
sm_access_portal_start
int sm_access_portal_start(struct sm_media_session *sess)
Definition: access-portal.c:642
impl::hooks
struct spa_hook_list hooks
Definition: media-session.c:155
map.h
impl::seat_active
bool seat_active
Definition: bluez-monitor.c:100
SPA_RESULT_IS_ASYNC
#define SPA_RESULT_IS_ASYNC(res)
Definition: result.h:46
pw_memmap_free
int pw_memmap_free(struct pw_memmap *map)
Unmap a region.
Definition: mem.c:416
PW_MEMMAP_FLAG_READ
@ PW_MEMMAP_FLAG_READ
map in read mode
Definition: src/pipewire/mem.h:58
pw_mempool_remove_id
int pw_mempool_remove_id(struct pw_mempool *pool, uint32_t id)
Remove a memblock for given id.
Definition: mem.c:665
impl::proxy_policy_listener
struct spa_hook proxy_policy_listener
Definition: media-session.c:142
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_memmap::offset
uint32_t offset
offset in memblock
Definition: src/pipewire/mem.h:94
spa_dbus_connection_add_listener
#define spa_dbus_connection_add_listener(c,...)
Definition: dbus.h:114
spa_dict_lookup
const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:99
pw_node_events
Node events.
Definition: src/pipewire/node.h:102
spa_json_parse_string
int spa_json_parse_string(const char *val, int len, char *result)
Definition: json.h:314
item::key
char * key
Definition: impl-metadata.c:51
pw_context_set_object
int pw_context_set_object(struct pw_context *context, const char *type, void *value)
add an object to the context
Definition: context.c:1408
object_info
Definition: media-session.c:196
SPA_VERSION_DEVICE
#define SPA_VERSION_DEVICE
Definition: build-12683127/doc/spa/monitor/device.h:52
spa_json_get_string
int spa_json_get_string(struct spa_json *iter, char *res, int maxlen)
Definition: json.h:358
data::size
size_t size
Definition: media-session.c:112
spa_dbus_connection_events
Definition: dbus.h:54
stream::info
struct spa_node_info info
Definition: stream.c:137
spa_support_find
void * spa_support_find(const struct spa_support *support, uint32_t n_support, const char *type)
Find a support item of the given type.
Definition: plugin.h:95
pw_main_loop_quit
int pw_main_loop_quit(struct pw_main_loop *loop)
Quit a main loop.
Definition: main-loop.c:131
pw_memblock_map
struct pw_memmap * pw_memblock_map(struct pw_memblock *block, enum pw_memmap_flags flags, uint32_t offset, uint32_t size, uint32_t tag[5])
Map a region of a memory block.
Definition: mem.c:354
PW_VERSION_CORE_EVENTS
#define PW_VERSION_CORE_EVENTS
Definition: core.h:115
pw_device_info
The device information.
Definition: src/pipewire/device.h:43
impl::registry
struct pw_registry * registry
Definition: media-session.c:144
sync::seq
int seq
Definition: media-session.c:121
sm_access_flatpak_start
int sm_access_flatpak_start(struct sm_media_session *sess)
Definition: access-flatpak.c:179
pw_proxy_ref
void pw_proxy_ref(struct pw_proxy *proxy)
Definition: proxy.c:303
spa_strerror
#define spa_strerror(err)
Definition: result.h:51
endpoint::link
struct spa_list link
link in impl endpoint_list
Definition: alsa-endpoint.c:65
impl::monitor_core
struct pw_core * monitor_core
Definition: media-session.c:136
pw_core_info_free
void pw_core_info_free(struct pw_core_info *info)
Free a pw_core_info
Definition: introspect.c:156
result.h
impl::rescan_seq
int rescan_seq
list of struct sync
Definition: media-session.c:163
pw_conf_load_conf
int pw_conf_load_conf(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:344
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
pw_mempool_import
struct pw_memblock * pw_mempool_import(struct pw_mempool *pool, enum pw_memblock_flags flags, uint32_t type, int fd)
Import an fd into the pool.
Definition: mem.c:565
pw_memblock
Memory block structure.
Definition: src/pipewire/mem.h:78
pw_conf_save_state
int pw_conf_save_state(const char *prefix, const char *name, const struct pw_properties *conf)
param
Definition: filter.c:80
pw_proxy_sync
int pw_proxy_sync(struct pw_proxy *proxy, int seq)
Generate an sync method for a proxy.
Definition: proxy.c:310
pw_log_debug
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
pw_loop_enter
#define pw_loop_enter(l)
Definition: src/pipewire/loop.h:67
impl::scanning
unsigned int scanning
Definition: media-session.c:166
pw_context_destroy
void pw_context_destroy(struct pw_context *context)
destroy a context object, all resources except the main_loop will be destroyed
Definition: context.c:464
pw_memmap::tag
uint32_t tag[5]
user tag
Definition: src/pipewire/mem.h:96
sm_media_session_emit_dbus_disconnected
#define sm_media_session_emit_dbus_disconnected(s)
Definition: media-session.c:84
client
Definition: module-protocol-native.c:103
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:72
object_info::version
uint32_t version
Definition: media-session.c:198
sm_libcamera_monitor_start
int sm_libcamera_monitor_start(struct sm_media_session *sess)
Definition: libcamera-monitor.c:465
mempool::map
struct pw_map map
Definition: mem.c:103
pw_log
#define pw_log(lev,...)
Definition: src/pipewire/log.h:80
impl::conf
struct pw_properties * conf
Definition: alsa-monitor.c:120
endpoint
Definition: alsa-endpoint.c:64
pw_memmap_flags
pw_memmap_flags
Definition: src/pipewire/mem.h:56
pw_client_info_free
void pw_client_info_free(struct pw_client_info *info)
Free a pw_client_info.
Definition: introspect.c:445
SPA_MIN
#define SPA_MIN(a, b)
Definition: defs.h:123
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_device_info
Information about the device and parameters it supports.
Definition: build-12683127/doc/spa/monitor/device.h:60
SPA_AUDIO_CHANNEL_UNKNOWN
@ SPA_AUDIO_CHANNEL_UNKNOWN
unspecified
Definition: audio/raw.h:169
SPA_ID_INVALID
#define SPA_ID_INVALID
Definition: defs.h:182
pw_loop_iterate
#define pw_loop_iterate(l,...)
Definition: src/pipewire/loop.h:68
sm_media_session_roundtrip
int sm_media_session_roundtrip(struct sm_media_session *sess)
Definition: media-session.c:1605
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
spa_list_is_empty
#define spa_list_is_empty(l)
Definition: list.h:49
pw_memblock_flags
pw_memblock_flags
Flags passed to pw_mempool_alloc()
Definition: src/pipewire/mem.h:44
spa_hook_list
A list of hooks.
Definition: hook.h:284
object_info::type
const char * type
Definition: media-session.c:197
stream::endpoint
struct endpoint * endpoint
Definition: alsa-endpoint.c:93
sm_object_add_data
void * sm_object_add_data(struct sm_object *obj, const char *id, size_t size)
Definition: media-session.c:261
impl::proxy
struct pw_proxy * proxy
Definition: alsa-midi.c:56
pw_core_info_update
struct pw_core_info * pw_core_info_update(struct pw_core_info *info, const struct pw_core_info *update)
Update and existing pw_core_info with update.
Definition: introspect.c:127
pw_conf_load_state
int pw_conf_load_state(const char *prefix, const char *name, struct pw_properties *conf)
Definition: conf.c:362
PW_KEY_DEVICE_ID
#define PW_KEY_DEVICE_ID
device properties
Definition: src/pipewire/keys.h:210
object_info::init
int(* init)(void *object)
Definition: media-session.c:201
sm_media_session_export_metadata
struct pw_metadata * sm_media_session_export_metadata(struct sm_media_session *sess, const char *name)
Definition: metadata.c:64
PW_TYPE_INTERFACE_Client
#define PW_TYPE_INTERFACE_Client
Definition: client.h:46
PW_MEMBLOCK_FLAG_READABLE
@ PW_MEMBLOCK_FLAG_READABLE
memory is readable
Definition: src/pipewire/mem.h:46
impl::dbus
struct spa_dbus * dbus
Definition: media-session.c:133
sm_media_session_create_node
struct sm_node * sm_media_session_create_node(struct sm_media_session *sess, const char *factory_name, const struct spa_dict *props)
Definition: media-session.c:1701
spa_debug_type_short_name
const char * spa_debug_type_short_name(const char *name)
Definition: types.h:60
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
sm_alsa_midi_start
int sm_alsa_midi_start(struct sm_media_session *sess)
Definition: alsa-midi.c:172
SPA_LOG_LEVEL_INFO
@ SPA_LOG_LEVEL_INFO
Definition: build-12683127/doc/spa/support/log.h:50
spa_dbus_get_connection
struct spa_dbus_connection * spa_dbus_get_connection(struct spa_dbus *dbus, enum spa_dbus_type type)
Definition: dbus.h:137
pw_log_warn
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
sm_object_sync_update
int sm_object_sync_update(struct sm_object *obj)
Definition: media-session.c:1163
PW_VERSION_DEVICE_EVENTS
#define PW_VERSION_DEVICE_EVENTS
Definition: src/pipewire/device.h:68
sm_session_manager_start
int sm_session_manager_start(struct sm_media_session *sess)
Definition: session-manager.c:145
item::value
char * value
Definition: impl-metadata.c:53
SPA_AUDIO_CHANNEL_SR
@ SPA_AUDIO_CHANNEL_SR
side right
Definition: audio/raw.h:179
device::node_list
struct spa_list node_list
Definition: alsa-monitor.c:113
pw_mempool_emit_destroy
#define pw_mempool_emit_destroy(p)
Definition: mem.c:94
mempool::listener_list
struct spa_hook_list listener_list
Definition: mem.c:101
registry_event::version
uint32_t version
Definition: media-session.c:209
sm_policy_node_start
int sm_policy_node_start(struct sm_media_session *sess)
Definition: policy-node.c:1135
json.h
mempool::this
struct pw_mempool this
Definition: mem.c:99
registry_event::allocated
unsigned int allocated
Definition: media-session.c:219
pw_node_enum_params
#define pw_node_enum_params(c,...)
Definition: src/pipewire/node.h:200
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
impl::this
struct pw_control this
Definition: control.c:34
pw_map
A map.
Definition: map.h:55
spa_json_enter_array
int spa_json_enter_array(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:222
pw_properties_copy
struct pw_properties * pw_properties_copy(const struct pw_properties *properties)
Copy a properties object.
Definition: properties.c:222
pw_client_events
Client events.
Definition: client.h:77
NAME
#define NAME
Definition: media-session.c:65
sm_media_session_seat_active_changed
int sm_media_session_seat_active_changed(struct sm_media_session *sess, bool active)
Definition: media-session.c:2082
sm_v4l2_monitor_start
int sm_v4l2_monitor_start(struct sm_media_session *sess)
Definition: v4l2-monitor.c:535
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
spa_hook_remove
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
SPA_DBUS_TYPE_SESSION
@ SPA_DBUS_TYPE_SESSION
The login session bus.
Definition: dbus.h:45
SPA_POD_SIZE
#define SPA_POD_SIZE(pod)
Definition: pod/pod.h:42
pw_log_info
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
pw_loop_add_signal
#define pw_loop_add_signal(l,...)
Definition: src/pipewire/loop.h:79
PW_MEMMAP_FLAG_TWICE
@ PW_MEMMAP_FLAG_TWICE
map the same area twice after each other, creating a circular ringbuffer
Definition: src/pipewire/mem.h:60
pw_device_info_update
struct pw_device_info * pw_device_info_update(struct pw_device_info *info, const struct pw_device_info *update)
Update and existing pw_device_info with update.
Definition: introspect.c:368
registry_event::seq
int seq
Definition: media-session.c:214
object_info::destroy
void(* destroy)(void *object)
Definition: media-session.c:202
SPA_AUDIO_CHANNEL_RL
@ SPA_AUDIO_CHANNEL_RL
rear left
Definition: audio/raw.h:183
device::obj
struct sm_device * obj
Definition: default-profile.c:101
PW_TYPE_INTERFACE_Factory
#define PW_TYPE_INTERFACE_Factory
Definition: factory.h:40
impl::seat_active
unsigned int seat_active
Definition: media-session.c:168
stream::obj
struct sm_node * obj
Definition: restore-stream.c:75
PW_KEY_LINK_PASSIVE
#define PW_KEY_LINK_PASSIVE
indicate that a link is passive and does not cause the graph to be runnable.
Definition: src/pipewire/keys.h:202
PW_KEY_PORT_DIRECTION
#define PW_KEY_PORT_DIRECTION
the port direction, one of "in" or "out" or "control" and "notify" for control ports
Definition: src/pipewire/keys.h:185
impl::object_list
struct spa_list object_list
all sm_objects
Definition: media-session.c:151
pipewire.h
PW_MEMBLOCK_FLAG_DONT_CLOSE
@ PW_MEMBLOCK_FLAG_DONT_CLOSE
don't close fd
Definition: src/pipewire/mem.h:50
spa_hook_list_init
void spa_hook_list_init(struct spa_hook_list *list)
Initialize a hook list to the empty list.
Definition: hook.h:305
properties.h
sm_default_routes_start
int sm_default_routes_start(struct sm_media_session *sess)
Definition: default-routes.c:905
spa_node_info::change_mask
uint64_t change_mask
Definition: build-12683127/doc/spa/node/node.h:66
spa_audio_channel
spa_audio_channel
Definition: audio/raw.h:168
list.h
sm_media_session_schedule_rescan
int sm_media_session_schedule_rescan(struct sm_media_session *sess)
Definition: media-session.c:1569
memblock::mappings
struct spa_list mappings
Definition: mem.c:111
impl::policy_core
struct pw_core * policy_core
Definition: media-session.c:140
registry_event::link
struct spa_list link
Definition: media-session.c:217
pw_loop::loop
struct spa_loop * loop
wrapped loop
Definition: src/pipewire/loop.h:49
endpoint::obj
struct sm_endpoint * obj
Definition: policy-ep.c:69
PW_VERSION_PORT_EVENTS
#define PW_VERSION_PORT_EVENTS
Definition: port.h:88
sm_logind_start
int sm_logind_start(struct sm_media_session *session)
Definition: logind.c:103
pw_device_enum_params
#define pw_device_enum_params(c,...)
Definition: src/pipewire/device.h:155
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
spa_pod_is_object
int spa_pod_is_object(const struct spa_pod *pod)
Definition: iter.h:381
PW_VERSION_CLIENT
#define PW_VERSION_CLIENT
Definition: client.h:48
spa_support
Extra supporting infrastructure passed to the init() function of a factory.
Definition: plugin.h:89
sm_streams_follow_default_start
int sm_streams_follow_default_start(struct sm_media_session *sess)
Definition: streams-follow-default.c:45
PW_KEY_PRIORITY_SESSION
#define PW_KEY_PRIORITY_SESSION
priority in session manager
Definition: src/pipewire/keys.h:97
pw_properties_new
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
pw_memblock::type
uint32_t type
type of the fd, one of enum spa_data_type
Definition: src/pipewire/mem.h:83
pw_core_add_listener
#define pw_core_add_listener(c,...)
Definition: core.h:325
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
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
impl::globals
struct pw_map globals
Definition: media-session.c:150
data::id
const char * id
Definition: media-session.c:111
hook.h
port::direction
enum spa_direction direction
Definition: buffers.c:46
SPA_AUDIO_CHANNEL_FC
@ SPA_AUDIO_CHANNEL_FC
front center
Definition: audio/raw.h:176
pw_port_info_update
struct pw_port_info * pw_port_info_update(struct pw_port_info *info, const struct pw_port_info *update)
Definition: introspect.c:237
pw_node_info
The node information.
Definition: src/pipewire/node.h:70
props.h
pw_get_library_version
const char * pw_get_library_version(void)
Get the currently running version.
Definition: pipewire.c:740
port::id
uint32_t id
Definition: filter.c:94
SPA_TYPE_INTERFACE_DBus
#define SPA_TYPE_INTERFACE_DBus
Definition: dbus.h:39
spa_json
Definition: json.h:49
registry_event::proxy
struct pw_proxy * proxy
Definition: media-session.c:212
log.h
impl::policy_listener
struct spa_hook policy_listener
Definition: media-session.c:141
support
Definition: pipewire.c:80
PW_KEY_AUDIO_CHANNEL
#define PW_KEY_AUDIO_CHANNEL
audio related properties
Definition: src/pipewire/keys.h:305
pw_device_events
Device events.
Definition: src/pipewire/device.h:67
PW_DEVICE_CHANGE_MASK_PARAMS
#define PW_DEVICE_CHANGE_MASK_PARAMS
Definition: src/pipewire/device.h:46
pw_properties
Definition: properties.h:49
impl::monitor_seq
int monitor_seq
Definition: media-session.c:138
spa_hook_list_clean
void spa_hook_list_clean(struct spa_hook_list *list)
Remove all hooks from the list.
Definition: hook.h:344
pw_properties_free
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
pw_registry_add_listener
#define pw_registry_add_listener(p,...)
Registry.
Definition: core.h:507
pw_map_get_size
#define pw_map_get_size(m)
Definition: map.h:62
spa_return_if_fail
#define spa_return_if_fail(expr)
Definition: defs.h:242
PW_TYPE_INTERFACE_Port
#define PW_TYPE_INTERFACE_Port
Definition: port.h:50
pw_core_events
Core events.
Definition: core.h:114
device.h
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
pw_main_loop_destroy
void pw_main_loop_destroy(struct pw_main_loop *loop)
Destroy a loop.
Definition: main-loop.c:96
desc
const char * desc
Definition: media-session.c:2380