_player->set_play_referenced ();
_film->Change.connect (boost::bind (&FilmViewer::film_change, this, _1, _2));
- _film->ContentChange.connect (boost::bind(&FilmViewer::content_change, this, _1, _3));
_film->LengthChange.connect (boost::bind(&FilmViewer::film_length_change, this));
_player->Change.connect (boost::bind (&FilmViewer::player_change, this, _1, _2, _3));
- film_change (CHANGE_TYPE_DONE, Film::VIDEO_FRAME_RATE);
- film_change (CHANGE_TYPE_DONE, Film::THREE_D);
+ film_change (ChangeType::DONE, Film::Property::VIDEO_FRAME_RATE);
+ film_change (ChangeType::DONE, Film::Property::THREE_D);
film_length_change ();
/* Keep about 1 second's worth of history samples */
Config::instance()->audio_mapping(_audio_channels),
_audio_channels,
bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24),
- VIDEO_RANGE_FULL,
+ VideoRange::FULL,
false,
true
)
void
FilmViewer::player_change (ChangeType type, int property, bool frequent)
{
- if (type != CHANGE_TYPE_DONE || frequent) {
+ if (type != ChangeType::DONE || frequent) {
return;
}
if (!refreshed) {
slow_refresh ();
}
+
+ if (property == TextContentProperty::USE || property == TextContentProperty::TYPE || property == TextContentProperty::DCP_TRACK) {
+ _closed_captions_dialog->update_tracks (_film);
+ }
}
void
FilmViewer::film_change (ChangeType type, Film::Property p)
{
- if (type != CHANGE_TYPE_DONE) {
+ if (type != ChangeType::DONE) {
return;
}
- if (p == Film::AUDIO_CHANNELS) {
+ if (p == Film::Property::AUDIO_CHANNELS) {
recreate_butler ();
- } else if (p == Film::VIDEO_FRAME_RATE) {
+ } else if (p == Film::Property::VIDEO_FRAME_RATE) {
_video_view->set_video_frame_rate (_film->video_frame_rate());
- } else if (p == Film::THREE_D) {
+ } else if (p == Film::Property::THREE_D) {
_video_view->set_three_d (_film->three_d());
- } else if (p == Film::CONTENT) {
+ } else if (p == Film::Property::CONTENT) {
_closed_captions_dialog->update_tracks (_film);
}
}
_coalesce_player_changes = c;
if (!c) {
- BOOST_FOREACH (int i, _pending_player_changes) {
- player_change (CHANGE_TYPE_DONE, i, false);
+ for (auto i: _pending_player_changes) {
+ player_change (ChangeType::DONE, i, false);
}
_pending_player_changes.clear ();
}
}
Frame total = 0;
- BOOST_FOREACH (Frame i, _latency_history) {
+ for (auto i: _latency_history) {
total += i;
}
}
-void
-FilmViewer::content_change (ChangeType type, int property)
-{
- if (type != CHANGE_TYPE_DONE) {
- return;
- }
-
- if (property == TextContentProperty::USE || property == TextContentProperty::TYPE || property == TextContentProperty::DCP_TRACK) {
- _closed_captions_dialog->update_tracks (_film);
- }
-}
-
-
void
FilmViewer::image_changed (shared_ptr<PlayerVideo> pv)
{