* [FFmpeg-devel] [PATCH] WIP: [RFC] avformat/a64: add codec tag list (PR #21205)
@ 2025-12-15 12:30 Gyan Doshi via ffmpeg-devel
0 siblings, 0 replies; only message in thread
From: Gyan Doshi via ffmpeg-devel @ 2025-12-15 12:30 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Gyan Doshi
PR #21205 opened by Gyan Doshi (GyanD)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21205
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21205.patch
I'm writing a py script which prepares
1) for each muxer, a list of the codec IDs it accepts.
2) for each codec ID, a list of the muxers which accept it.
Out of 184 muxers in git master, I've identified 65 where neither `.p.codec_tag` nor `.query_codec` is populated and neither is the flag `FF_OFMT_FLAG_ONLY_DEFAULT_CODECS` set i.e. the muxer accepts multiple codecs but there is no standardized data structure containing that list. Codec acceptance is tested usually via a switch or if-else block in init or write_header.
So, I'm about to start the process of adding codec tag lists for all such muxers.
But before I start, this is a RFC patch for this project, for the base idea as well as implementation.
>From 3a44733e2e5df161972515d37a8e95047456c97a Mon Sep 17 00:00:00 2001
From: Gyan Doshi <ffmpeg@gyani.pro>
Date: Mon, 15 Dec 2025 17:41:02 +0530
Subject: [PATCH] avformat/a64: add codec tag list
---
libavformat/a64.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavformat/a64.c b/libavformat/a64.c
index 6e722c7e9f..f0db77d513 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -60,6 +60,12 @@ static int a64_write_header(AVFormatContext *s)
return 0;
}
+static const AVCodecTag codec_a64_tags[] = {
+ { AV_CODEC_ID_A64_MULTI, 0 },
+ { AV_CODEC_ID_A64_MULTI5, 0 },
+ { AV_CODEC_ID_NONE, 0 }
+};
+
const FFOutputFormat ff_a64_muxer = {
.p.name = "a64",
.p.long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"),
@@ -67,6 +73,7 @@ const FFOutputFormat ff_a64_muxer = {
.p.video_codec = AV_CODEC_ID_A64_MULTI,
.p.audio_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
+ .p.codec_tag = (const AVCodecTag* const []){ codec_a64_tags, 0 },
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
.write_header = a64_write_header,
.write_packet = ff_raw_write_packet,
--
2.49.1
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-15 21:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-15 12:30 [FFmpeg-devel] [PATCH] WIP: [RFC] avformat/a64: add codec tag list (PR #21205) Gyan Doshi via ffmpeg-devel
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git