Add native ad-joc-pcm takeover with libswresample

- Add ad-joc-pcm (default no). With it disabled, non-E-AC-3 audio is handed
  directly to ad_lavc and the native component does not take PCM over.
- With ad-joc-pcm=yes, decode registered PCM/compressed codecs with
  libavcodec, convert to 48 kHz interleaved float32 through libswresample,
  and feed joc_core's JOC_STREAM_IN_PCM_LAYOUT path.
- Register common codecs (FLAC, MP3, AAC, AC3, TrueHD, DTS, ALAC, Vorbis,
  Opus, WavPack, APE, TTA, MPC and PCM variants) so ad=joc can select the
  native path for them.
- Keep the existing E-AC-3 JOC path unchanged; ad-joc-pcm only affects
  non-E-AC-3 inputs.
- Document the option in fork/mpv.conf.example and fork/README.md.
This commit is contained in:
TheM14 committed 2026-11-13 14:23:35 +08:00
1 parent 87b850fd2f
commit 66359ff089
4 files changed
+329 -29

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ patches/mpv-ad-joc.patch 对 meson.build / meson.options / f_decoder_wrapper
注册方式与 mpv-omniphony 的 `ad_orender` 相同:`f_decoder_wrapper.c` 里当 `--ad` 列表包含
`joc` 且编码是 `eac3` 时切换 driver;`meson.build` 里加源码、链接 `joc_core`、定义
`HAVE_JOC`;`options/*` 加 `--ad-joc-*` 选项组。
`HAVE_JOC`;`options/*` 加 `--ad-joc-*` 选项组。`ad-joc-pcm=yes` 让非 E-AC-3 的 PCM/普通压缩音频也进入 joc_core 的 PCM_LAYOUT 路径;默认关闭。
## 维护方式:文件 + 锚点,而不是行号补丁