From c66c7c64ebd16287b892f8a780cffcabafba3799 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Mon, 7 Sep 2026 15:06:14 -0400 Subject: Better OSD behavior, lots of build stuff Signed-off-by: Andrew Opalach --- src/codec/codecs.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/codec/codecs.c') 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]; } } -- cgit v1.2.3-101-g0448