bluez5: replace codec->bap/asha flags with codec->kind enum

Indicate codec type with enum instead of bool flags.  This is in
preparation of moving also HFP to media codecs.
This commit is contained in:
Pauli Virtanen 2025-06-07 20:18:49 +03:00 committed by Wim Taymans
parent 83c644fe09
commit 4e0d0c5f0b
17 changed files with 97 additions and 46 deletions

View file

@ -120,6 +120,17 @@ static int load_media_codecs_from(struct impl *impl, const char *factory_name, c
break;
}
switch (c->kind) {
case MEDIA_CODEC_A2DP:
case MEDIA_CODEC_BAP:
case MEDIA_CODEC_ASHA:
break;
default:
spa_log_warn(impl->log, "codec plugin %s: unknown codec %s kind %d",
factory_name, c->name, c->kind);
continue;
}
/* Don't load duplicate endpoints */
for (j = 0; j < impl->n_codecs; ++j) {
const struct media_codec *c2 = impl->codecs[j];