Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
[dcpomatic.git] / src / lib / ffmpeg_decoder.h
index 65e4cf46afc6ff6ba9ea87a7dcdcc3264acc808a..3a38f4475333d3f3871e057fb376c56ff3ca2122 100644 (file)
@@ -36,6 +36,7 @@ class Log;
 class VideoFilterGraph;
 class FFmpegAudioStream;
 class AudioBuffers;
+class Image;
 struct ffmpeg_pts_offset_test;
 
 /** @class FFmpegDecoder
@@ -44,7 +45,7 @@ struct ffmpeg_pts_offset_test;
 class FFmpegDecoder : public FFmpeg, public Decoder
 {
 public:
-       FFmpegDecoder (boost::shared_ptr<const FFmpegContent>, boost::shared_ptr<Log>);
+       FFmpegDecoder (boost::shared_ptr<const FFmpegContent>, boost::shared_ptr<Log> log, bool fast);
 
        bool pass ();
        void seek (ContentTime time, bool);
@@ -61,8 +62,8 @@ private:
        void decode_audio_packet ();
        void decode_subtitle_packet ();
 
-       void decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimePeriod period);
-       void decode_ass_subtitle (std::string ass, ContentTimePeriod period);
+       void decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTime from);
+       void decode_ass_subtitle (std::string ass, ContentTime from);
 
        void maybe_add_subtitle ();
        boost::shared_ptr<AudioBuffers> deinterleave_audio (boost::shared_ptr<FFmpegAudioStream> stream) const;
@@ -73,4 +74,10 @@ private:
        boost::mutex _filter_graphs_mutex;
 
        ContentTime _pts_offset;
+       boost::optional<ContentTime> _current_subtitle_to;
+       bool _have_current_subtitle;
+
+       boost::shared_ptr<Image> _black_image;
+
+       std::vector<boost::optional<ContentTime> > _next_time;
 };