+2017-12-17 Carl Hetherington <cth@carlh.net>
+
+ * Display decode resolution in the player.
+
2017-12-13 Carl Hetherington <cth@carlh.net>
* Version 2.11.29 released.
void set_decode_reduction (optional<int> reduction)
{
_viewer->set_dcp_decode_reduction (reduction);
+ _info->triggered_update ();
}
void load_dcp (boost::filesystem::path dir)
/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2017 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
}
}
+optional<int>
+FilmViewer::dcp_decode_reduction () const
+{
+ return _dcp_decode_reduction;
+}
+
DCPTime
FilmViewer::one_video_frame () const
{
void set_position (DCPTime p);
void set_coalesce_player_changes (bool c);
void set_dcp_decode_reduction (boost::optional<int> reduction);
+ boost::optional<int> dcp_decode_reduction () const;
void refresh ();
wxSizer* s = new wxBoxSizer (wxVERTICAL);
add_label_to_sizer(s, this, _("Performance"), false, 0)->SetFont(title_font);
_dropped = add_label_to_sizer(s, this, wxT(""), false, 0);
+ _decode_resolution = add_label_to_sizer(s, this, wxT(""), false, 0);
_sizer->Add (s, 1, wxEXPAND | wxALL, 6);
}
dcp->full_length().frames_round(*vfr)
)
);
+
+ dcp::Size decode = dcp->video->size();
+ optional<int> reduction = _viewer->dcp_decode_reduction();
+ if (reduction) {
+ decode.width /= pow(2, *reduction);
+ decode.height /= pow(2, *reduction);
+ }
+
+ checked_set (_decode_resolution, wxString::Format(_("Decode resolution: %dx%d"), decode.width, decode.height));
}