pipe-tunnel: support pipe-source as a driver

Use a timer to periodically schedule the pipe-source when configured
as a driver. Adjust the timeout period based on buffer fill levels.

Fixes #3478
This commit is contained in:
Wim Taymans 2023-08-31 11:41:00 +02:00
parent f25da522a4
commit 9f30e58ef2
2 changed files with 119 additions and 14 deletions

View file

@ -150,10 +150,10 @@ static int module_pipe_source_prepare(struct module * const module)
pw_properties_set(stream_props, PW_KEY_NODE_NAME,
"fifo_input");
// if ((str = pw_properties_get(stream_props, PW_KEY_NODE_DRIVER)) == NULL)
// pw_properties_set(stream_props, PW_KEY_NODE_DRIVER, "true");
// if ((str = pw_properties_get(stream_props, PW_KEY_PRIORITY_DRIVER)) == NULL)
// pw_properties_set(stream_props, PW_KEY_PRIORITY_DRIVER, "50000");
if ((str = pw_properties_get(stream_props, PW_KEY_NODE_DRIVER)) == NULL)
pw_properties_set(stream_props, PW_KEY_NODE_DRIVER, "true");
if ((str = pw_properties_get(stream_props, PW_KEY_PRIORITY_DRIVER)) == NULL)
pw_properties_set(stream_props, PW_KEY_PRIORITY_DRIVER, "50000");
d->module = module;
d->stream_props = stream_props;