#767: import MXF (OP1a / OP-Atom) footage
Problem: the Media Browser lists .mxf files, but File > Import's dialog filtered them out and media::is_importable refused them, although the pinned FilmCraft codecs behind crates/media already demux MXF (AVC, MPEG-2 / XDCAM / D-10, VC-3 / DNxHD, ProRes, PCM audio) by content. Fix: add "mxf" to VIDEO_EXTENSIONS and to the File > Import and Set Proxy dialog filters. Tests check MPEG-2 4:2:2 long-GOP + 24-bit PCM and DNxHD 36 MXF against ffmpeg frames (>35 dB, measured 64-67 dB), audio level, and that the Import dialog offers MXF. AVI stays open: FilmCraft has no AVI demuxer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a7d3e7699
commit
f0bd916543
@@ -1213,7 +1213,7 @@ fn file_dialog(app: &mut EffectcraftApp, id: &str, params: &Value) -> Option<Res
|
||||
"keys.rpfCameraImport" => ("path", Ask::Open(&["json", "csv", "txt"])),
|
||||
"essential.exportTemplate" => ("path", Ask::Save("Template.ectemplate")),
|
||||
"essential.importTemplate" => ("path", Ask::Open(&["ectemplate"])),
|
||||
"file.setProxy" => ("path", Ask::Open(&["mp4", "mov", "m4v", "mkv", "webm", "png", "jpg", "jpeg", "gif", "webp", "tif", "tiff", "bmp", "exr"])),
|
||||
"file.setProxy" => ("path", Ask::Open(&["mp4", "mov", "m4v", "mkv", "webm", "mxf", "png", "jpg", "jpeg", "gif", "webp", "tif", "tiff", "bmp", "exr"])),
|
||||
_ => return None,
|
||||
};
|
||||
if params.get(key).is_some()
|
||||
@@ -1225,8 +1225,8 @@ fn file_dialog(app: &mut EffectcraftApp, id: &str, params: &Value) -> Option<Res
|
||||
return None;
|
||||
}
|
||||
const MEDIA: &[&str] = &[
|
||||
"mp4", "mov", "m4v", "mkv", "webm", "png", "jpg", "jpeg", "gif", "webp", "tif", "tiff", "bmp", "exr", "wav", "aif", "aiff", "mp3", "flac", "ogg",
|
||||
"opus", "svg", "pdf", "ai", "eps", "psd", "psb", "gltf", "glb", "obj", "json", "csv", "tsv",
|
||||
"mp4", "mov", "m4v", "mkv", "webm", "mxf", "png", "jpg", "jpeg", "gif", "webp", "tif", "tiff", "bmp", "exr", "wav", "aif", "aiff", "mp3", "flac",
|
||||
"ogg", "opus", "svg", "pdf", "ai", "eps", "psd", "psb", "gltf", "glb", "obj", "json", "csv", "tsv",
|
||||
];
|
||||
// A host whose modal dialogs would run a nested event loop inside this frame (macOS: a
|
||||
// drag over the window then re-entered winit's event handler and aborted, #511) shows the
|
||||
|
||||
@@ -204,3 +204,24 @@ fn relink_restores_decoded_pixels_and_invalidates_viewer_content() {
|
||||
assert_eq!(s.render(cid, Tick::ZERO, RenderOpts::default()).data, expected.data);
|
||||
std::fs::remove_dir_all(dir).unwrap();
|
||||
}
|
||||
|
||||
/// #767: File ▸ Import ▸ File… offers MXF footage (OP1a / OP-Atom from broadcast cameras and
|
||||
/// Avid), which the Media Browser lists and the importer reads.
|
||||
#[test]
|
||||
fn import_dialog_offers_mxf() {
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
let mut app = EffectcraftApp::new(Session::default());
|
||||
let offered = Rc::new(RefCell::new(Vec::<String>::new()));
|
||||
let seen = offered.clone();
|
||||
app.hooks.pick_files = Some(Box::new(move |exts: &[&str]| {
|
||||
*seen.borrow_mut() = exts.iter().map(|e| e.to_string()).collect();
|
||||
Vec::new()
|
||||
}));
|
||||
let result = effectcraft_ui_egui::menus::invoke(&mut app, &egui::Context::default(), "file.import", json!({})).unwrap();
|
||||
assert!(result.is_null(), "cancelled: nothing imported");
|
||||
let offered = offered.borrow();
|
||||
assert!(offered.iter().any(|e| e == "mxf"), "offered {offered:?}");
|
||||
assert!(offered.iter().any(|e| e == "mov"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user