Allow changes to colours of FFmpeg subtitles (#795).
[dcpomatic.git] / src / lib / ffmpeg_content.h
index c5797d5d1b63761d6409fe055ed69692e8db6518..e9cb3dacf911577105be1d91ad7e5e5dcf87cc1d 100644 (file)
@@ -23,9 +23,6 @@
 #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;
@@ -40,6 +37,7 @@ class FFmpegContentProperty : public VideoContentProperty
 {
 public:
        static int const SUBTITLE_STREAMS;
+       /** The chosen subtitle stream, or something about it */
        static int const SUBTITLE_STREAM;
        static int const FILTERS;
 };
@@ -72,6 +70,9 @@ public:
        /* SubtitleContent */
        bool has_text_subtitles () const;
        bool has_image_subtitles () const;
+       double subtitle_video_frame_rate () const {
+               return video_frame_rate ();
+       }
 
        void set_filters (std::vector<Filter const *> const &);
 
@@ -102,7 +103,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 +121,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