*/
-#include <boost/signals2.hpp>
+#ifndef DCPOMATIC_SUBTITLE_DECODER_H
+#define DCPOMATIC_SUBTITLE_DECODER_H
+
+#include <dcp/subtitle_string.h>
#include "decoder.h"
#include "rect.h"
#include "types.h"
-#include "decoded.h"
+#include "content_subtitle.h"
class Film;
class DCPTimedSubtitle;
class SubtitleDecoder : public virtual Decoder
{
public:
- SubtitleDecoder (boost::shared_ptr<const Film>);
+ SubtitleDecoder (boost::shared_ptr<const SubtitleContent>);
+
+ std::list<boost::shared_ptr<ContentImageSubtitle> > get_image_subtitles (ContentTimePeriod period);
+ std::list<boost::shared_ptr<ContentTextSubtitle> > get_text_subtitles (ContentTimePeriod period);
protected:
- void subtitle (boost::shared_ptr<Image>, dcpomatic::Rect<double>, DCPTime, DCPTime);
+ void seek (ContentTime, bool);
+
+ void image_subtitle (ContentTimePeriod period, boost::shared_ptr<Image>, dcpomatic::Rect<double>);
+ void text_subtitle (std::list<dcp::SubtitleString>);
+
+ std::list<boost::shared_ptr<ContentImageSubtitle> > _decoded_image_subtitles;
+ std::list<boost::shared_ptr<ContentTextSubtitle> > _decoded_text_subtitles;
+
+private:
+ template <class T>
+ std::list<boost::shared_ptr<T> > get (std::list<boost::shared_ptr<T> > const & subs, ContentTimePeriod period);
+
+ boost::shared_ptr<const SubtitleContent> _subtitle_content;
};
+
+#endif