kornia/kornia-rs

[Feature]: Integrate GStreamer errors with `ImageError` for unified upstream handling

Offen

#861 geöffnet am 27.03.2026

 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Rust (188 Forks)auto 404
enhancementhelp wantedtriage

Repository-Metriken

Stars
 (675 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 3T 9h) (39 gemergte PRs in 30 T)

Beschreibung

Support bridging GStreamer-related errors into ImageError so upstream code can handle image and stream failures more consistently.

Motivation

When image-processing and video I/O paths use different error hierarchies, application code often needs extra conversion or matching logic. A clearer bridge to ImageError would make higher-level integration simpler and more consistent.

Proposed Solution

  • Review current GStreamer error variants and identify where ImageError mapping makes sense.
  • Add conversions or wrapper types where appropriate.
  • Preserve useful GStreamer-specific context instead of collapsing errors too aggressively.
  • Update tests and docs for the new error behavior.

Expected Outcome

Upstream code gets a more consistent and ergonomic error-handling story across image and video APIs.

✅ Acceptance Criteria

  • The TODO for ImageError integration is resolved.
  • Error conversions are documented.
  • At least one representative test covers the bridging behavior.
  • Existing error information is preserved as much as possible.

Additional Context

This is primarily an API and ergonomics issue rather than a raw performance issue. It may require maintainer guidance to avoid awkward dependency or layering decisions.

Code Reference

// crates/kornia-io/src/gstreamer/error.rs ~40
// TODO: support later on ImageError

🤝 Contribution Intent

  • I plan to submit a PR to implement this feature
  • I'm requesting this feature but not planning to implement it

Contributor Guide