+
+
+/** @return time of first subtitle, if there is one */
+optional<ContentTime>
+DCPSubtitleDecoder::first () const
+{
+ if (_subtitles.empty()) {
+ return {};
+ }
+
+ return ContentTime::from_seconds(_subtitles[0]->in().as_seconds());
+}
+
+
+void
+DCPSubtitleDecoder::update_position()
+{
+ if (_next != _subtitles.end()) {
+ only_text()->maybe_set_position(
+ ContentTime::from_seconds((*_next)->in().as_seconds())
+ );
+ }
+}
+