mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
bluez5: media-source: support codec-provided packet loss concealment
If packet sequence number jumps ahead, or we would underflow, use codec-provided packet loss concealment to produce some audio data. When we produce it during underflow, skip the corresponding number of sequence numbers of future packets. If codec doesn't have PLC, keep the previous behavior (pad with zeros, buffering pauses to wait for data).
This commit is contained in:
parent
d0680a2b3d
commit
90a1b35017
2 changed files with 141 additions and 83 deletions
|
|
@ -168,6 +168,11 @@ static inline void *spa_bt_decode_buffer_get_write(struct spa_bt_decode_buffer *
|
|||
return SPA_PTROFF(this->buffer_decoded, this->write_index, void);
|
||||
}
|
||||
|
||||
static inline size_t spa_bt_decode_buffer_get_size(struct spa_bt_decode_buffer *this)
|
||||
{
|
||||
return this->write_index - this->read_index;
|
||||
}
|
||||
|
||||
static inline void spa_bt_decode_buffer_write_packet(struct spa_bt_decode_buffer *this, uint32_t size, uint64_t nsec)
|
||||
{
|
||||
int32_t remain;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue