mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-02 06:27:11 -06:00
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:
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user