From: Gyan Doshi via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Gyan Doshi <code@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH] WIP: [RFC] avformat/a64: add codec tag list (PR #21205)
Date: Mon, 15 Dec 2025 12:30:08 -0000
Message-ID: <176580181708.60.18193401190457969877@2cb04c0e5124> (raw)
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
reply other threads:[~2025-12-15 21:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176580181708.60.18193401190457969877@2cb04c0e5124 \
--to=ffmpeg-devel@ffmpeg.org \
--cc=code@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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