Repository navigation
Skip camera metadata XML instead of importing it as a timeline - #20
Merged
Merged
Conversation
Every .xml path was imported as a timeline. Canon writes clip metadata as XML beside each clip, so selecting a clip together with its XML, or two clips' XML files, stopped the whole run with "No FCP 7 XML sequence was found" or "Add one timeline at a time". Folder imports already skipped these files. An XML file is now a timeline only when its root element is FCP 7 xmeml or fcpxml; recognizing that reads at most 16 KiB. A UTF-16 file is decoded to find its root, so a UTF-16 project is still reported as unreadable instead of skipped. Files that cannot be read or parsed still count as timelines, so their import reports why. The app recognizes timeline inputs once, when they are added, and rendering no longer reads files. The timeline import error also lost its doubled final period.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every
.xmlpath was imported as a timeline. Canon writes clip metadata asXML beside each clip (
CONTENTS/CLIPS001/*.XML), so selecting clips togetherwith their XML files stopped the whole run:
Timeline import: No FCP 7 XML sequence was found in A001C001_….XML..Add one timeline at a time.Folder imports already skipped these files; only paths added one by one, for
example by selecting every file of a clip in the Add Media dialog, reached
the timeline importer.
Changes:
xmemlorfcpxml. Recognizing it reads at most 16 KiB of the file. A UTF-16 file isdecoded to find its root: a UTF-16 project stays a timeline, so its import
reports that it cannot be read instead of the run silently continuing
without it. Other files that cannot be read or parsed still count as
timelines for the same reason.
instead of its own extension test.
them in its session state. Rendering the error window's "Locate media"
button and the path fixer's "Save Fixed Copy" no longer read any file.
Reproduced with the reporter's layout from #16 (Canon C70 MXF and Canon MP4
with their XML and MIF files, plus a recorder folder), each file selected
individually: 0.3.2 stops with
Add one timeline at a time.; this branch(together with the #16 and #17 branches) finds both pairs at the correct
offsets.
Tests:
camera_metadata_xml_beside_media_is_not_a_timelinefails onmain.xml_inputs_are_explicit_not_silentnow adds the XML as a path and checksthe message; it fails on
mainon the doubled period.timeline_documents_are_recognized_by_root_elementkeeps Premiere, Resolveand FCPXML exports (declaration, DOCTYPE, comments, upper-case root) and
UTF-16 projects with and without a byte order mark recognized, and Canon and
Sony camera XML not.
timelines_in_other_encodings_are_reported_not_skipped: a UTF-16 projectadded beside media ends in "Cannot read timeline", not a run without it.
The encoding tests were checked by removing the UTF-16 handling: both
fail.
Validation:
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspace: 376 passed, 1 ignored