diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-08-14 22:55:05 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-08-14 22:55:05 +0100 |
| commit | 0b7c380031db6aa2ce546a2a0c89926f40eae6b5 (patch) | |
| tree | 1dfc57348b80acd4f91e28c234bfd73333822b42 /src/wx/player_information.cc | |
| parent | 2f7c57ed8650320ec25e981ff646820bf77e5793 (diff) | |
Primitive dropped frame count in display.
Diffstat (limited to 'src/wx/player_information.cc')
| -rw-r--r-- | src/wx/player_information.cc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/wx/player_information.cc b/src/wx/player_information.cc index baeae838c..0a2921227 100644 --- a/src/wx/player_information.cc +++ b/src/wx/player_information.cc @@ -50,16 +50,27 @@ 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); _sizer->Add (s, 1, wxEXPAND | wxALL, 6); } SetSizerAndFit (_sizer); - update (); + triggered_update (); + + Bind (wxEVT_TIMER, boost::bind (&PlayerInformation::periodic_update, this)); + _timer.reset (new wxTimer (this)); + _timer->Start (500); +} + +void +PlayerInformation::periodic_update () +{ + checked_set (_dropped, wxString::Format(_("Dropped frames: %d"), _viewer->dropped())); } void -PlayerInformation::update () +PlayerInformation::triggered_update () { shared_ptr<DCPContent> dcp; if (_viewer->film()) { |
