diff --git a/crates/interchange/src/export.rs b/crates/interchange/src/export.rs index fd396b00b..371c3a3d3 100644 --- a/crates/interchange/src/export.rs +++ b/crates/interchange/src/export.rs @@ -365,7 +365,7 @@ impl Exporter<'_> { let mut clip = media_clip(fp::MediaRef::File { path: path.clone() }, info); clip.offline = f.missing; let bin = self.bin(it.and_then(|i| i.parent)); - let id = self.fp.add_item(&name, fp::Label::Iris, fp::ItemKind::Media(clip), bin); + let id = self.fp.add_item(&name, fp::Label::Iris, fp::ItemKind::Media(Box::new(clip)), bin); self.media.insert(path, id); id } @@ -384,7 +384,7 @@ impl Exporter<'_> { Some(b) } }; - let id = self.fp.add_item(name, fp::Label::Violet, fp::ItemKind::Media(clip), bin); + let id = self.fp.add_item(name, fp::Label::Violet, fp::ItemKind::Media(Box::new(clip)), bin); self.media.insert(r.path.clone(), id); id } @@ -405,7 +405,7 @@ impl Exporter<'_> { ); let clip = media_clip(fp::MediaRef::Generator(Generator::ColorMatte { color: [color[0], color[1], color[2], 1.0] }), info); let bin = self.bin(it.and_then(|i| i.parent)); - let id = self.fp.add_item(&name, fp::Label::Rose, fp::ItemKind::Media(clip), bin); + let id = self.fp.add_item(&name, fp::Label::Rose, fp::ItemKind::Media(Box::new(clip)), bin); self.media.insert(key, id); id } @@ -540,6 +540,9 @@ impl Exporter<'_> { comment: if m.chapter.is_empty() { String::new() } else { m.comment.clone() }, kind: if m.chapter.is_empty() { fp::MarkerKind::Comment } else { fp::MarkerKind::Chapter }, color: fp::Label::Green, + custom_color: None, + author: String::new(), + url: m.url.clone(), }) .collect(); if let Some(seq) = self.fp.sequence_mut(sid) { @@ -733,6 +736,7 @@ fn media_info(name: &str, kind: MediaKind, duration: Tick, video: Option fp::MediaClip { mod tests { use super::*; + #[test] + fn synthesized_video_metadata_does_not_claim_an_inferred_color_profile() { + let info = media_info("clip", MediaKind::Video, Tick::ZERO, Some((1920, 1080, FrameRate::new(24, 1), 1.0, "raw".into(), true)), false); + let video = info.video.unwrap(); + assert_eq!((video.width, video.height), (1920, 1080)); + assert!(video.color_assumed.is_none()); + assert!(video.has_alpha); + } + /// A folder's bin is the same one each time it is asked for (a cached folder once answered /// `None`, so a folder's second item went to the project root); a non-item has no bin. #[test]