- boost::optional<ContentTime> frame_time (AVStream* s) const;
-
- std::vector<boost::shared_ptr<FFmpegSubtitleStream> > _subtitle_streams;
- std::vector<boost::shared_ptr<FFmpegAudioStream> > _audio_streams;
- boost::optional<ContentTime> _first_video;
+ boost::optional<dcpomatic::ContentTime> frame_time (AVStream* s) const;
+
+ std::vector<std::shared_ptr<FFmpegSubtitleStream>> _subtitle_streams;
+ std::vector<std::shared_ptr<FFmpegAudioStream>> _audio_streams;
+ boost::optional<dcpomatic::ContentTime> _first_video;
+ /** Video length, either obtained from the header or derived by running
+ * through the whole file.
+ */
+ Frame _video_length;
+ bool _need_video_length;
+
+ boost::optional<double> _rotation;
+ bool _pulldown;
+
+ struct SubtitleStart
+ {
+ SubtitleStart (std::string id_, bool image_, dcpomatic::ContentTime time_)
+ : id (id_)
+ , image (image_)
+ , time (time_)
+ {}
+
+ std::string id;
+ /** true if it's an image subtitle, false for text */
+ bool image;
+ dcpomatic::ContentTime time;
+ };
+
+ typedef std::map<std::shared_ptr<FFmpegSubtitleStream>, boost::optional<SubtitleStart>> LastSubtitleMap;
+ LastSubtitleMap _last_subtitle_start;