mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
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:
parent
980d37fb80
commit
96d593cc34
3 changed files with 57 additions and 12 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue