From 0a5615c17edf6d9c51d9269c824d6caf71f710e5 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 17 Jan 2022 18:45:19 +0100 Subject: Use optional for ReelAsset _annotation_text. Not only is this tag optional in Interop and SMPTE, but it would appear that if it is present but empty a DCP will not play back on Sony SRX320 / LMT3000 systems (DoM bug #2124). Here we use optional<>, as seems to make sense, and also refuse to write empty tags (instead omitting the tag entirely). --- src/reel_asset.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/reel_asset.h') diff --git a/src/reel_asset.h b/src/reel_asset.h index ab06434e..200c49ff 100644 --- a/src/reel_asset.h +++ b/src/reel_asset.h @@ -120,7 +120,7 @@ public: /** @return , or - if is not present */ int64_t actual_duration () const; - std::string annotation_text () const { + boost::optional annotation_text () const { return _annotation_text; } @@ -128,6 +128,10 @@ public: _annotation_text = at; } + void unset_annotation_text () { + _annotation_text = boost::none; + } + bool asset_equals (std::shared_ptr, EqualityOptions, NoteHandler) const; protected: @@ -147,7 +151,7 @@ protected: boost::optional _duration; ///< The <Duration> from the reel's entry for this asset, if present private: - std::string _annotation_text; ///< The <AnnotationText> from the reel's entry for this asset + boost::optional _annotation_text; ///< The <AnnotationText> from the reel's entry for this asset Fraction _edit_rate; ///< The <EditRate> from the reel's entry for this asset boost::optional _entry_point; ///< The <EntryPoint> from the reel's entry for this asset }; -- cgit v1.2.3