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:
Wim Taymans 2023-05-06 00:24:05 +02:00
parent 9967c35bbe
commit efea7ad060
12 changed files with 76 additions and 29 deletions

View file

@ -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,
};