mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
bluez5: aac, lc3plus: report bitpool changes
Behavior similar to SBC. This makes return value useful for media-sink logger.
This commit is contained in:
parent
1bea58c20b
commit
02a4758043
2 changed files with 7 additions and 5 deletions
|
|
@ -610,7 +610,7 @@ static int codec_change_bitrate(struct impl *this, int new_bitrate)
|
||||||
if (res != AACENC_OK)
|
if (res != AACENC_OK)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
return 0;
|
return this->cur_bitrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int codec_reduce_bitpool(void *data)
|
static int codec_reduce_bitpool(void *data)
|
||||||
|
|
|
||||||
|
|
@ -747,15 +747,17 @@ static SPA_UNUSED int codec_decode(void *data,
|
||||||
static int codec_reduce_bitpool(void *data)
|
static int codec_reduce_bitpool(void *data)
|
||||||
{
|
{
|
||||||
struct impl *this = data;
|
struct impl *this = data;
|
||||||
this->e.next_bitrate = this->bitrate * 3 / 4;
|
this->e.next_bitrate = SPA_CLAMP(this->bitrate * 3 / 4,
|
||||||
return 0;
|
BITRATE_MIN * this->channels, BITRATE_MAX * this->channels);
|
||||||
|
return this->e.next_bitrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int codec_increase_bitpool(void *data)
|
static int codec_increase_bitpool(void *data)
|
||||||
{
|
{
|
||||||
struct impl *this = data;
|
struct impl *this = data;
|
||||||
this->e.next_bitrate = this->bitrate * 5 / 4;
|
this->e.next_bitrate = SPA_CLAMP(this->bitrate * 5 / 4,
|
||||||
return 0;
|
BITRATE_MIN * this->channels, BITRATE_MAX * this->channels);
|
||||||
|
return this->e.next_bitrate;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct media_codec a2dp_codec_lc3plus_hr = {
|
const struct media_codec a2dp_codec_lc3plus_hr = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue