feat: FFmpeg n8.1.2 as C++ modules — full-feature source build via mcpp (v0.0.1)#1
Merged
Merged
Conversation
- vendor FFmpeg n8.1.2 (third_party/ffmpeg, LGPL-2.1+ hermetic profile) - gen/linux-x86_64 configure snapshot + gen/public consumer-visible avconfig.h - mcpp builds all 2281 sources (2124 .c + 157 NASM .asm) directly, ~21s cold - module layer: import ffmpeg.av (+ 7 per-lib modules), C API names unchanged; generated export surface (978 fn / 194 struct / 76 enum / 1450 enumerators) - include/ffmpeg-m/macros.h side header (include BEFORE import) + C++ replacements for C-only compound-literal macros (av_err2string family) - tools/: gen_config.sh (configure→snapshot), gen_sources.py (make -n → source list, dual-mode pending mcpp#229), gen_exports.py (headers→exports) - tests: API surface + self-contained MJPEG/Matroska encode→decode roundtrip - examples: probe, decode_frames; template: decode (imgui-m style) - CI: linux required (build+test+examples), macOS snapshot machinery (experimental, artifact for future gen/macos-aarch64); release workflow (tag → verify → GitHub Release) Refs: mcpp-community/mcpp#226 #227 #228 #229
…w the thin module layer - drop third_party/ffmpeg (112MB vendor) and gen/ snapshots: sources, config snapshot, and the full build recipe now live in the compat.ffmpeg index package (mcpp-index#74, official tarball + CN mirror, sha256-pinned) - mcpp.toml: module layer only + compat.ffmpeg = "8.1.2" dependency - tools: fetch_upstream.sh (pinned official tarball) + gen_config.sh now emits the index descriptor directly (gen_descriptor.py); gen_sources.py removed - CI: temporary index bridge until mcpp-index#74 publishes; macOS job reduced to packaging-machinery smoke (configure + source derivation) - verified: build + test (2 passed) + both examples against the local index (157 .asm.o, 3260 SIMD symbols)
…line to mcpp-index compat.ffmpeg 8.1.2 is published (mcpp-index#74 merged, artifact live), so: - ci: remove the temporary compat-index bridge step - ci: drop the macOS packaging-snapshot job (packaging machinery follows the descriptor to mcpp-index tools/compat-ffmpeg/) - tools: keep only fetch_upstream.sh + gen_exports.py (export-surface regen); gen_config.sh / gen_descriptor.py move to mcpp-index - delete stray tracked third_party fate refs from the vendored era
…peg, LGPL-2.1-or-later)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
ffmpeg-m v0.0.1:FFmpeg 8.1.2 的纯 C++23 模块层。C API 原名原样、用法零迁移,只是不再需要头文件:
FFmpeg 源码不 vendor:经
compat.ffmpegindex 包到达消费者(官方 tarball + CN 镜像,sha256 钉死,全源码直编 2281 TU 含 157 NASM.asm,冷构建 ≈ 21s/32 核,构建期零 configure/make/CMake)。内容
ffmpeg.av伞模块 + 7 库模块(依赖export import镜像库拓扑)+ lib-rootffmpeg;生成的导出面 978 函数 / 194 结构体 / 76 枚举 / 1450 枚举常量include/ffmpeg-m/macros.h伴随头(须在 import 之前 include);C-only 复合字面量宏给出 C++ 等价物(av_err2string族)fetch_upstream.sh(官方 tarball 钉版下载)+gen_exports.py(头文件 → 导出面;升级 FFmpeg = 重跑 + review diff)。compat 描述符流水线(gen_config/gen_descriptor)随描述符迁往 mcpp-indextools/compat-ffmpeg/CI
compat.ffmpeg(无桥接),build + test + 双 examplev*→ 复验 build+test → 校验 tag 与包版本一致 → GitHub Release(自动 notes)关联 mcpp issue(本项目产出)
-iquote相对路径不重写)[[build.flags]]数组表)mcpp index update规避)验证(本地,mcpp 0.0.95 / gcc 16.1.0)
compat.ffmpeg→ 下载官方 tarball → 全源码直编 → 运行 ✓mcpp build✓mcpp test✓(2 passed)examples/probe✓(358 demuxers,h264/hevc/av1/vp9/aac/opus/flac 全 ok)examples/decode_frames✓设计与实现记录:
.agents/docs/2026-07-18-ffmpeg-m-{research-and-plan,implementation}.md(含拆分与精简 addendum)