diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-17 18:45:19 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-17 18:45:21 +0100 |
| commit | 582bdd054dd5cc6e0874459d2ad426dc5669fb78 (patch) | |
| tree | 219a92f0a7d92f421eb67798da75e17574969f11 /src/reel_asset.h | |
| parent | 81c6fcba23f5c037f52c3324f4134e81d4f5d5c6 (diff) | |
Use optional for ReelAsset _annotation_text.no-empty-annotation-texts
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).
Diffstat (limited to 'src/reel_asset.h')
| -rw-r--r-- | src/reel_asset.h | 8 |
1 files changed, 6 insertions, 2 deletions
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 <Duration>, or <IntrinsicDuration> - <EntryPoint> if <Duration> is not present */ int64_t actual_duration () const; - std::string annotation_text () const { + boost::optional<std::string> 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<const ReelAsset>, EqualityOptions, NoteHandler) const; protected: @@ -147,7 +151,7 @@ protected: boost::optional<int64_t> _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<std::string> _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<int64_t> _entry_point; ///< The <EntryPoint> from the reel's entry for this asset }; |
