rtp: idle the source when in timeout

Idle the source when no packets are received and resume when new packets
arrive.

Add a stream.may-pause property to pause the stream when no packets are
received during the timeout window.

Make sure the rtp.streaming property is updated correctly and as soon as
we get the first packet.

Fixes #4456
This commit is contained in:
Wim Taymans 2025-01-20 16:44:57 +01:00
parent 980d37fb80
commit 96d593cc34
3 changed files with 57 additions and 12 deletions

View file

@ -59,6 +59,7 @@ size_t rtp_stream_get_mtu(struct rtp_stream *s);
void rtp_stream_set_first(struct rtp_stream *s);
int rtp_stream_set_active(struct rtp_stream *s, bool active);
void rtp_stream_set_error(struct rtp_stream *s, int res, const char *error);
enum pw_stream_state rtp_stream_get_state(struct rtp_stream *s, const char **error);