Skip to content

feat: add Reader::manifest_source #1150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

ok-nick
Copy link
Contributor

@ok-nick ok-nick commented Jun 9, 2025

Changes in this pull request

Implements:

  • Store::source (low-level)
  • Reader::manifest_source (high-level)

which returns the source of the manifest used during reading:

  • ManifestSource::Embedded
  • ManifestSource::Remote
  • ManifestSource::Sidecar

A manifest source is considered a sidecar if the manifest bytes were given explicitly, rather than obtained via embedded or remote (XMP).

These APIs are also implemented for the C bindings.

Checklist

  • This PR represents a single feature, fix, or change.
  • All applicable changes have been documented.
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@ok-nick ok-nick changed the title feat: add Reader::manifest_location feat: add Reader::manifest_location and `c2pa::manifest_locations_from_stream) Jun 9, 2025
@ok-nick ok-nick changed the title feat: add Reader::manifest_location and `c2pa::manifest_locations_from_stream) feat: add Reader::manifest_location and c2pa::manifest_locations_from_stream Jun 9, 2025
@mauricefisher64
Copy link
Collaborator

Please do not proceed with these changes in the Rust SDK until I've had a chance to think about it. Right now I would not approve.

@ok-nick ok-nick changed the title feat: add Reader::manifest_location and c2pa::manifest_locations_from_stream feat: add Reader::manifest_location Jun 11, 2025
@ok-nick ok-nick marked this pull request as ready for review June 11, 2025 14:14
/// The manifest is stored remotely.
Remote,
/// The manifest is stored separately in a sidecar.
Sidecar,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is Sidecar used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should clarify the docs here, Sidecar is returned when the manifest is passed explicitly via a method such as from_manifest_data_and_stream. If there's a better name to describe this variant let me know.

@ok-nick ok-nick requested a review from mauricefisher64 June 12, 2025 13:11
@ok-nick ok-nick changed the title feat: add Reader::manifest_location feat: add Reader::manifest_source Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants