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

@ -694,6 +694,12 @@ enum pw_stream_state rtp_stream_get_state(struct rtp_stream *s, const char **err
return pw_stream_get_state(impl->stream, error);
}
int rtp_stream_set_active(struct rtp_stream *s, bool active)
{
struct impl *impl = (struct impl*)s;
return pw_stream_set_active(impl->stream, active);
}
int rtp_stream_set_param(struct rtp_stream *s, uint32_t id, const struct spa_pod *param)
{