Add has_subtitles method to SubtitleContent; tidy up timeline display a bit.
[dcpomatic.git] / src / lib / subrip_content.h
index 1551081b68acf9070e910f92cd8eb18dbd58e777..d2dcdee00b09cce5e1b014dba924fd0b09bea8ff 100644 (file)
@@ -23,13 +23,25 @@ class SubRipContent : public SubtitleContent
 {
 public:
        SubRipContent (boost::shared_ptr<const Film>, boost::filesystem::path);
-       SubRipContent (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>, int);
+       SubRipContent (boost::shared_ptr<const Film>, cxml::ConstNodePtr, int);
 
+       boost::shared_ptr<SubRipContent> shared_from_this () {
+               return boost::dynamic_pointer_cast<SubRipContent> (Content::shared_from_this ());
+       }
+       
+       /* Content */
        void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
        std::string information () const;
-       void as_xml (xmlpp::Node *);
-       Time full_length () const;
-       std::string identifier () const;
+       void as_xml (xmlpp::Node *) const;
+       DCPTime full_length () const;
+
+       /* SubtitleContent */
+       bool has_subtitles () const {
+               return true;
+       }
+
+private:
+       DCPTime _length;
 };