mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-24 01:40:20 -05:00
bluez5: bap: determine SDU interval from codec frame duration
BlueZ API as BAP Server gives us the ISO interval, instead of the SDU interval, in the MediaTransport.QoS.Interval property. They are not necessarily the same. What we need is the SDU interval. The SDU interval is the interval between packets the encoder outputs, so it is determined by the codec configuration, and for LC3 is equal to the frame duration. Add codec method get_interval() that returns the correct interval, and use it in iso-io.
This commit is contained in:
parent
b9ac79e99a
commit
5ae0dfb239
5 changed files with 47 additions and 16 deletions
|
|
@ -1008,6 +1008,13 @@ static int codec_get_block_size(void *data)
|
|||
return this->codesize;
|
||||
}
|
||||
|
||||
static uint64_t codec_get_interval(void *data)
|
||||
{
|
||||
struct impl *this = data;
|
||||
|
||||
return (uint64_t)this->frame_dus * 1000;
|
||||
}
|
||||
|
||||
static int codec_abr_process (void *data, size_t unsent)
|
||||
{
|
||||
return -ENOTSUP;
|
||||
|
|
@ -1120,6 +1127,7 @@ const struct media_codec bap_codec_lc3 = {
|
|||
.init = codec_init,
|
||||
.deinit = codec_deinit,
|
||||
.get_block_size = codec_get_block_size,
|
||||
.get_interval = codec_get_interval,
|
||||
.abr_process = codec_abr_process,
|
||||
.start_encode = codec_start_encode,
|
||||
.encode = codec_encode,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue