PipeWire  0.3.66
impl-core.h
Go to the documentation of this file.
1 /* PipeWire */
2 /* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3 /* SPDX-License-Identifier: MIT */
4 
5 #ifndef PIPEWIRE_IMPL_CORE_H
6 #define PIPEWIRE_IMPL_CORE_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
24 struct pw_impl_core;
25 
26 #include <pipewire/context.h>
27 #include <pipewire/global.h>
29 #include <pipewire/resource.h>
30 
32 struct pw_impl_core_events {
33 #define PW_VERSION_IMPL_CORE_EVENTS 0
34  uint32_t version;
35 
37  void (*destroy) (void *data);
39  void (*free) (void *data);
41  void (*initialized) (void *data);
42 };
43 
44 struct pw_impl_core *pw_context_create_core(struct pw_context *context,
45  struct pw_properties *properties,
46  size_t user_data_size);
47 
48 /* get the default core in a context */
49 struct pw_impl_core *pw_context_get_default_core(struct pw_context *context);
50 
52 const struct pw_properties *pw_impl_core_get_properties(struct pw_impl_core *core);
53 
55 const struct pw_core_info *pw_impl_core_get_info(struct pw_impl_core *core);
56 
58 int pw_impl_core_update_properties(struct pw_impl_core *core, const struct spa_dict *dict);
59 
60 int pw_impl_core_register(struct pw_impl_core *core,
61  struct pw_properties *properties);
62 
63 void pw_impl_core_destroy(struct pw_impl_core *core);
64 
65 void *pw_impl_core_get_user_data(struct pw_impl_core *core);
66 
68 struct pw_global *pw_impl_core_get_global(struct pw_impl_core *core);
69 
71 void pw_impl_core_add_listener(struct pw_impl_core *core,
72  struct spa_hook *listener,
73  const struct pw_impl_core_events *events,
74  void *data);
75 
80 #ifdef __cplusplus
81 }
82 #endif
83 
84 #endif /* PIPEWIRE_IMPL_CORE_H */
pipewire/global.h
void * pw_impl_core_get_user_data(struct pw_impl_core *core)
Definition: impl-core.c:625
struct pw_global * pw_impl_core_get_global(struct pw_impl_core *core)
Get the global of this core.
Definition: impl-core.c:631
int pw_impl_core_update_properties(struct pw_impl_core *core, const struct spa_dict *dict)
Update the core properties.
Definition: impl-core.c:548
const struct pw_properties * pw_impl_core_get_properties(struct pw_impl_core *core)
Get the core properties.
Definition: impl-core.c:542
struct pw_impl_core * pw_context_create_core(struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
Definition: impl-core.c:384
int pw_impl_core_register(struct pw_impl_core *core, struct pw_properties *properties)
Definition: impl-core.c:571
struct pw_impl_core * pw_context_get_default_core(struct pw_context *context)
Definition: impl-core.c:435
void pw_impl_core_add_listener(struct pw_impl_core *core, struct spa_hook *listener, const struct pw_impl_core_events *events, void *data)
Add an event listener.
Definition: impl-core.c:637
const struct pw_core_info * pw_impl_core_get_info(struct pw_impl_core *core)
Get the core information.
void pw_impl_core_destroy(struct pw_impl_core *core)
Definition: impl-core.c:441
pipewire/properties.h
pipewire/resource.h
pipewire/context.h
The core information.
Definition: core.h:67
Definition: src/pipewire/context.h:47
Factory events, listen to them with pw_impl_core_add_listener.
Definition: impl-core.h:37
void(* destroy)(void *data)
the core is destroyed
Definition: impl-core.h:43
uint32_t version
Definition: impl-core.h:40
void(* free)(void *data)
the core is freed
Definition: impl-core.h:45
void(* initialized)(void *data)
the core is initialized
Definition: impl-core.h:47
Definition: properties.h:33
Definition: utils/dict.h:39
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:331