Veyra-NRVideo 1.4.0 Remote Play 构建指南:显式开关、Chiaki 固定提交与对应源码边界

原创2026-11-14 23:57:471,888 阅读
文章标签:音视频视频处理图像处理桌面应用直播

Veyra-NRVideo 1.4.0 Remote Play 构建指南:显式开关、Chiaki 固定提交与对应源码边界

1.4.0 便携包是第一个通过 VEYRA_ENABLE_REMOTEPLAY 把 PS5 Remote Play 编进主程序的产品构建,它同时带来一整套"可对应源码"的约束:固定到某一提交的上游 Chiaki、只允许两个经评审的补丁、静态依赖、以及 AGPL-3.0-only + OpenSSL exception 与 GPLv3 并存的许可证边界。本文以 REMOTEPLAY_BUILD_1.4.0.md 为主线,结合 cmake/VeyraRemotePlay.cmake、scripts/remoteplay/build-native.ps1、scripts/build.ps1 与 scripts/remoteplay/verify-chiaki-stage.py,把"怎么定位来源、怎么准备依赖、怎么分两步构建、哪些东西绝对不能混进包"讲成可复现的流程。

一、Remote Play 是一个默认关闭的显式构建选项

原始文档的第一句就是关键约束:1.4.0 便携包启用了 VEYRA_ENABLE_REMOTEPLAY;不带该选项的默认构建不包含 PS5 Remote Play。 这一点在仓库里是硬编码的 CMake 选项,而不是运行时开关:

option(VEYRA_ENABLE_REMOTEPLAY "Build PS5 Remote Play with pinned Chiaki source" OFF)

见 CMakeLists.txt。选项打开后,主构建会做三件事:引入 Remote Play 的 CMake 模块、给 sources 库打上 VEYRA_ENABLE_REMOTEPLAY=1 宏、并把两个产品侧 source 实现编进去:

if(VEYRA_ENABLE_REMOTEPLAY)
  set(VEYRA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
  include(cmake/VeyraRemotePlay.cmake)
  target_compile_definitions(veyra_sources PUBLIC VEYRA_ENABLE_REMOTEPLAY=1)
  target_sources(veyra_sources PRIVATE src/source/RemotePlaySource.cpp src/source/RemotePlaySessionSource.cpp)
  target_link_libraries(veyra_sources PUBLIC veyra_remoteplay_chiaki)
endif()

见 CMakeLists.txt。

从源码结构看,这个开关还牵动三层入口:

层级 打开开关后的变化 位置
核心库 编译 veyra_remoteplay_core(Validation / AnnexB / Timeline / VideoIngress / SessionInbox) cmake/VeyraRemotePlay.cmake
Chiaki 适配 编译 veyra_remoteplay_chiaki(ChiakiBackend / ChiakiRegistration / ProfileStore / PsnAuth / Discovery)并链接真实 chiaki-lib cmake/VeyraRemotePlay.cmake
产品/UI/工具 编译 PS5 硬件图像与质量测试、RemotePlayPanel.cpp、ControllerInput.cpp、veyra_remoteplay_boundary_tests、veyra_remoteplay_profile_tests,以及无界面 veyra_remoteplay_probe CMakeLists.txt、CMakeLists.txt

含义很直接:默认构建(不带开关)是一个功能减少后的构建,不能拿它来复现 1.4.0 便携包的能力,也不能用它验证 Remote Play 相关代码路径。文档里那句 "The default build without this option does not include PS5 Remote Play" 就是这条边界的正式表述。

二、1.4.0 包的来源主线

文档说明了包的出处:该包从 main 构建,孤立的 colour / AverMedia / export 分支在构建前已合并;v1.4.0 tag 会在发布时创建。 因此"对应源码"的第一层含义是:

需要特别区分的是:"包从 main 构建"不等于"任何人 clone 后一定能编出同样的包"。同一份源码,VEYRA_ENABLE_REMOTEPLAY 开与不开、依赖根路径不同、Chiaki stage 是否与 pin 完全一致,都会产出不同的二进制边界。这正是下文的验证脚本存在的原因。

三、Chiaki 固定提交与两个经评审的补丁

文档把上游钉死在一个具体提交上:

Chiaki is pinned to 0e16950165f06e5c3291537c2eeba6e852be7120 from chiaki-ng, with the reviewed patches in scripts/remoteplay/patches/.

这条 pin 在仓库里出现在三处,互相交叉校验:

scripts/remoteplay/patches/ 目录下只有两个补丁,正对应文档所说的 "reviewed patches":

补丁 作用范围 内容要点
0001-chiaki-msvc-vla-compat.patch lib/src/ctrl.c、regist.c、remote/holepunch.c、remote/rudp.c、session.c 把 MSVC 不支持的变长数组(VLA)缓冲区改为 malloc/free,并补充尺寸与返回值检查,例如 size_t buf_size = sizeof(header) + payload_size; 加溢出判断后分配(见 补丁第 6-24 行)
0002-chiaki-video-metadata.patch lib/include/chiaki/session.h、lib/src/videoreceiver.c 新增 CHIAKI_VEYRA_VIDEO_METADATA_API、ChiakiVeyraVideoSampleKind(CONFIG / FRAME)、ChiakiVeyraVideoSampleInfo(帧号、宽高、丢帧数、参考帧恢复)与 ChiakiVeyraVideoSampleCallback;在 profile 切换与整帧回调处优先走新回调,旧 callback 作为回退

第二个补丁决定了产品侧为什么需要"帧号 + 分辨率 + 丢帧数 + reference_recovered":没有它,适配层只能拿到裸码流和笼统的 frames_lost,无法在 SessionInbox 的 Snapshot(含 framesLost、referenceRecoveryEvents、decodedFps 等字段,见 include/veyra/remoteplay/SessionInbox.h)里给出可信的恢复与统计语义。

3.1 补丁不是"改到能编就算":内容级校验

build-native.ps1 用 git worktree add --detach 在独立 stage 目录里落一份 pin 版本,递归更新子模块,然后逐个补丁先做反向检查,再正向 apply:

$head = (& git -C $ChiakiCheckout rev-parse HEAD).Trim()
if ($LASTEXITCODE -ne 0 -or $head -ne $PinnedCommit) { throw "Chiaki source pin mismatch: $head" }

见 scripts/remoteplay/build-native.ps1。随后:

foreach ($name in @("0001-chiaki-msvc-vla-compat.patch", "0002-chiaki-video-metadata.patch")) {
    ... git apply --reverse --check $patch ...
    if (-not $alreadyApplied) {
        Invoke-Checked "git" @("-C",$StageDirectory,"apply","--check",$patch)
        Invoke-Checked "git" @("-C",$StageDirectory,"apply",$patch)
    }
}

见 scripts/remoteplay/build-native.ps1。

真正的强校验在 verify-chiaki-stage.py 里。它不是"反向能打回就算干净",而是在临时 index 中从 pin 重建预期树,再用 git diff --exit-code 与真实 worktree 比对:

with tempfile.TemporaryDirectory(prefix="veyra-chiaki-index-") as folder:
    env = dict(os.environ, GIT_INDEX_FILE=str(Path(folder) / "index"))
    git(stage, "read-tree", PIN, env=env)
    for patch in PATCHES:
        git(stage, "apply", "--cached", str(Path(__file__).resolve().parent / "patches" / patch), env=env)
    expected = git(stage, "write-tree", env=env)
    git(stage, "diff", "--exit-code", "--ignore-submodules=none", expected)
print("CHIAKI_STAGE_EXACT_PATCHES_VERIFIED")

见 scripts/remoteplay/verify-chiaki-stage.py。同一脚本还会校验 clean 与 stage 两棵树的 HEAD、index 暂存区是否为空、递归子模块状态标记首字符(line[0] != " " 视为子模块缺失或 pin 不匹配)、以及是否存在未跟踪文件:

if any(line and line[0] != " " for line in raw.splitlines()):
    raise RuntimeError("Chiaki submodule absent or pin mismatch")

见 scripts/remoteplay/verify-chiaki-stage.py。

这条设计直接来自历史审计的教训:docs/remoteplay/NATIVE_GATE.md 曾明确指出"脚本只凭文件名和 reverse-apply 检查,尚不足以拒绝同文件内的额外修改",要求后续完善全量 stage、index、commit 和递归子模块验证。1.4.0 的脚本已经是补强后的版本。如果你在 stage 里手工塞过别的改动,即使能编过,校验也会失败——这是特性,不是障碍。

四、依赖清单:不是"关掉 RUDP 就会消失"

文档要求使用"记录在源码归档中的依赖路径",并明确 Veyra 侧需要 Visual Studio 2022 x64 工具、CMake、Ninja、Python 与 protobuf 工具。依赖集合在 scripts/remoteplay/dependency-lock.json 中列出:

依赖 用途/说明
Opus 音频编解码(CHIAKI_LIB_ENABLE_OPUS=ON)
OpenSSL 上游加密路径(保留上游 OpenSSL exception)
nanopb / protobuf tooling 协议消息生成,需要 protoc
Jerasure / gf-complete FEC
curl HTTP 相关
json-c PSN/OAuth 响应解析(veyra_remoteplay_chiaki 通过 pkg-config 显式链接)
libevent 事件循环
miniupnpc 局域网发现/端口映射
SDL3 3.4.14 static 仅用于手柄输入;dependency-lock.json 记录了源码版本与 archive SHA-512

CMake 模块里对这些依赖的处理有几个容易踩的点,值得逐条抄下来:

  1. Chiaki 的 GUI/CLI/测试/Android 等全部显式关闭,避免把不需要的上游前端编进来:CHIAKI_ENABLE_GUI/CLI/TESTS/ANDROID/BOREALIS/OFF、CHIAKI_ENABLE_*_DECODER OFF、CHIAKI_LIB_ENABLE_OPUS ON,见 cmake/VeyraRemotePlay.cmake。
  2. MINIUPNP_STATICLIB 必须定义。模块注释写得很清楚:vcpkg 的静态 miniupnpc 头文件在 Windows 上默认按 dllimport 处理,不显式声明静态 ABI 时,库能被找到但会留下 __imp_* 未解析符号:
target_compile_definitions(chiaki-lib PRIVATE MINIUPNP_STATICLIB)

见 cmake/VeyraRemotePlay.cmake。

  1. 关掉 RUDP 不等于删掉依赖。模块注释直接写明 "Disabling RUDP does NOT remove curl/json-c/libevent/miniupnpc in the pinned lib",并要求提供真实匹配工具链的开发库,"never replace them with empty imported targets or remove FEC to force the native gate green"。任何通过伪造 imported target 或删源码让配置通过的做法,都会让最终产物与 1.4.0 包不等价。
  2. 没有 stub 回退:VEYRA_RP_CHIAKI_SOURCE_DIR 下若不存在 lib/include/chiaki/session.h,配置阶段直接 FATAL_ERROR;add_subdirectory 之后若没生成 chiaki-lib 目标,同样 FATAL_ERROR(cmake/VeyraRemotePlay.cmake、#L51-L53)。

五、构建前置条件与目录约定

原始文档给出的构建前置是:Visual Studio 2022 x64 工具、CMake、Ninja、Python、protobuf 工具、源码归档中记录的依赖路径,以及 BUILD.md 中描述的单独授权增强 SDK。落到仓库脚本,还有更具体的要求:

  • MSVC 环境:build.ps1 会优先用 vswhere 定位带 Microsoft.VisualStudio.Component.VC.Tools.x86.x64 的安装,找不到时回退 C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools,再找不到就退出码 3;vcvars64.bat 缺失同样退出码 3(scripts/build.ps1)。
  • CMake 预设只有两个:x64-debug 与 x64-release,生成器均为 Ninja,release 的 CMAKE_BUILD_TYPE=Release(CMakePresets.json)。
  • 构建目录:默认 out/build/<preset>,可用 -BuildDirectory 指定,-Clean 会先删该目录(scripts/build.ps1)。
  • FFmpeg 根:默认 C:\veyra-deps\installed\x64-windows,需含 include/lib/bin/share;若存在 bin/dav1d.dll 会一并复制到应用目录(scripts/build.ps1、#L119-L132)。

一个容易忽略的细节:项目路径含空格会让 FFmpeg 构建失败,脚本默认把依赖放在 C:\veyra-deps,注释里就写着 "the project path contains spaces, which FFmpeg's build refuses"(scripts/build.ps1)。这与文档所说的"记录在源码归档中的依赖路径"是一回事:路径是构建契约的一部分,换机需要重新定位真实文件。

六、第一步:构建并校验固定 Chiaki 原生探测

文档的构建顺序是:先用 scripts/remoteplay/build-native.ps1 构建固定 Chiaki 检出,再用同样的依赖路径运行 scripts/build.ps1 -Root . -Preset x64-release -RemotePlay。

build-native.ps1 的完整参数集来自脚本定义(scripts/remoteplay/build-native.ps1):

参数 必填 默认值/说明
-ChiakiCheckout 是 干净的上游 checkout,HEAD 必须等于 pin 且工作区干净
-Root 否 默认脚本上两级目录(即仓库根)
-StageDirectory 否 默认 out/remoteplay/chiaki-msvc-stage,脚本会在此建独立 worktree
-BuildDirectory 否 默认 out/remoteplay/native
-PrefixPath 否 依赖安装前缀,传入 -DCMAKE_PREFIX_PATH
-ToolchainFile 否 vcpkg 等工具链文件
-ProtocPath 否 传入 -DPROTOC,缺失会在配置阶段报 Could not find protoc
-PkgConfigPath 否 传入 -DPKG_CONFIG_EXECUTABLE
-Generator 否 默认 Ninja

脚本的核心调用链是:校验 pin 与干净度 → 建/复用 worktree → 递归子模块 → 逐补丁 apply → verify-chiaki-stage.py → 配置并构建 services/remoteplay-probe,目标 veyra_remoteplay_native_probe,CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded → 运行 ctest -L native-core:

$Args = @("-S", (Join-Path $Root "services/remoteplay-probe"), "-B", $BuildDirectory,
    "-G", $Generator, "-DCMAKE_BUILD_TYPE=Release", "-DVEYRA_RP_BUILD_NATIVE=ON",
    "-DVEYRA_RP_CHIAKI_SOURCE_DIR=$StageDirectory", "-DVEYRA_RP_CHIAKI_VERIFY_DIR=$ChiakiCheckout",
    "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded")

见 scripts/remoteplay/build-native.ps1,随后 cmake --build ... --target veyra_remoteplay_native_probe 与 ctest -L native-core --timeout 30(同文件 #L67-L69)。

对应的测试目标定义在 services/remoteplay-probe/NativeChiaki.cmake:

add_executable(veyra_remoteplay_native_probe "${CMAKE_CURRENT_LIST_DIR}/native_main.cpp")
target_link_libraries(veyra_remoteplay_native_probe PRIVATE veyra_remoteplay_chiaki chiaki-lib)
add_test(NAME rp.native_core_initialization COMMAND veyra_remoteplay_native_probe)
set_tests_properties(rp.native_core_initialization PROPERTIES TIMEOUT 30 LABELS "native-core;not-ps5")

注意标签 native-core;not-ps5:脚本最后一行也明确打印 "Native initialization gate completed. PS5 connection, decoder and GPU are still NOT tested by this probe."(scripts/remoteplay/build-native.ps1)。

6.1 这一步能证明什么、不能证明什么

历史门槛文档给出的通过标准是"真实链接 chiaki-lib、执行 chiaki_lib_init、上游 profile 预设和手柄 idle 契约检查",并强调只有真实执行后打印的 REAL_CHIAKI_CORE_INITIALIZED 才算结果,"字符串出现在源码里不算执行"(docs/remoteplay/NATIVE_GATE.md)。

同时该文档还提示了一个必须保留的诚实边界:upstream_video_callback=1 是 probe 的固定文字、不是实际回调次数,probe 并没有启动会话或执行视频回调(docs/remoteplay/NATIVE_GATE.md)。这与你之后在主程序里看到的真实帧回调统计(NativeSnapshot.videoCallbacks,见 include/veyra/remoteplay/ChiakiBackend.h)是两码事。

七、第二步:构建带 Remote Play 的 Veyra

第一步通过后,产品构建需要在同一套依赖路径上带 -RemotePlay。build.ps1 对开关的处理是先拼一个显式 OFF/ON,再在开关打开时强制要求五个路径都存在:

$configureExtra += " -DVEYRA_ENABLE_REMOTEPLAY=" + $(if($RemotePlay){"ON"}else{"OFF"})
if ($RemotePlay) {
    foreach ($path in @($ChiakiCheckout,$ChiakiStage,$RemotePlayPrefixPath,$ProtocPath,$PkgConfigPath)) {
        if (-not $path -or -not (Test-Path -LiteralPath $path)) { throw "Remote Play requires existing ChiakiCheckout, ChiakiStage, RemotePlayPrefixPath, ProtocPath and PkgConfigPath." }
    }
    $configureExtra += ' -DVEYRA_RP_CHIAKI_VERIFY_DIR="{0}" -DVEYRA_RP_CHIAKI_SOURCE_DIR="{1}" -DCMAKE_PREFIX_PATH="{2}" -DPROTOC="{3}" -DPKG_CONFIG_EXECUTABLE="{4}"' -f $ChiakiCheckout,$ChiakiStage,$RemotePlayPrefixPath,$ProtocPath,$PkgConfigPath
}

见 scripts/build.ps1。这段代码的意图写在上面三行注释里:"Remote Play is explicit: no dangling source/backend combination and no silently substituted prebuilt Chiaki library."

因此最简命令是文档里给出的形式:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/build.ps1 -Root . -Preset x64-release -RemotePlay

但要让它在真实机器上跑通,通常必须补齐路径参数(否则上面那条 throw 会直接命中):

powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/build.ps1 `
  -Root . `
  -Preset x64-release `
  -BuildDirectory out/build/x64-release-remoteplay `
  -RemotePlay `
  -ChiakiCheckout C:/veyra-deps/chiaki-source `
  -ChiakiStage out/remoteplay/chiaki-msvc-stage `
  -RemotePlayPrefixPath C:/veyra-deps/remoteplay-installed/x64-windows-static `
  -ProtocPath C:/veyra-deps/remoteplay-installed/x64-windows/tools/protobuf/protoc.exe `
  -PkgConfigPath C:/veyra-deps/vcpkg/downloads/tools/msys2/<hash>/mingw64/bin/pkg-config.exe

参数语义(scripts/build.ps1):

参数 说明
-Root 仓库根,必须能找到 CMakePresets.json,否则退出码 2
-Preset 仅接受 x64-debug / x64-release
-BuildDirectory 隔离输出目录,避免覆盖正在运行的构建
-RemotePlay 打开 VEYRA_ENABLE_REMOTEPLAY=ON
-ChiakiCheckout 干净 pin checkout,传给 VEYRA_RP_CHIAKI_VERIFY_DIR
-ChiakiStage 已打补丁的 stage,传给 VEYRA_RP_CHIAKI_SOURCE_DIR
-RemotePlayPrefixPath 依赖前缀,传给 CMAKE_PREFIX_PATH
-ProtocPath protoc 可执行文件
-PkgConfigPath pkg-config 可执行文件
-FfmpegRoot 复用既有 FFmpeg 前缀(不改动原包)
-Clean 先清空构建目录

脚本最后会把 configure+build 一起塞进一个临时 .cmd,在其中 call vcvars64.bat 并 chcp 65001,然后逐个阶段检查 errorlevel(分别返回 4/5/6),见 scripts/build.ps1。这样做是为了让 CMake 真的在 MSVC 环境中配置,而不是依赖调用方 shell 是否已初始化。

7.1 产品侧的测试与探针目标

开关打开后,除了主程序 veyra,还会额外生成若干可验证目标,它们是把"能编"变成"能观测"的关键:

目标 用途 位置
veyra_ps5_hw_image_tests PS5 硬件图像相关集成测试 CMakeLists.txt
veyra_ps5_quality_tests PS5 源质量测试 CMakeLists.txt
veyra_remoteplay_boundary_tests 产品边界(含 ControllerInput.cpp) CMakeLists.txt
veyra_remoteplay_profile_tests DPAPI 档案存储(rp.dpapi_profile,超时 30s) CMakeLists.txt、services/remoteplay-probe/NativeChiaki.cmake
veyra_remoteplay_probe 无界面探针,用已保存 profile 驱动产品会话栈,便于比较 codec/bitrate 变体 CMakeLists.txt
veyra_remoteplay_source_tests 可选,需 VEYRA_RP_FFMPEG_ROOT,链接真实 FFmpeg 与 RemotePlaySource.cpp services/remoteplay-probe/NativeChiaki.cmake

八、链接形态与"包里没有什么"

文档对产物形态有一句非常具体的说明:发布包使用静态 Chiaki/SDL/依赖,搭配既有的动态 FFmpeg DLL;Windows 网络栈、WinHTTP、DPAPI、WASAPI、DirectX 与 GPU 驱动组件不重新分发。

这句话在源码中可以逐项对上:

  • 静态:veyra_remoteplay_core、veyra_remoteplay_chiaki、chiaki-lib 均为 STATIC(cmake/VeyraRemotePlay.cmake、#L58-L59),且 CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded(/MT)在原生门槛阶段就已统一;
  • SDL3 精确版本:产品侧用 find_package(SDL3 3.4.14 EXACT CONFIG REQUIRED),而 QML 桥为了方便链接,只取 SDL3 的库文件与头文件,系统库改由 QmlPlayerBridge_p.h 里的 #pragma comment 引入——注释解释了原因:SDL3::SDL3 自带的系统库列表把 veyra_qml_ui 的链接行推过了 CMake response-file 阈值,而 link.exe 按 ANSI 代码页读 response file,会破坏含非 ASCII 的 Qt 路径(CMakeLists.txt)。这是"静态依赖 + 中文路径"这种组合下很现实的一个坑。
  • Win32 系统库的显式链接:crypt32 iphlpapi shell32 ole32 winhttp(cmake/VeyraRemotePlay.cmake),这些是系统组件,不是被复制进包里的第三方二进制——与文档"not redistributed"的表述一致。
  • FFmpeg 仍是动态:build.ps1 会把 avcodec-63.dll、avformat-63.dll、avutil-61.dll、swresample-7.dll、swscale-10.dll 复制到构建输出目录,并按需处理 dav1d.dll(scripts/build.ps1)。

九、对应源码包的内容与许可证组合

文档对 Veyra-1.4.0-RemotePlay-source.zip 的清单写得很细,这部分直接决定了合规边界,不能省略:

归档内容 说明
干净的固定 Chiaki 树 + 递归子模块文件 与 dependency-lock.json 的 chiaki_commit 对应
经评审的补丁 即 scripts/remoteplay/patches/ 下两个补丁
依赖源码与 vcpkg port 来源 json-c、libevent、miniupnpc、OpenSSL、Opus、SDL3
静态光流后端所用的 FidelityFX 开源源码 与 cmake/VeyraFidelityFX 等后端配置相关
FFmpeg 对应源码 单独资产,不在此 zip 内
明确不包含 NVIDIA/Intel SDK 与运行时、凭据、本地配置、日志、测试媒体

许可证是三段并存,必须原样理解:

  1. 组合程序受 Chiaki 的 AGPL-3.0-only 与 OpenSSL exception 约束,同时保留各依赖的 notices;
  2. Veyra 原始源码仍为 GPLv3(src/remoteplay/* 的文件头即 // SPDX-License-Identifier: GPL-3.0-only,见 include/veyra/remoteplay/ChiakiBackend.h);
  3. 第三方声明集中记录在 THIRD_PARTY_NOTICES.md,其中 PS5 Remote Play / chiaki-ng 段落明确写"these derived patches retain AGPL-3.0-only with the upstream OpenSSL exception",并指向 licenses/remoteplay/CHIAKI_AGPL3_OPENSSL.txt;Remote Play 相关依赖的 notice 也在 licenses/remoteplay/ 下(json-c、libevent、miniupnpc、openssl、opus、sdl3 各自的 json 与文本)。

这一段对做二次分发的人最实用:只要你启用了 VEYRA_ENABLE_REMOTEPLAY,产物的合规基线就不再只是 GPLv3,而是 GPLv3 + AGPL-3.0-only(含 OpenSSL exception)+ 各依赖 notices。 只分发自己编的 exe 而不提供对应源码,风险由分发者承担。

十、验证清单与常见失败定位

把散落在文档与脚本里的失败条件集中成一张表,排查会快很多:

现象/报错 触发点 处理方向
Chiaki source pin mismatch checkout HEAD ≠ pin(build-native.ps1 #L25-L26) 重新 checkout --detach <pin>
Chiaki source checkout must be clean checkout 有未提交改动 换干净克隆,不要在 verify 树上打补丁
Refusing to replace an existing non-worktree stage stage 目录存在但不是 git worktree 换 -StageDirectory,或手工清理后重跑
Chiaki submodule absent or pin mismatch 递归子模块缺失/漂移 git submodule update --init --recursive
Chiaki source verification failed: ... 内容级比对失败(改多了或改少了) 用 verify-chiaki-stage.py 单独跑,定位 diff
VEYRA_RP_BUILD_NATIVE needs the pinned chiaki-ng source tree 缺 lib/include/chiaki/session.h 检查 VEYRA_RP_CHIAKI_SOURCE_DIR
Upstream chiaki-lib target was not created 上游子目录未产出目标 检查 add_subdirectory 路径与依赖是否齐备
Could not find protoc 缺 -ProtocPath 补 protoc 路径(历史审计已记录过该失败)
Remote Play requires existing ... -RemotePlay 但五个路径有缺失 五个参数全部给齐

跑完第一步后,判断是否"真的过了"只需两条:

CHIAKI_STAGE_EXACT_PATCHES_VERIFIED
REAL_CHIAKI_CORE_INITIALIZED upstream_video_callback=1
PS5_CONNECTION_NOT_TESTED VIDEO_DECODE_NOT_TESTED WINDOWS_PLAYER_NOT_TESTED

第三条不是失败信息,而是 probe 主动打印的能力边界声明(docs/remoteplay/NATIVE_GATE.md)。任何声称"构建通过 = PS5 串流可用"的推断都超出了这些证据。

最后落在产品行为上,1.4.0 更新说明里还有两条与 Remote Play 直接相关的实测修复,可作为"编好之后该验证什么"的入口:首帧中止的 else 绑定问题,以及 PS5 占用上一会话约 20 秒导致的 RP_IN_USE 重试撞窗口问题,退避从 1/2/4 秒改为 10/20/40 秒并在界面提示"正在释放上一个串流会话"(见 RELEASE_NOTES_1.4.0.md 第 2.1 节第 5、6 条)。适配层的 NativeSnapshot 也提供了对应字段:startupRetryAllowed 只对瞬时 RP_IN_USE 放行、绝不覆盖鉴权失败(include/veyra/remoteplay/ChiakiBackend.h)。

十一、延伸阅读(仓库内路径)

登录后查看全文
Veyra-NRVideo