feat: adds --progress option to c2patool and optimizes the asset signing workflow.#1937
Closed
feat: adds --progress option to c2patool and optimizes the asset signing workflow.#1937
Conversation
Progress API: Replace OperationPhase with ProgressPhase (#[repr(u8)]), and ProgressCallback trait with ProgressCallbackFunc (Fn(ProgressPhase, f32) -> bool). Progress is reported as f32 0.0–1.0 instead of u8 0–100. Cancellation: Add cancel() and is_cancelled() on Context; remove Arc<AtomicBool> cancellation token. Add Error::OperationCancelled. C FFI: Add c2pa_context_builder_set_progress_callback(builder, user_data, callback) and c2pa_context_cancel(ctx). Remove C2paCancellationToken and related APIs. Coverage: Add check_progress in builder (save_to_stream), store, and claim so callbacks run during signing, embedding, and verification. Tests: Add unit tests for progress/cancel in context.rs and integration tests in builder.rs. Docs: Add docs/pro
Replaced f32 pct with (u32 step, u32 total) in the callback type Renamed/replaced phases: Ingredients/Verification/RemoteFetch → Reading, VerifyingManifest, VerifyingSignature, VerifyingIngredient, VerifyingAssetHash, FetchingRemoteManifest (keeping Thumbnail, Hashing, Signing, Embedding) added builder_sample.rs — Updated to demonstrate the new API with per-phase elapsed timing output and assertions against the new phase names Added more instrumentation for phases.
Also updates c2patool to use Context/Settings
also updates to use Context
4.5x faster on 6.74GB mov
Some optimizations for large riff and tiff files Avoids copies when no remote url and not removing manifests context/settings work in c2patool
fix: vlc Riff files with DWORD alignement supported
Merging this PR will improve performance by ×3.6
Performance Changes
Comparing Footnotes
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1937 +/- ##
==========================================
+ Coverage 76.89% 77.04% +0.15%
==========================================
Files 175 175
Lines 42438 42828 +390
==========================================
+ Hits 32631 32998 +367
- Misses 9807 9830 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
No description provided.