diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-22 14:57:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-22 14:57:56 +0100 |
| commit | d342a1befa88cb3f23c7e3fccfd1edaeea968fed (patch) | |
| tree | f566fa87d0de35f3f0c4d7e20752c83b8a5b9bce /src/lib/content_subtitle.h | |
| parent | 85d343a420c4df1a08663c8afd3bdb73c8dfa985 (diff) | |
Add ContentTimePeriod class.
Diffstat (limited to 'src/lib/content_subtitle.h')
| -rw-r--r-- | src/lib/content_subtitle.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/src/lib/content_subtitle.h b/src/lib/content_subtitle.h index 8c266f483..6a28c37bf 100644 --- a/src/lib/content_subtitle.h +++ b/src/lib/content_subtitle.h @@ -30,34 +30,27 @@ class Image; class ContentSubtitle { public: - virtual ContentTime from () const = 0; - virtual ContentTime to () const = 0; + virtual ContentTimePeriod period () const = 0; }; class ContentImageSubtitle : public ContentSubtitle { public: - ContentImageSubtitle (ContentTime f, ContentTime t, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r) + ContentImageSubtitle (ContentTimePeriod p, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r) : image (im) , rectangle (r) - , _from (f) - , _to (t) + , _period (p) {} - ContentTime from () const { - return _from; + ContentTimePeriod period () const { + return _period; } - ContentTime to () const { - return _to; - } - boost::shared_ptr<Image> image; dcpomatic::Rect<double> rectangle; private: - ContentTime _from; - ContentTime _to; + ContentTimePeriod _period; }; class ContentTextSubtitle : public ContentSubtitle @@ -67,8 +60,7 @@ public: : subs (s) {} - ContentTime from () const; - ContentTime to () const; + ContentTimePeriod period () const; std::list<dcp::SubtitleString> subs; }; |
