mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
module-rtp-source: touch session on RTP
Don't time out while actually running
This commit is contained in:
parent
c1cf2143b2
commit
7b3d02b7fa
1 changed files with 8 additions and 7 deletions
|
|
@ -342,6 +342,13 @@ static void stream_io_changed(void *data, uint32_t id, void *area, uint32_t size
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void session_touch(struct session *sess)
|
||||||
|
{
|
||||||
|
struct timespec ts;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
sess->timestamp = SPA_TIMESPEC_TO_NSEC(&ts);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
on_rtp_io(void *data, int fd, uint32_t mask)
|
on_rtp_io(void *data, int fd, uint32_t mask)
|
||||||
{
|
{
|
||||||
|
|
@ -437,6 +444,7 @@ on_rtp_io(void *data, int fd, uint32_t mask)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
session_touch(sess);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
receive_error:
|
receive_error:
|
||||||
|
|
@ -539,13 +547,6 @@ static uint32_t msec_to_bytes(struct sdp_info *info, uint32_t msec)
|
||||||
return msec * info->stride * info->info.rate / 1000;
|
return msec * info->stride * info->info.rate / 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void session_touch(struct session *sess)
|
|
||||||
{
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
sess->timestamp = SPA_TIMESPEC_TO_NSEC(&ts);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void session_free(struct session *sess)
|
static void session_free(struct session *sess)
|
||||||
{
|
{
|
||||||
if (sess->impl) {
|
if (sess->impl) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue