mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
pulse-server: support use_system_clock_for_timing
Move the pipe-sink to the dummy driver when instructed to use the system clock.
This commit is contained in:
parent
20fdafb7f1
commit
bc15d0c766
1 changed files with 11 additions and 1 deletions
|
|
@ -100,7 +100,8 @@ static const struct spa_dict_item module_pipe_sink_info[] = {
|
|||
"format=<sample format> "
|
||||
"rate=<sample rate> "
|
||||
"channels=<number of channels> "
|
||||
"channel_map=<channel map> " },
|
||||
"channel_map=<channel map> "
|
||||
"use_system_clock_for_timing=<yes or no> " },
|
||||
{ PW_KEY_MODULE_VERSION, PACKAGE_VERSION },
|
||||
};
|
||||
|
||||
|
|
@ -111,6 +112,7 @@ static int module_pipe_sink_prepare(struct module * const module)
|
|||
struct pw_properties *global_props = NULL, *stream_props = NULL;
|
||||
struct spa_audio_info_raw info = { 0 };
|
||||
const char *str;
|
||||
bool use_system_clock;
|
||||
int res = 0;
|
||||
|
||||
PW_LOG_TOPIC_INIT(mod_topic);
|
||||
|
|
@ -143,6 +145,14 @@ static int module_pipe_sink_prepare(struct module * const module)
|
|||
pw_properties_set(global_props, "pipe.filename", str);
|
||||
pw_properties_set(props, "file", NULL);
|
||||
}
|
||||
str = pw_properties_get(props, "use_system_clock_for_timing");
|
||||
use_system_clock = str ? module_args_parse_bool(str) : false;
|
||||
|
||||
if ((str = pw_properties_get(stream_props, PW_KEY_NODE_GROUP)) == NULL) {
|
||||
if (use_system_clock)
|
||||
pw_properties_set(stream_props, PW_KEY_NODE_GROUP,
|
||||
"pipewire.dummy");
|
||||
}
|
||||
if ((str = pw_properties_get(stream_props, PW_KEY_DEVICE_ICON_NAME)) == NULL)
|
||||
pw_properties_set(stream_props, PW_KEY_DEVICE_ICON_NAME,
|
||||
"audio-card");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue