mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -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
|
|
@ -234,6 +234,10 @@ struct dmsbd_data {
|
|||
struct spa_hook hook;
|
||||
};
|
||||
|
||||
static void dmsbd_before(void *data)
|
||||
{
|
||||
}
|
||||
|
||||
static void dmsbd_after(void *data)
|
||||
{
|
||||
struct dmsbd_data *d = data;
|
||||
|
|
@ -244,6 +248,7 @@ static void dmsbd_after(void *data)
|
|||
|
||||
static const struct spa_loop_control_hooks dmsbd_hooks = {
|
||||
SPA_VERSION_LOOP_CONTROL_HOOKS,
|
||||
.before = dmsbd_before,
|
||||
.after = dmsbd_after,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue