mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
Add versions to structures
Use versions instead of size Remove user_data from callbacks, we can simply pass the callback struct.
This commit is contained in:
parent
4a219e81dd
commit
c3b73ba47d
45 changed files with 344 additions and 303 deletions
|
|
@ -143,7 +143,7 @@ static void on_trace_event(struct spa_source *source)
|
|||
}
|
||||
|
||||
static const struct spa_log impl_log = {
|
||||
sizeof(struct spa_log),
|
||||
SPA_VERSION_LOG,
|
||||
NULL,
|
||||
DEFAULT_LOG_LEVEL,
|
||||
impl_log_log,
|
||||
|
|
@ -256,6 +256,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
|
|||
}
|
||||
|
||||
static const struct spa_handle_factory logger_factory = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
NAME,
|
||||
NULL,
|
||||
sizeof(struct impl),
|
||||
|
|
|
|||
|
|
@ -592,7 +592,7 @@ static void loop_destroy_source(struct spa_source *source)
|
|||
}
|
||||
|
||||
static const struct spa_loop impl_loop = {
|
||||
sizeof(struct spa_loop),
|
||||
SPA_VERSION_LOOP,
|
||||
loop_add_source,
|
||||
loop_update_source,
|
||||
loop_remove_source,
|
||||
|
|
@ -600,7 +600,7 @@ static const struct spa_loop impl_loop = {
|
|||
};
|
||||
|
||||
static const struct spa_loop_control impl_loop_control = {
|
||||
sizeof(struct spa_loop_control),
|
||||
SPA_VERSION_LOOP_CONTROL,
|
||||
loop_get_fd,
|
||||
loop_add_hooks,
|
||||
loop_enter,
|
||||
|
|
@ -609,7 +609,7 @@ static const struct spa_loop_control impl_loop_control = {
|
|||
};
|
||||
|
||||
static const struct spa_loop_utils impl_loop_utils = {
|
||||
sizeof(struct spa_loop_utils),
|
||||
SPA_VERSION_LOOP_UTILS,
|
||||
loop_add_io,
|
||||
loop_update_io,
|
||||
loop_add_idle,
|
||||
|
|
@ -734,11 +734,12 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
|
|||
}
|
||||
|
||||
static const struct spa_handle_factory loop_factory = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
NAME,
|
||||
NULL,
|
||||
sizeof(struct impl),
|
||||
impl_init,
|
||||
impl_enum_interface_info,
|
||||
impl_enum_interface_info
|
||||
};
|
||||
|
||||
static void reg(void) __attribute__ ((constructor));
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ impl_type_map_get_size(const struct spa_type_map *map)
|
|||
}
|
||||
|
||||
static const struct spa_type_map impl_type_map = {
|
||||
sizeof(struct spa_type_map),
|
||||
SPA_VERSION_TYPE_MAP,
|
||||
NULL,
|
||||
impl_type_map_get_id,
|
||||
impl_type_map_get_type,
|
||||
|
|
@ -208,6 +208,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory,
|
|||
}
|
||||
|
||||
static const struct spa_handle_factory type_map_factory = {
|
||||
SPA_VERSION_HANDLE_FACTORY,
|
||||
NAME,
|
||||
NULL,
|
||||
sizeof(struct impl),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue