summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-08 02:04:44 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-08 02:04:44 +0200
commitf094d850a590cf68a98d4fa83b168c64c2787083 (patch)
tree0a1abdd7a34e0eca6556597c1b2b3616489a4e71 /src
parent89d9ddba959f02b17f1d0e75e2f12c357ce29f2b (diff)
Expose the MXF ResourceID from SMPTESubtitleAsset.
Diffstat (limited to 'src')
-rw-r--r--src/smpte_subtitle_asset.cc7
-rw-r--r--src/smpte_subtitle_asset.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc
index a55b91ae..9ff194f8 100644
--- a/src/smpte_subtitle_asset.cc
+++ b/src/smpte_subtitle_asset.cc
@@ -253,6 +253,13 @@ SMPTESubtitleAsset::read_mxf_descriptor (shared_ptr<ASDCP::TimedText::MXFReader>
}
_intrinsic_duration = descriptor.ContainerDuration;
+ /* The thing which is called AssetID in the descriptor is also known as the
+ * ResourceID of the MXF. We store that, at present just for verification
+ * purposes.
+ */
+ char id[64];
+ Kumu::bin2UUIDhex (descriptor.AssetID, ASDCP::UUIDlen, id, sizeof(id));
+ _resource_id = id;
}
diff --git a/src/smpte_subtitle_asset.h b/src/smpte_subtitle_asset.h
index 5d4553a5..19e22e0c 100644
--- a/src/smpte_subtitle_asset.h
+++ b/src/smpte_subtitle_asset.h
@@ -172,6 +172,11 @@ public:
return _xml_id;
}
+ /** @return ResourceID read from the MXF, if there was one */
+ boost::optional<std::string> resource_id () const {
+ return _resource_id;
+ }
+
static bool valid_mxf (boost::filesystem::path);
static std::string static_pkl_type (Standard) {
return "application/mxf";