summaryrefslogtreecommitdiff
path: root/src/wx/player_information.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-12-17 15:47:10 +0000
committerCarl Hetherington <cth@carlh.net>2017-12-17 15:47:10 +0000
commit6abe10b28dbe3132ac329dad60befae5f40fbe69 (patch)
treeaf2787f633a4c05868fb6c934b43835b93597a93 /src/wx/player_information.cc
parent33a3a1d5c73685287ee5dcbbd6c67f99f98ad72f (diff)
Display decode resolution in the player.
Diffstat (limited to 'src/wx/player_information.cc')
-rw-r--r--src/wx/player_information.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wx/player_information.cc b/src/wx/player_information.cc
index 1b3d2809b..98d4ab81b 100644
--- a/src/wx/player_information.cc
+++ b/src/wx/player_information.cc
@@ -55,6 +55,7 @@ PlayerInformation::PlayerInformation (wxWindow* parent, FilmViewer* viewer)
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);
}
@@ -120,4 +121,13 @@ PlayerInformation::triggered_update ()
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));
}