Note that newer libsub version is required.
[dcpomatic.git] / src / lib / content.h
index ce6eaa83be63a1eceef990688e9bd328e2915961..540abdd8acf4f863d48ff81e15dd969fdc3e349b 100644 (file)
@@ -31,8 +31,8 @@
 #include "change_signaller.h"
 #include "dcpomatic_time.h"
 #include "signaller.h"
-#include "types.h"
 #include "user_property.h"
+#include "text_type.h"
 #include <libcxml/cxml.h>
 #include <boost/filesystem.hpp>
 #include <boost/signals2.hpp>
@@ -175,6 +175,10 @@ public:
                return position() + length_after_trim(film);
        }
 
+       dcpomatic::DCPTimePeriod period(std::shared_ptr<const Film> film) const {
+               return { position(), end(film) };
+       }
+
        dcpomatic::DCPTime length_after_trim (std::shared_ptr<const Film> film) const;
 
        boost::optional<double> video_frame_rate () const {
@@ -199,12 +203,14 @@ public:
                return true;
        }
 
+       bool has_mapped_audio() const;
+
        /* ChangeType::PENDING and ChangeType::CANCELLED may be emitted from any thread; ChangeType::DONE always from GUI thread */
        boost::signals2::signal<void (ChangeType, std::weak_ptr<Content>, int, bool)> Change;
 
        std::shared_ptr<VideoContent> video;
        std::shared_ptr<AudioContent> audio;
-       std::list<std::shared_ptr<TextContent>> text;
+       std::vector<std::shared_ptr<TextContent>> text;
        std::shared_ptr<AtmosContent> atmos;
 
        std::shared_ptr<TextContent> only_text () const;
@@ -230,7 +236,7 @@ private:
        friend struct best_dcp_frame_rate_test_double;
        friend struct audio_sampling_rate_test;
        friend struct subtitle_font_id_change_test2;
-       template<class, class> friend class ChangeSignaller;
+       template<class, class> friend class ChangeSignalDespatcher;
 
        void signal_change (ChangeType, int);
 
@@ -252,6 +258,7 @@ private:
 
 
 typedef ChangeSignaller<Content, int> ContentChangeSignaller;
+typedef ChangeSignalDespatcher<Content, int> ContentChangeSignalDespatcher;
 
 
 #endif