mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
module-rt: fall back to some defaults in case of error
This commit is contained in:
parent
7b24b3b687
commit
163fde0a69
1 changed files with 15 additions and 6 deletions
|
|
@ -968,11 +968,20 @@ static int do_rtkit_setup(struct spa_loop *loop, bool async, uint32_t seq,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* get some properties */
|
/* get some properties */
|
||||||
if (rtkit_get_int_property(impl, "MaxRealtimePriority", &retval) >= 0)
|
if (rtkit_get_int_property(impl, "MaxRealtimePriority", &retval) < 0) {
|
||||||
|
retval = 1;
|
||||||
|
pw_log_warn("RTKit does not give us MaxRealtimePriority, using %lld", retval);
|
||||||
|
}
|
||||||
impl->max_rtprio = retval;
|
impl->max_rtprio = retval;
|
||||||
if (rtkit_get_int_property(impl, "MinNiceLevel", &retval) >= 0)
|
if (rtkit_get_int_property(impl, "MinNiceLevel", &retval) < 0) {
|
||||||
|
retval = 0;
|
||||||
|
pw_log_warn("RTKit does not give us MinNiceLevel, using %lld", retval);
|
||||||
|
}
|
||||||
impl->min_nice_level = retval;
|
impl->min_nice_level = retval;
|
||||||
if (rtkit_get_int_property(impl, "RTTimeUSecMax", &retval) >= 0)
|
if (rtkit_get_int_property(impl, "RTTimeUSecMax", &retval) < 0) {
|
||||||
|
retval = impl->rl.rlim_cur;
|
||||||
|
pw_log_warn("RTKit does not give us RTTimeUSecMax, using %lld", retval);
|
||||||
|
}
|
||||||
impl->rttime_max = retval;
|
impl->rttime_max = retval;
|
||||||
|
|
||||||
/* Retry set_nice with rtkit */
|
/* Retry set_nice with rtkit */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue