X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fplayer_information.cc;h=f0eaa59bbea8e643ce7900f332fc3836e824061e;hb=0254f2d12acb2ff8d770b4e47dc15599d145fe17;hp=c0821510ceb54d56b2be333f2e3f77e8c70eb0be;hpb=c370a1f38215f6461cf4366e6885757e7aa2b96a;p=dcpomatic.git diff --git a/src/wx/player_information.cc b/src/wx/player_information.cc index c0821510c..f0eaa59bb 100644 --- a/src/wx/player_information.cc +++ b/src/wx/player_information.cc @@ -30,9 +30,9 @@ using std::cout; using std::string; -using boost::shared_ptr; -using boost::weak_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::weak_ptr; +using std::dynamic_pointer_cast; using boost::optional; /* This should be even */ @@ -90,7 +90,13 @@ PlayerInformation::periodic_update () { shared_ptr fv = _viewer.lock (); if (fv) { - checked_set (_dropped, wxString::Format(_("Dropped frames: %d"), fv->dropped())); + wxString s = wxString::Format(_("Dropped frames: %d"), fv->dropped() + fv->errored()); + if (fv->errored() == 1) { + s += wxString::Format(_(" (%d error)"), fv->errored()); + } else if (fv->errored() > 1) { + s += wxString::Format(_(" (%d errors)"), fv->errored()); + } + checked_set (_dropped, s); } } @@ -153,8 +159,8 @@ PlayerInformation::triggered_update () string const len = String::compose( wx_to_std(_("Length: %1 (%2 frames)")), - time_to_hmsf(dcp->full_length(), lrint(*vfr)), - dcp->full_length().frames_round(*vfr) + 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));