mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-15 22:05:28 -05:00
module-rtp: Get the current stream time in a reusable manner
That way, redundant pw_stream_get_nsec() and clock_gettime() calls can be avoided.
This commit is contained in:
parent
3e0f4daf60
commit
955c9ae837
7 changed files with 40 additions and 20 deletions
|
|
@ -1043,8 +1043,11 @@ on_data_io(void *data, int fd, uint32_t mask)
|
|||
if (sess == NULL)
|
||||
goto unknown_ssrc;
|
||||
|
||||
if (sess->data_ready && sess->receiving)
|
||||
rtp_stream_receive_packet(sess->recv, buffer, len);
|
||||
if (sess->data_ready && sess->receiving) {
|
||||
uint64_t current_time = rtp_stream_get_nsec(sess->recv);
|
||||
rtp_stream_receive_packet(sess->recv, buffer, len,
|
||||
current_time);
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue