Partial work on using a no-video FFmpeg file.
[dcpomatic.git] / src / lib / ffmpeg_examiner.h
index 27bff08b47426749eeee7201234a1aed4e955238..258c2ea5359d9d8ad0a1885cc93ffe31e75a1a0d 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -25,16 +25,20 @@ struct AVStream;
 
 class FFmpegAudioStream;
 class FFmpegSubtitleStream;
+class Job;
 
 class FFmpegExaminer : public FFmpeg, public VideoExaminer
 {
 public:
        FFmpegExaminer (boost::shared_ptr<const FFmpegContent>, boost::shared_ptr<Job> job = boost::shared_ptr<Job> ());
 
+       bool has_video () const;
+
        boost::optional<double> video_frame_rate () const;
        dcp::Size video_size () const;
        Frame video_length () const;
        boost::optional<double> sample_aspect_ratio () const;
+       bool yuv () const;
 
        std::vector<boost::shared_ptr<FFmpegSubtitleStream> > subtitle_streams () const {
                return _subtitle_streams;
@@ -85,6 +89,20 @@ private:
        Frame _video_length;
        bool _need_video_length;
 
-       typedef std::map<boost::shared_ptr<FFmpegSubtitleStream>, boost::optional<ContentTime> > LastSubtitleMap;
+       struct SubtitleStart
+       {
+               SubtitleStart (std::string id_, bool image_, ContentTime time_)
+                       : id (id_)
+                       , image (image_)
+                       , time (time_)
+               {}
+
+               std::string id;
+               /** true if it's an image subtitle, false for text */
+               bool image;
+               ContentTime time;
+       };
+
+       typedef std::map<boost::shared_ptr<FFmpegSubtitleStream>, boost::optional<SubtitleStart> > LastSubtitleMap;
        LastSubtitleMap _last_subtitle_start;
 };