summaryrefslogtreecommitdiff
path: root/src/wx/closed_captions_dialog.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-23 01:21:07 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-23 01:21:07 +0100
commitded71cffd18962ebb6b9611a5eb6dfafe9e8e4ec (patch)
tree6da7f5da15b7b4cdeb82f7099b549abf537bf4fa /src/wx/closed_captions_dialog.h
parent07d75f41aed77e340d927cc092dc4e7d74d03897 (diff)
Get ccaps by asking the Player, rather than by listening to its emissions,
which is slightly cleaner and works when subtitles are emitted with an unknown end time. Also add CCAPs to the player.
Diffstat (limited to 'src/wx/closed_captions_dialog.h')
-rw-r--r--src/wx/closed_captions_dialog.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h
index ca19cc95a..a599bc703 100644
--- a/src/wx/closed_captions_dialog.h
+++ b/src/wx/closed_captions_dialog.h
@@ -19,24 +19,25 @@
*/
#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;
};