Skip to content

FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust

Merge pull request #165 from carlitosteso3/fix/media-browser-probe-157

Brandon Thomasce5d365c7858
diff --cc crates/engine/src/media_pool.rs
index 0b4f41864,d2f296111..06c6b8a8b
--- a/crates/engine/src/media_pool.rs
+++ b/crates/engine/src/media_pool.rs
@@@ -53,9 -53,12 +53,13 @@@ impl Default for MediaPool
}
}
+ /// Largest file [`MediaPool::probe_file`] reads whole when no streaming reader takes it (WAV,
+ /// MP3 and other byte-opened formats, or an unsupported container such as AVI).
+ pub const PROBE_WHOLE_FILE_MAX: u64 = 64 * 1024 * 1024;
+
-/// Cache key of a media clip's full-resolution reference ("" matches anything: generators and
-/// sources inserted without a key).
+/// Cache key of a media clip's full-resolution reference ("" matches anything: sources inserted
+/// without a key). A generator's key holds its parameters, so a Color Matte whose color changes
+/// (or comes back with undo) is generated again.
pub fn media_key(m: &MediaClip) -> String {
match &m.media {
MediaRef::File { path } if m.offline => format!("offline:{path}"),