Expose the MXF ResourceID from SMPTESubtitleAsset.
authorCarl Hetherington <cth@carlh.net>
Thu, 8 Apr 2021 00:04:44 +0000 (02:04 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 8 Apr 2021 00:04:44 +0000 (02:04 +0200)
src/smpte_subtitle_asset.cc
src/smpte_subtitle_asset.h

index a55b91ae8477e7242d9248666d59bac10500fc20..9ff194f8152a8e5c9c8530cdb469c86b69a387ab 100644 (file)
@@ -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;
 }
 
 
index 5d4553a50747d2e15051de16e261174da11be3d4..19e22e0cf96d097faeda2277d1386b78507bca6d 100644 (file)
@@ -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";