PipeWire: pipewire/impl-core.h Source File

PipeWire 0.3.51

impl-core.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_IMPL_CORE_H
26#define PIPEWIRE_IMPL_CORE_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
44struct pw_impl_core;
45
46#include <pipewire/context.h>
47#include <pipewire/global.h>
48#include <pipewire/properties.h>
49#include <pipewire/resource.h>
50
52struct pw_impl_core_events {
53#define PW_VERSION_IMPL_CORE_EVENTS 0
54 uint32_t version;
55
57 void (*destroy) (void *data);
59 void (*free) (void *data);
61 void (*initialized) (void *data);
62};
63
64struct pw_impl_core *pw_context_create_core(struct pw_context *context,
65 struct pw_properties *properties,
66 size_t user_data_size);
67
68/* get the default core in a context */
69struct pw_impl_core *pw_context_get_default_core(struct pw_context *context);
70
72const struct pw_properties *pw_impl_core_get_properties(struct pw_impl_core *core);
73
75const struct pw_core_info *pw_impl_core_get_info(struct pw_impl_core *core);
76
78int pw_impl_core_update_properties(struct pw_impl_core *core, const struct spa_dict *dict);
79
80int pw_impl_core_register(struct pw_impl_core *core,
81 struct pw_properties *properties);
82
83void pw_impl_core_destroy(struct pw_impl_core *core);
84
85void *pw_impl_core_get_user_data(struct pw_impl_core *core);
86
88struct pw_global *pw_impl_core_get_global(struct pw_impl_core *core);
89
91void pw_impl_core_add_listener(struct pw_impl_core *core,
92 struct spa_hook *listener,
93 const struct pw_impl_core_events *events,
94 void *data);
95
100#ifdef __cplusplus
101}
102#endif
103
104#endif /* PIPEWIRE_IMPL_CORE_H */
context.h
pipewire/context.h
global.h
pipewire/global.h
pw_context_create_core
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:404
pw_impl_core_get_user_data
void * pw_impl_core_get_user_data(struct pw_impl_core *core)
Definition: impl-core.c:655
pw_impl_core_get_info
const struct pw_core_info * pw_impl_core_get_info(struct pw_impl_core *core)
Get the core information.
pw_impl_core_get_properties
const struct pw_properties * pw_impl_core_get_properties(struct pw_impl_core *core)
Get the core properties.
Definition: impl-core.c:572
pw_impl_core_update_properties
int pw_impl_core_update_properties(struct pw_impl_core *core, const struct spa_dict *dict)
Update the core properties.
Definition: impl-core.c:578
pw_context_get_default_core
struct pw_impl_core * pw_context_get_default_core(struct pw_context *context)
Definition: impl-core.c:465
pw_impl_core_get_global
struct pw_global * pw_impl_core_get_global(struct pw_impl_core *core)
Get the global of this core.
Definition: impl-core.c:661
pw_impl_core_register
int pw_impl_core_register(struct pw_impl_core *core, struct pw_properties *properties)
Definition: impl-core.c:601
pw_impl_core_add_listener
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:667
pw_impl_core_destroy
void pw_impl_core_destroy(struct pw_impl_core *core)
Definition: impl-core.c:471
properties.h
pipewire/properties.h
resource.h
pipewire/resource.h
pw_context
pw_core_info
The core information.
Definition: core.h:87
pw_global
Definition: context.h:67
pw_impl_core_events
Factory events, listen to them with pw_impl_core_add_listener.
Definition: impl-core.h:57
pw_impl_core_events::destroy
void(* destroy)(void *data)
the core is destroyed
Definition: impl-core.h:63
pw_impl_core_events::version
uint32_t version
Definition: impl-core.h:60
pw_impl_core_events::free
void(* free)(void *data)
the core is freed
Definition: impl-core.h:65
pw_impl_core_events::initialized
void(* initialized)(void *data)
the core is initialized
Definition: impl-core.h:67
pw_impl_core
pw_properties
Definition: properties.h:53
spa_dict
Definition: dict.h:59
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:351