Skip to content

持久化三修:save-as 复制 media/(数据丢失 bug)+ 保存写项目封面 + XMEML 真实源时码#179

Merged
appergb merged 1 commit into
mainfrom
fix/save-as-media-and-persistence
Jul 2, 2026
Merged

持久化三修:save-as 复制 media/(数据丢失 bug)+ 保存写项目封面 + XMEML 真实源时码#179
appergb merged 1 commit into
mainfrom
fix/save-as-media-and-persistence

Conversation

@appergb

@appergb appergb commented Jul 2, 2026

Copy link
Copy Markdown
Owner

上游 VideoProject/XMLExporter 对齐三项:①Save-As 数据完整性 bug——另存从不复制 bundle 内 media/,工程内素材引用全断;新 copy_media_dir 原子复制(temp+rename)。②保存写 thumbnail.jpg(首个视频/图片片段,JPEG q72)。③XMEML 源起始时码经 ffprobe tags.timecode 解析注入(NDF 精确上游逆运算;DF 用 SMPTE drop 数学并限 fps%30==0,上游读原始 tmcd 帧无字符串参考,决策已在模块文档说明;实测真实 -timecode mov)。fcpxml 保持纯函数(注入 map,缺省=0)。门禁:workspace 1368 测试 + web 285 全绿。

…source timecode

Three persistence/export parity fixes (upstream VideoProject / XMLExporter):

- Save-As data-integrity BUG: saving to a new location never copied the source
  bundle's media/ dir, silently dangling every MediaSource::Project reference
  (AI-generated / pasted / captured media). New opentake_project::copy_media_dir
  (atomic temp-stage + rename; same-path & missing-source no-ops; partial copy
  propagates an error) wired into EditorSession save — upstream mediaDirWrapper
  (VideoProject.swift:112-117). 4 bundle + 5 session tests.
- Project thumbnail on save: bundle.rs could persist thumbnail.jpg but nothing
  populated it. New opentake_media::thumbnail::project (pick_thumbnail_source =
  first video/image clip, capture_project_thumbnail JPEG q72 ≈ upstream 0.7,
  320x180 video / 640px image caps) + save_project_with_thumbnail in core;
  src-tauri project_save captures best-effort from cached/first-clip source
  (upstream captureThumbnail, VideoProject.swift:261-300; avoids GPU-lock
  reentrancy). core stays ffmpeg/GPU-free. 7 media + 2 core tests.
- XMEML source start timecode was hardcoded 0. New opentake_media::timecode:
  parse_smpte_timecode (NDF ":" exact upstream-inverse; DF ";"/"." with SMPTE
  drop-count math, gated fps%30==0 — upstream reads raw tmcd frames so ffprobe's
  tags.timecode string is the adapted source, decision documented) +
  read_start_timecode_frame via the probe.rs ffprobe pattern (live-verified
  against a real -timecode mov). fcpxml.rs stays pure: export_xmeml_with_timecodes
  takes an injected per-file map, missing -> 0 (upstream sourceStartFrame ?? 0,
  XMLExporter.swift:220,238-262); src-tauri export_xmeml resolves the map with
  the exporter's own integer timebase. 18 timecode + 2 fcpxml tests.

Gates: cargo fmt/clippy -D warnings clean; cargo test --workspace 1368 passed;
pnpm build clean; pnpm test 285 passed.
@appergb appergb merged commit b7b43b8 into main Jul 2, 2026
2 checks passed
@appergb appergb deleted the fix/save-as-media-and-persistence branch July 2, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant