From b1fffa637147a507a18fcece93054ead97e33da5 Mon Sep 17 00:00:00 2001 From: aiongg Date: Thu, 12 Nov 2026 14:46:30 +0000 Subject: [PATCH] craft-aaf: take Tick, FrameRate and TICKS_PER_SECOND from craft-timeline's crate root Frame rates live in craft-timeline's rates module, so AAF and OMF import the time types from the crate root, where craft-timeline re-exports them. --- crates/aaf/README.md | 2 +- crates/aaf/src/aaf/read.rs | 2 +- crates/aaf/src/aaf/tests.rs | 4 ++-- crates/aaf/src/aaf/write.rs | 2 +- crates/aaf/src/lib.rs | 2 +- crates/aaf/src/model.rs | 2 +- crates/aaf/src/omf/read.rs | 2 +- crates/aaf/src/omf/write.rs | 2 +- crates/aaf/src/roundtrip_tests.rs | 2 +- crates/aaf/src/testdoc.rs | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/aaf/README.md b/crates/aaf/README.md index 7d3d44767..12f2839ba 100644 --- a/crates/aaf/README.md +++ b/crates/aaf/README.md @@ -5,7 +5,7 @@ composition model. | Module | What | |---|---| -| `model` | `Document`: compositions (tracks of fillers, source clips and overlapping transitions; clip gain, constant or keyframed; markers; start timecode), nested compositions, and the media `Source`s they reference (file path or embedded PCM, picture size and rate, sound channels / rate / bits, start timecode, markers). Times are exact `craft_timeline::time::Tick`s. | +| `model` | `Document`: compositions (tracks of fillers, source clips and overlapping transitions; clip gain, constant or keyframed; markers; start timecode), nested compositions, and the media `Source`s they reference (file path or embedded PCM, picture size and rate, sound channels / rate / bits, start timecode, markers). Times are exact `craft_timeline::Tick`s. | | `aaf` | `read`, `write`, `sniff`: AAF Edit Protocol in structured storage (`craft-cfb`). | | `omf` | `read`, `write`, `sniff`: OMF Interchange 2.0 in a Bento container. Sound only. | diff --git a/crates/aaf/src/aaf/read.rs b/crates/aaf/src/aaf/read.rs index 31c841c5d..1a8375997 100644 --- a/crates/aaf/src/aaf/read.rs +++ b/crates/aaf/src/aaf/read.rs @@ -2,7 +2,7 @@ use std::collections::{HashMap, HashSet}; -use craft_timeline::time::{FrameRate, Tick}; +use craft_timeline::{FrameRate, Tick}; use super::ids::{cls, ddef, def, pid}; use super::store::{self, Auid, Obj, Value, rational_of, utf16_of}; diff --git a/crates/aaf/src/aaf/tests.rs b/crates/aaf/src/aaf/tests.rs index 3e7794471..d054793c5 100644 --- a/crates/aaf/src/aaf/tests.rs +++ b/crates/aaf/src/aaf/tests.rs @@ -3,7 +3,7 @@ use std::collections::HashSet; -use craft_timeline::time::FrameRate; +use craft_timeline::FrameRate; use super::ids::{self, cls, ddef, def, path, pid}; use super::store::{self, Obj, Value}; @@ -517,7 +517,7 @@ fn sound_source_offsets_use_audio_sample_rate_on_disk() { _ => None, }) .unwrap(); - assert_eq!(clip.start, craft_timeline::time::FrameRate::FPS_25.tick_of(10)); + assert_eq!(clip.start, craft_timeline::FrameRate::FPS_25.tick_of(10)); } #[test] diff --git a/crates/aaf/src/aaf/write.rs b/crates/aaf/src/aaf/write.rs index 8c9aae88e..06153dc0b 100644 --- a/crates/aaf/src/aaf/write.rs +++ b/crates/aaf/src/aaf/write.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; -use craft_timeline::time::{FrameRate, Tick}; +use craft_timeline::{FrameRate, Tick}; use super::ids::{META_DICTIONARY, ROOT, cls, ddef, def, path, pid}; use super::store::{self, Auid, Obj, Value, rational, utf16z}; diff --git a/crates/aaf/src/lib.rs b/crates/aaf/src/lib.rs index ee7448bc0..235eff2d6 100644 --- a/crates/aaf/src/lib.rs +++ b/crates/aaf/src/lib.rs @@ -4,7 +4,7 @@ //! //! - [`model`]: a [`model::Document`] of compositions (tracks of fillers, source clips and //! overlapping transitions, with clip gain and markers) and the media sources they reference, -//! with exact times ([`craft_timeline::time::Tick`]). +//! with exact times ([`craft_timeline::Tick`]). //! - [`aaf`]: Advanced Authoring Format, Edit Protocol, in structured storage (`craft-cfb`). //! - [`omf`]: OMF Interchange 2.0 in a Bento container; sound only. //! diff --git a/crates/aaf/src/model.rs b/crates/aaf/src/model.rs index e6bc79140..a7b22e180 100644 --- a/crates/aaf/src/model.rs +++ b/crates/aaf/src/model.rs @@ -7,7 +7,7 @@ //! mobs and file source mobs: here, a [`Source`] per essence, grouped into one media item by its //! key. All times are ticks; the format serialisers convert to and from edit units. -use craft_timeline::time::{FrameRate, TICKS_PER_SECOND, Tick}; +use craft_timeline::{FrameRate, TICKS_PER_SECOND, Tick}; /// Picture or sound. #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] diff --git a/crates/aaf/src/omf/read.rs b/crates/aaf/src/omf/read.rs index d45b6ff63..2c446ab43 100644 --- a/crates/aaf/src/omf/read.rs +++ b/crates/aaf/src/omf/read.rs @@ -2,7 +2,7 @@ use std::collections::{HashMap, HashSet}; -use craft_timeline::time::{FrameRate, Tick}; +use craft_timeline::{FrameRate, Tick}; use super::bento::Container; use crate::model::{CClip, CItem, CKind, CTrack, CTransition, Composition, Document, Gain, Source, units_to_ticks}; diff --git a/crates/aaf/src/omf/write.rs b/crates/aaf/src/omf/write.rs index 755994804..e4b638f87 100644 --- a/crates/aaf/src/omf/write.rs +++ b/crates/aaf/src/omf/write.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; -use craft_timeline::time::Tick; +use craft_timeline::Tick; use super::bento; use crate::model::{CItem, CKind, Document, Gain, Source, ticks_to_units}; diff --git a/crates/aaf/src/roundtrip_tests.rs b/crates/aaf/src/roundtrip_tests.rs index 7ba6e993a..a84a84319 100644 --- a/crates/aaf/src/roundtrip_tests.rs +++ b/crates/aaf/src/roundtrip_tests.rs @@ -1,6 +1,6 @@ //! Documents written and read back, in both formats; damaged files. -use craft_timeline::time::{FrameRate, Tick}; +use craft_timeline::{FrameRate, Tick}; use crate::model::{CItem, CKind, CMarker, Composition, Document, Gain}; use crate::testdoc::{IDENTITY, pcm_ramp, picture_and_sound, sound_only}; diff --git a/crates/aaf/src/testdoc.rs b/crates/aaf/src/testdoc.rs index c2740e1e7..16c320950 100644 --- a/crates/aaf/src/testdoc.rs +++ b/crates/aaf/src/testdoc.rs @@ -1,7 +1,7 @@ //! Documents the tests write: what an editor's two-clip sequence with a dissolve looks like in //! the model. -use craft_timeline::time::{FrameRate, Tick}; +use craft_timeline::{FrameRate, Tick}; use crate::Identity; use crate::model::{CClip, CItem, CKind, CTrack, CTransition, Composition, Document, Gain, Source};