mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
bluez5: add aptX and aptX HD codecs
They need the libopenaptx libraries from https://github.com/pali/libopenaptx
This commit is contained in:
parent
af8bb55762
commit
106d597305
11 changed files with 474 additions and 68 deletions
|
|
@ -42,7 +42,8 @@ struct impl {
|
|||
int frame_length;
|
||||
};
|
||||
|
||||
static int codec_fill_caps(uint32_t flags, uint8_t caps[A2DP_MAX_CAPS_SIZE])
|
||||
static int codec_fill_caps(const struct a2dp_codec *codec, uint32_t flags,
|
||||
uint8_t caps[A2DP_MAX_CAPS_SIZE])
|
||||
{
|
||||
const a2dp_aac_t a2dp_aac = {
|
||||
.object_type =
|
||||
|
|
@ -73,8 +74,9 @@ static int codec_fill_caps(uint32_t flags, uint8_t caps[A2DP_MAX_CAPS_SIZE])
|
|||
return sizeof(a2dp_aac);
|
||||
}
|
||||
|
||||
static int codec_select_config(uint32_t flags, const void *caps, size_t caps_size,
|
||||
const struct spa_audio_info *info, uint8_t config[A2DP_MAX_CAPS_SIZE])
|
||||
static int codec_select_config(const struct a2dp_codec *codec, uint32_t flags,
|
||||
const void *caps, size_t caps_size,
|
||||
const struct spa_audio_info *info, uint8_t config[A2DP_MAX_CAPS_SIZE])
|
||||
{
|
||||
a2dp_aac_t conf;
|
||||
int freq;
|
||||
|
|
@ -137,7 +139,8 @@ static int codec_select_config(uint32_t flags, const void *caps, size_t caps_siz
|
|||
return sizeof(conf);
|
||||
}
|
||||
|
||||
static void *codec_init(uint32_t flags, void *config, size_t config_len, struct spa_audio_info *info, size_t mtu)
|
||||
static void *codec_init(const struct a2dp_codec *codec, uint32_t flags,
|
||||
void *config, size_t config_len, struct spa_audio_info *info, size_t mtu)
|
||||
{
|
||||
struct impl *this;
|
||||
int res;
|
||||
|
|
@ -165,8 +168,8 @@ static void codec_deinit(void *data)
|
|||
free(this);
|
||||
}
|
||||
|
||||
struct a2dp_codec a2dp_codec_aac = {
|
||||
.id = {.codec_id = A2DP_CODEC_MPEG24},
|
||||
const struct a2dp_codec a2dp_codec_aac = {
|
||||
.codec_id = A2DP_CODEC_MPEG24,
|
||||
.name = "aac",
|
||||
.description = "AAC",
|
||||
.fill_caps = codec_fill_caps,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue