mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
gst: measure keepalive-time in milliseconds
And round up to the next integer for now.
This commit is contained in:
parent
9b4b7d1a2c
commit
36511a5d8e
1 changed files with 2 additions and 2 deletions
|
|
@ -345,7 +345,7 @@ gst_pipewire_src_class_init (GstPipeWireSrcClass * klass)
|
||||||
PROP_KEEPALIVE_TIME,
|
PROP_KEEPALIVE_TIME,
|
||||||
g_param_spec_int ("keepalive-time",
|
g_param_spec_int ("keepalive-time",
|
||||||
"Keepalive Time",
|
"Keepalive Time",
|
||||||
"Periodically send last buffer (in seconds, 0 = disabled)",
|
"Periodically send last buffer (in milliseconds, 0 = disabled)",
|
||||||
0, G_MAXINT, DEFAULT_KEEPALIVE_TIME,
|
0, G_MAXINT, DEFAULT_KEEPALIVE_TIME,
|
||||||
G_PARAM_READWRITE |
|
G_PARAM_READWRITE |
|
||||||
G_PARAM_STATIC_STRINGS));
|
G_PARAM_STATIC_STRINGS));
|
||||||
|
|
@ -917,7 +917,7 @@ gst_pipewire_src_create (GstPushSrc * psrc, GstBuffer ** buffer)
|
||||||
}
|
}
|
||||||
timeout = FALSE;
|
timeout = FALSE;
|
||||||
if (pwsrc->keepalive_time > 0) {
|
if (pwsrc->keepalive_time > 0) {
|
||||||
if (pw_thread_loop_timed_wait (pwsrc->core->loop, pwsrc->keepalive_time) == ETIMEDOUT)
|
if (pw_thread_loop_timed_wait (pwsrc->core->loop, (pwsrc->keepalive_time + 999) / 1000) == ETIMEDOUT)
|
||||||
timeout = TRUE;
|
timeout = TRUE;
|
||||||
} else {
|
} else {
|
||||||
pw_thread_loop_wait (pwsrc->core->loop);
|
pw_thread_loop_wait (pwsrc->core->loop);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue