raop: implement retransmission

Keep the last relation between the sequence number and the timestamp
(ringbuffer position).

When a retransmission is requested for a given sequence number use the
relation to calculate the corresponding timestamp and retransmit the
packet from the ringbuffer again.

See #5276
This commit is contained in:
Wim Taymans 2026-05-19 17:30:28 +02:00
parent a6fe6196d5
commit d56d5fa87a
4 changed files with 96 additions and 43 deletions

View file

@ -66,6 +66,8 @@ int rtp_stream_update_properties(struct rtp_stream *s, const struct spa_dict *di
int rtp_stream_receive_packet(struct rtp_stream *s, uint8_t *buffer, size_t len,
uint64_t current_time);
int rtp_stream_resend_packets(struct rtp_stream *s, uint16_t seq, uint16_t num);
uint64_t rtp_stream_get_nsec(struct rtp_stream *s);
uint64_t rtp_stream_get_time(struct rtp_stream *s, uint32_t *rate);