Add constructor of MonoPictureFrame from a JPEG2000 codestream file.
[libdcp.git] / src / subtitle_content.h
index 2c606921b33b676b579089498bb36cc1d12cc378..945eb4d098bc99b179c3662053db32e2571a0ab3 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "content.h"
 #include "dcp_time.h"
+#include "subtitle_string.h"
 #include <libcxml/cxml.h>
 
 namespace dcp
@@ -47,15 +48,15 @@ public:
         *  @param mxf true if the file is an MXF file, false for XML.
         */
        SubtitleContent (boost::filesystem::path file, bool mxf);
-       SubtitleContent (Fraction edit_rate, std::string movie_title, std::string language);
+       SubtitleContent (std::string movie_title, std::string language);
 
        bool equals (
-               boost::shared_ptr<const Content>,
+               boost::shared_ptr<const Asset>,
                EqualityOptions,
                boost::function<void (NoteType, std::string)> note
                ) const {
                /* XXX */
-               note (ERROR, "subtitle content not compared yet");
+               note (DCP_ERROR, "subtitle content not compared yet");
                return true;
        }
 
@@ -63,16 +64,18 @@ public:
                return _language;
        }
 
-       std::list<boost::shared_ptr<SubtitleString> > subtitles_at (Time t) const;
-       std::list<boost::shared_ptr<SubtitleString> > const & subtitles () const {
+       std::list<SubtitleString> subtitles_at (Time t) const;
+       std::list<SubtitleString> const & subtitles () const {
                return _subtitles;
        }
 
-       void add (boost::shared_ptr<SubtitleString>);
+       void add (SubtitleString);
 
-       void write_xml () const;
+       void write_xml (boost::filesystem::path) const;
        Glib::ustring xml_as_string () const;
 
+       Time latest_subtitle_out () const;
+
 protected:
        std::string pkl_type (Standard) const {
                return "text/xml";
@@ -111,8 +114,7 @@ private:
        std::string _language;
        std::list<boost::shared_ptr<LoadFont> > _load_font_nodes;
 
-       std::list<boost::shared_ptr<SubtitleString> > _subtitles;
-       bool _need_sort;
+       std::list<SubtitleString> _subtitles;
 };
 
 }