Session
vv_session::Session is an open document without any UI: the Project, its History, where it is saved, and the background jobs working on it. The editor window and the headless MCP server both drive the same type, so import, relink, export and editing behave identically in both.
Hosts
| Host | How it holds the Session |
| Editor window | VenturiApp owns it and calls tick() every frame (project_io.rs). Its waker requests an egui repaint. |
| MCP editor host | A host thread of its own (vv-app/src/mcp_host.rs). Between two frames the Session sits in a shared slot that the MCP thread can borrow; the UI checks it out for each frame. Calls are answered even when the window is hidden and Wayland sends no frames. |
| Headless MCP | vv-app mcp runs vv_mcp::run_headless, which owns the Session and wakes on its inbox. |
State
| Field / API | Purpose |
project, history | Public so callers can borrow them separately. Every change goes through the history, which is what tells a saved project from a modified one. |
has_unsaved_changes | History generation ≠ saved generation. |
epoch | Bumped whenever the project is replaced (open, new), since a new history restarts its generation at 0. |
ChangeMark | (epoch, generation): equal marks mean nothing changed. finish_save uses it to mark a background save as clean only if nothing changed meanwhile. |
timeline_revision | A hash of one timeline's content, recomputed only after the project changed. It changes with edits to that timeline, not with edits elsewhere. |
sync_timeline_media | Keeps the media-pool entry of a timeline used as a compound clip in step with its content, once per history change. |
complete_legacy_media | Fills media fields that older project files lack, by reading the files when the project is opened. |
No comments to display
No comments to display