summaryrefslogtreecommitdiff
path: root/src/codec/codecs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec/codecs.c')
-rw-r--r--src/codec/codecs.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/codec/codecs.c b/src/codec/codecs.c
index a373daf..de0a785 100644
--- a/src/codec/codecs.c
+++ b/src/codec/codecs.c
@@ -18,7 +18,8 @@
struct camu_codec_info codec_information[] = {
#ifdef CAMU_HAVE_WUFFS
{
- .name = al_str_c("wuffs"),
+ .id = al_str_c("wuffs"),
+ .name = al_str_c("Wuffs"),
.supported = (s32[]){ CAMU_CODEC_PNG, CAMU_CODEC_NONE },
#ifdef LIANA_SERVER
.create_demuxer = camu_wuffs_demuxer_create,
@@ -30,7 +31,12 @@ struct camu_codec_info codec_information[] = {
#endif
#ifdef CAMU_HAVE_STB_IMAGE
{
+ .id = al_str_c("stbi"),
+#ifdef CAMU_STBI_USE_WUFFS
+ .name = al_str_c("Wuffs (via stb_image API)"),
+#else
.name = al_str_c("stb_image"),
+#endif
.supported = (s32[]){ CAMU_CODEC_PNG, CAMU_CODEC_JPEG, CAMU_CODEC_NONE },
#ifdef LIANA_SERVER
.create_demuxer = camu_stbi_demuxer_create,
@@ -42,6 +48,7 @@ struct camu_codec_info codec_information[] = {
#endif
#ifdef CAMU_HAVE_SPNG
{
+ .id = al_str_c("spng"),
.name = al_str_c("spng"),
.supported = (s32[]){ CAMU_CODEC_PNG, CAMU_CODEC_NONE },
#ifdef LIANA_SERVER
@@ -54,6 +61,7 @@ struct camu_codec_info codec_information[] = {
#endif
#ifdef CAMU_HAVE_FFMPEG
{
+ .id = al_str_c("ff"),
.name = al_str_c("FFmpeg"),
.supported = (s32[]){ CAMU_CODEC_FALLBACK },
#ifdef LIANA_SERVER
@@ -81,13 +89,13 @@ struct camu_codec_info *camu_codec_info_by_type(s32 type)
return NULL;
}
-struct camu_codec_info *camu_codec_info_by_name(str *name)
+struct camu_codec_info *camu_codec_info_by_id(str *id)
{
- if (al_str_eq(name, &al_str_c("pcm_s16le"))) {
+ if (al_str_eq(id, &al_str_c("pcm_s16le"))) {
return (struct camu_codec_info *)0xcdda;
}
for (u32 i = 0; i < ARRAY_SIZE(codec_information); i++) {
- if (al_str_eq(&codec_information[i].name, name)) {
+ if (al_str_eq(&codec_information[i].id, id)) {
return &codec_information[i];
}
}