Get ccaps by asking the Player, rather than by listening to its emissions,
[dcpomatic.git] / src / wx / closed_captions_dialog.h
index ca19cc95ad97b0205c3955502a24dded4f5cdf1f..a599bc7036f8d048bb421a64fe30a9e974a506d8 100644 (file)
 */
 
 #include "lib/dcpomatic_time.h"
-#include "lib/player_caption.h"
+#include "lib/player.h"
 #include <wx/wx.h>
 
-class ClosedCaptionsView : public wxDialog
+class Player;
+
+class ClosedCaptionsDialog : public wxDialog
 {
 public:
-       ClosedCaptionsView (wxWindow* parent);
+       ClosedCaptionsDialog (wxWindow* parent);
 
-       void refresh (DCPTime);
-       void caption (PlayerCaption, DCPTimePeriod);
+       void update (DCPTime);
        void clear ();
+       void set_player (boost::weak_ptr<Player>);
 
 private:
        void paint ();
 
-       typedef std::pair<PlayerCaption, DCPTimePeriod> Caption;
-       std::list<Caption> _captions;
        std::vector<wxString> _lines;
+       boost::weak_ptr<Player> _player;
        static int const _num_lines;
        static int const _num_chars_per_line;
 };