Reasonably straightforward stuff; main things are adding
[dcpomatic.git] / src / lib / ffmpeg_content.h
index c5797d5d1b63761d6409fe055ed69692e8db6518..d210d63a8b98e8cb674b6b745d25ee7d901b5986 100644 (file)
 #ifndef DCPOMATIC_FFMPEG_CONTENT_H
 #define DCPOMATIC_FFMPEG_CONTENT_H
 
-#include "video_content.h"
 #include "audio_content.h"
 #include "subtitle_content.h"
-#include "audio_mapping.h"
-#include <boost/enable_shared_from_this.hpp>
-#include <boost/lexical_cast.hpp>
 
 struct AVFormatContext;
 struct AVStream;
@@ -33,18 +29,20 @@ struct AVStream;
 class Filter;
 class FFmpegSubtitleStream;
 class FFmpegAudioStream;
+class VideoContent;
 struct ffmpeg_pts_offset_test;
 struct audio_sampling_rate_test;
 
-class FFmpegContentProperty : public VideoContentProperty
+class FFmpegContentProperty
 {
 public:
        static int const SUBTITLE_STREAMS;
+       /** The chosen subtitle stream, or something about it */
        static int const SUBTITLE_STREAM;
        static int const FILTERS;
 };
 
-class FFmpegContent : public VideoContent, public AudioContent, public SubtitleContent
+class FFmpegContent : public AudioContent, public SubtitleContent
 {
 public:
        FFmpegContent (boost::shared_ptr<const Film>, boost::filesystem::path);
@@ -72,6 +70,7 @@ public:
        /* SubtitleContent */
        bool has_text_subtitles () const;
        bool has_image_subtitles () const;
+       double subtitle_video_frame_rate () const;
 
        void set_filters (std::vector<Filter const *> const &);
 
@@ -102,7 +101,13 @@ public:
                return _first_video;
        }
 
-       std::list<ContentTimePeriod> subtitles_during (ContentTimePeriod, bool starting) const;
+       std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod, bool starting) const;
+       std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod, bool starting) const;
+
+       void signal_subtitle_stream_changed ();
+
+protected:
+       void add_properties (std::list<UserProperty> &) const;
 
 private:
        friend struct ffmpeg_pts_offset_test;
@@ -114,6 +119,12 @@ private:
        boost::optional<ContentTime> _first_video;
        /** Video filters that should be used when generating DCPs */
        std::vector<Filter const *> _filters;
+
+       AVColorRange _color_range;
+       AVColorPrimaries _color_primaries;
+       AVColorTransferCharacteristic _color_trc;
+       AVColorSpace _colorspace;
+       boost::optional<int> _bits_per_pixel;
 };
 
 #endif