持久化三修:save-as 复制 media/(数据丢失 bug)+ 保存写项目封面 + XMEML 真实源时码#179
Merged
Conversation
…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.
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.
上游 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 全绿。