From f5a82152394fde4d8f740f664ab7737b82861618 Mon Sep 17 00:00:00 2001 From: cashmere Date: Tue, 28 Jul 2026 19:41:16 +0200 Subject: feat: GPUI desktop port foundation - scene crate: full project/scene/element model, serde round-trip proven against the web SerializedProject shape - transfer crate: .ocp zip container, cross-compat with web fflate archives proven in both directions - storage crate: filesystem project store replacing IndexedDB, .ocp import/export - media crate: ffmpeg-next 8 decoder (frames, audio, thumbnails, waveform summaries) - playback crate: wall-clock anchored, frame-rounded playback clock - gpu crate: native texture readback; compositor renders headless offscreen on Vulkan (spike test) - flake devshell: rust toolchain, GPUI native deps, ffmpeg dev, bindgen clang args; GPUI hello-world builds - port plan in notes/gpui-port.md --- rust/crates/timeline/src/creation.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 rust/crates/timeline/src/creation.rs (limited to 'rust/crates/timeline/src/creation.rs') diff --git a/rust/crates/timeline/src/creation.rs b/rust/crates/timeline/src/creation.rs new file mode 100644 index 00000000..a399d3d7 --- /dev/null +++ b/rust/crates/timeline/src/creation.rs @@ -0,0 +1,11 @@ +use time::{MediaTime, TICKS_PER_SECOND}; + +pub const DEFAULT_NEW_ELEMENT_DURATION: MediaTime = + MediaTime::from_ticks(5 * TICKS_PER_SECOND); + +pub fn to_element_duration_ticks(seconds: Option) -> Option { + match seconds { + None => Some(DEFAULT_NEW_ELEMENT_DURATION), + Some(seconds) => MediaTime::from_seconds_f64(seconds), + } +} -- cgit v1.3.1