Commit Graph

15 Commits

Author SHA1 Message Date
Skyler Lehmkuhl ce151ffd61 Pack video into .beam and stream frames + audio from the blob
Video was the only media type always kept external (VideoClip.file_path),
so a project with video wasn't self-contained. Now video packs into the
SQLite container under the same large-media policy as audio (pack < 2 GB
unless the user chose Reference), and both the frames and the embedded audio
track decode by streaming directly from the blob — no temp files.

- New crate ffmpeg-blob-io: an AVIOContext-over-Read+Seek shim (BlobInput)
  that lets ffmpeg demux from an arbitrary byte source. Isolates all the
  unsafe FFI + ffmpeg ABI coupling (version-pinned =8.0.0/=8.0.1). Manual
  Drop teardown order; AVSEEK_SIZE restores the read position (FFmpeg assumes
  a size query doesn't move it — required for MP4 moov-at-end).
- Schema/save/load: VideoClip.media_id; save_beam packs/references video as
  MediaKind::Video (keyed by clip id); load resolves packed vs referenced and
  reports missing sources. A packed clip points its linked video-audio pool
  entry's media_id at the video row so the audio streams from the same blob.
- Frames: video.rs VideoSource{Path,Packed} threaded through new/seek/scan/
  probe/thumbnails (a fresh BlobReader per open); editor builds the source
  from current_file_path (now set before register_loaded_videos).
- Audio: VideoAudioReader::open_source via BlobInput; the disk_reader
  StreamSource block on packed video-audio is removed; the engine's existing
  factory activation routes it unchanged.

Tests: ffmpeg-blob-io AVIO unit tests (WAV via Cursor, seek, open/drop loop);
core packed_video_stream (blob->AVIO->Input) and beam_archive video round-trip;
daw-backend open_source test (compiles; links/runs only off-container).
Runtime-verified: a packed video plays frames + audio after the source file
is removed.
2026-06-22 09:17:10 -04:00
Skyler Lehmkuhl 0914818808 docs: export now ~1.74x realtime (4x win); GPU-bound on composite, CPU wins won't help 2026-06-21 09:12:30 -04:00
Skyler Lehmkuhl b292e0e6e6 docs: export-speed audit findings + #1/#2a done, remaining wins noted 2026-06-21 01:35:41 -04:00
Skyler Lehmkuhl 5f3cb41c18 docs: mark Phase 3/3.5/4 done in plan checklist; flag stale JS-era TODO entries 2026-06-21 01:22:17 -04:00
Skyler Lehmkuhl 6a788a432e docs: Phase 4 done (image asset paging: Tier 1/2 + prefetch) 2026-06-21 01:12:57 -04:00
Skyler Lehmkuhl d05cbfcde5 docs: Phase 4 Tier 2 (decoded ImageCache LRU) done; note Tier 1 + prefetch 2026-06-21 00:55:26 -04:00
Skyler Lehmkuhl 7a150fb5c5 docs: mark Phase 3.5 (image textures in vector scenes) done 2026-06-21 00:46:22 -04:00
Skyler Lehmkuhl aea26f6192 docs: add Phase 3.5 (image textures in vector scenes; fixes DCEL-broken image import) 2026-06-21 00:02:47 -04:00
Skyler Lehmkuhl c936078850 docs: add 'fix animation tweens' (low pri); mark raster-keyframe-UI bugs done 2026-06-20 23:54:46 -04:00
Skyler Lehmkuhl f585c370e8 docs: mark Phase 3e (playback prefetch) done 2026-06-20 22:46:23 -04:00
Skyler Lehmkuhl c627533185 docs: mark Phase 3d (raster undo dirty-rect diffs) done 2026-06-20 21:31:57 -04:00
Skyler Lehmkuhl 4cb43d670b docs: add Phase 3e (prefetch raster frames) to the plan 2026-06-20 21:18:32 -04:00
Skyler Lehmkuhl 3c302f0215 docs: mark Phase 3a-3 (image proxy) done 2026-06-20 21:09:30 -04:00
Skyler Lehmkuhl a1e3cc841f docs: mark Phase 3c (raster GPU cache bound) done 2026-06-20 19:16:13 -04:00
Skyler Lehmkuhl 62d6cd0c84 docs: mark Phase 3a-1/3a-2/3b done; note deferred raster-keyframe-UI bugs 2026-06-20 18:46:46 -04:00