Merge 1.0-seek and subtitle-content.
[dcpomatic.git] / src / lib / player.h
index 5f7c553a0f9f0bd44b2c6b49c628c59520d9381c..377e8bd18e5ae3634d4faa0848f19fbcee088082 100644 (file)
@@ -23,6 +23,7 @@
 #include <list>
 #include <boost/shared_ptr.hpp>
 #include <boost/enable_shared_from_this.hpp>
+#include <libdcp/subtitle_asset.h>
 #include "playlist.h"
 #include "content.h"
 #include "film.h"
@@ -151,7 +152,8 @@ private:
        void emit_black ();
        void emit_silence (AudioFrame);
        void film_changed (Film::Property);
-       void update_subtitle ();
+       void update_subtitle_from_image ();
+       void update_subtitle_from_text ();
        void emit_video (boost::weak_ptr<Piece>, boost::shared_ptr<DecodedVideo>);
        void emit_audio (boost::weak_ptr<Piece>, boost::shared_ptr<DecodedAudio>);
        void step_video_position (boost::shared_ptr<DecodedVideo>);
@@ -178,9 +180,14 @@ private:
 
        struct {
                boost::weak_ptr<Piece> piece;
-               boost::shared_ptr<DecodedSubtitle> subtitle;
-       } _in_subtitle;
+               boost::shared_ptr<DecodedImageSubtitle> subtitle;
+       } _image_subtitle;
 
+       struct {
+               boost::weak_ptr<Piece> piece;
+               boost::shared_ptr<DecodedTextSubtitle> subtitle;
+       } _text_subtitle;
+       
        struct {
                Position<int> position;
                boost::shared_ptr<Image> image;