+ if (!dcp) {
+ checked_set (_dcp[0], _("No DCP loaded."));
+ for (int r = 1; r < dcp_lines; ++r) {
+ checked_set (_dcp[r], wxT(""));
+ }
+ checked_set (_decode_resolution, wxT(""));
+ return;
+ }
+
+ int r = 0;
+ checked_set (_dcp[r++], std_to_wx(dcp->name()));
+
+ if (dcp->needs_assets()) {
+ checked_set (_dcp[r], _("Needs OV"));
+ return;
+ }
+
+ if (dcp->needs_kdm()) {
+ checked_set (_dcp[r], _("Needs KDM"));
+ return;
+ }
+
+ DCPOMATIC_ASSERT (dcp->video);
+
+ checked_set (_dcp[r++], wxString::Format(_("Size: %dx%d"), dcp->video->size().width, dcp->video->size().height));
+ if (dcp->video_frame_rate()) {
+ checked_set (_dcp[r++], wxString::Format(_("Frame rate: %d"), (int) lrint(*dcp->video_frame_rate())));
+ }
+ if (dcp->audio && !dcp->audio->streams().empty()) {
+ checked_set (_dcp[r++], wxString::Format(_("Audio channels: %d"), dcp->audio->streams().front()->channels()));
+ }
+ if (!dcp->text.empty()) {
+ checked_set (_dcp[r++], _("Subtitles: yes"));
+ } else {
+ checked_set (_dcp[r++], _("Subtitles: no"));
+ }
+
+ optional<double> vfr;
+ vfr = dcp->video_frame_rate ();
+ DCPOMATIC_ASSERT (vfr);
+
+ string const len = String::compose(
+ wx_to_std(_("Length: %1 (%2 frames)")),
+ time_to_hmsf(dcp->full_length(fv->film()), lrint(*vfr)),
+ dcp->full_length(fv->film()).frames_round(*vfr)
+ );
+
+ checked_set (_dcp[r++], std_to_wx(len));
+
+ dcp::Size decode = dcp->video->size();
+ optional<int> reduction = fv->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));
+
+ DCPOMATIC_ASSERT(r <= dcp_lines);
+
+ _sizer->Layout ();