commit af59b429bdc729687f4439b34104a3d104d37a5f
parent 265ddfa9c9a8aead2c6edb2dca0706d6bc95922b
Author: mauricefisher64 <92736594+mauricefisher64@users.noreply.github.com>
Date: Wed, 10 Aug 2022 08:00:15 -0400
Fix build error when xmp_write is not defined (#105)
* Treat 'meta' box as standard container
Support for more BMFF container types
Handle bad FourCC names
Add bad signer unit test
* clippy fixes
* External manifest generation
* More detailed unit test
Bug fixes
Slight speed up
* test smaller chunk size for hashing
* Only generate output upon success.
Auto cleanup temp content
* cleanup
* WASM build fixes
* code review fixes
* Fix typo
* Changes based on feedback
* Support Info for constructor
Put remote manifest behind xmp_write feature
Split external manifest into two functions
* One more suggestion
* formatting
* formatting
* Fix for build failure when feature xmp_write is missing
Diffstat:
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/sdk/src/store.rs b/sdk/src/store.rs
@@ -1580,9 +1580,11 @@ impl Store {
let output_path = if cfg!(feature = "xmp_write") {
match pc.remote_manifest() {
crate::claim::RemoteManifest::NoRemote => {
- // update XMP info & add xmp hash to provenance claim
+ // even though this block is protected by the outer cfg!(feature = "xmp_write")
+ // the class embedded_xmp is not defined so we have to explicitly exclude it from the build
#[cfg(feature = "xmp_write")]
if let Some(provenance) = self.provenance_path() {
+ // update XMP info & add xmp hash to provenance claim
embedded_xmp::add_manifest_uri_to_file(dest_path, &provenance)?;
} else {
return Err(Error::XmpWriteError);
@@ -1592,9 +1594,12 @@ impl Store {
crate::claim::RemoteManifest::SideCar => {
dest_path.with_extension(MANIFEST_STORE_EXT)
}
- crate::claim::RemoteManifest::Remote(url) => {
+ crate::claim::RemoteManifest::Remote(_url) => {
let d = dest_path.with_extension(MANIFEST_STORE_EXT);
- embedded_xmp::add_manifest_uri_to_file(dest_path, &url)?;
+ // even though this block is protected by the outer cfg!(feature = "xmp_write")
+ // the class embedded_xmp is not defined so we have to explicitly exclude it from the build
+ #[cfg(feature = "xmp_write")]
+ embedded_xmp::add_manifest_uri_to_file(dest_path, &_url)?;
d
}
}