mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
hooks: add and use _fast callback function
Add a _fast callback function that skips the version and method check. We can use this in places where performance is critical when we do the check out of the critical loops. Make all system methods _fast calls. We expect them to exist and have the right version. If we add new versions we can make them slow.
This commit is contained in:
parent
9967c35bbe
commit
efea7ad060
12 changed files with 76 additions and 29 deletions
|
|
@ -319,6 +319,8 @@ loop_add_hook(void *object,
|
|||
void *data)
|
||||
{
|
||||
struct impl *impl = object;
|
||||
spa_return_if_fail(SPA_CALLBACK_CHECK(hooks, before, 0));
|
||||
spa_return_if_fail(SPA_CALLBACK_CHECK(hooks, after, 0));
|
||||
spa_hook_list_append(&impl->hooks_list, hook, hooks, data);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue