Footage: a proxy in use that can't be decoded says why (#1701)

The picture comes from an item's proxy while Use Proxy is on, but the
Project panel, the Viewer, project.summary and footage.info asked only
about the item's own file: a proxy that couldn't be decoded (an AVI with
an unsupported codec, say) left the layer empty with no reason given.
They now ask FootageSource::item_problem, which gives the proxy's reason,
said to be the proxy's, for footage and compositions alike.
This commit is contained in:
tylerjenningsw
2026-10-17 14:02:18 -04:00
parent 84d0f56765
commit c7715a3f2d
7 changed files with 97 additions and 31 deletions
+12
View File
@@ -130,6 +130,18 @@ pub trait FootageSource: Send + Sync {
fn problem(&self, _footage: &Footage) -> Option<String> {
None
}
/// [`Self::problem`] of what `item` shows: its proxy's while Use Proxy shows the proxy
/// instead (the reason then says it is the proxy's), else the footage item's own. A
/// composition has one only through its proxy.
fn item_problem(&self, item: &effectcraft_project::Item) -> Option<String> {
match item.proxy.as_deref().filter(|px| px.enabled && px.footage.has_video) {
Some(px) => self.problem(&px.footage).map(|why| format!("Proxy: {why}")),
None => match &item.kind {
ItemKind::Footage(f) => self.problem(f),
_ => None,
},
}
}
}
/// A render's view of a [`FootageSource`] whose frame reads can be called off with `cancel`