#include "playhead_to_timecode_dialog.h"
#include "playhead_to_frame_dialog.h"
#include "wx_util.h"
+#include "closed_captions_view.h"
#include "lib/film.h"
#include "lib/ratio.h"
#include "lib/util.h"
, _playing (false)
, _latency_history_count (0)
, _dropped (0)
+ , _closed_captions_dialog (new ClosedCaptionsDialog(GetParent()))
{
#ifndef __WXOSX__
_panel->SetDoubleBuffered (true);
_film = film;
_frame.reset ();
+ _closed_captions_dialog->clear ();
update_position_slider ();
update_position_label ();
_film->Changed.connect (boost::bind (&FilmViewer::film_changed, this, _1));
_player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1, _2));
+ _player->Caption.connect (boost::bind (&FilmViewer::caption, this, _1, _2, _3));
/* Keep about 1 second's worth of history samples */
_latency_history_count = _film->audio_frame_rate() / _audio_block_size;
_inter_size = _player_video.first->inter_size ();
refresh_panel ();
+
+ _closed_captions_dialog->refresh (time());
}
void
bool const was_running = stop ();
+ _closed_captions_dialog->clear ();
_butler->seek (t, accurate);
get ();
{
return DCPTime::from_frames (1, _film->video_frame_rate());
}
+
+void
+FilmViewer::show_closed_captions ()
+{
+ _closed_captions_dialog->Show();
+}
+
+void
+FilmViewer::caption (PlayerCaption c, CaptionType t, DCPTimePeriod p)
+{
+ if (t == CAPTION_CLOSED) {
+ _closed_captions_dialog->caption (c, p);
+ }
+}