diff options
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/film_editor.cc | 8 | ||||
| -rw-r--r-- | src/wx/film_viewer.cc | 12 | ||||
| -rw-r--r-- | src/wx/film_viewer.h | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index 32def4641..891675143 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -1,3 +1,5 @@ +/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */ + /* Copyright (C) 2012 Carl Hetherington <cth@carlh.net> @@ -337,13 +339,13 @@ FilmEditor::make_content_panel () wxBoxSizer* b = new wxBoxSizer (wxVERTICAL); _content_add = new wxButton (_content_panel, wxID_ANY, _("Add...")); - b->Add (_content_add); + b->Add (_content_add, 1, wxEXPAND | wxLEFT | wxRIGHT); _content_remove = new wxButton (_content_panel, wxID_ANY, _("Remove")); - b->Add (_content_remove); + b->Add (_content_remove, 1, wxEXPAND | wxLEFT | wxRIGHT); _content_properties = new wxButton (_content_panel, wxID_ANY, _("Properties...")); b->Add (_content_properties); _content_timeline = new wxButton (_content_panel, wxID_ANY, _("Timeline...")); - b->Add (_content_timeline); + b->Add (_content_timeline, 1, wxEXPAND | wxLEFT | wxRIGHT); s->Add (b, 0, wxALL, 4); diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 11c826a26..2f69235c1 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -1,3 +1,5 @@ +/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */ + /* Copyright (C) 2012 Carl Hetherington <cth@carlh.net> @@ -388,7 +390,7 @@ FilmViewer::check_play_state () } void -FilmViewer::process_video (shared_ptr<const Image> image, bool, shared_ptr<Subtitle> sub, double t) +FilmViewer::process_video (shared_ptr<const Image> image, bool, shared_ptr<Subtitle> sub, Time t) { _raw_frame = image; _raw_sub = sub; @@ -398,9 +400,9 @@ FilmViewer::process_video (shared_ptr<const Image> image, bool, shared_ptr<Subti _got_frame = true; double const fps = _film->dcp_video_frame_rate (); - _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps)))); + _frame->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps / TIME_HZ)))); - double w = t; + double w = static_cast<double>(t) / TIME_HZ; int const h = (w / 3600); w -= h * 3600; int const m = (w / 60); @@ -425,8 +427,6 @@ FilmViewer::get_frame () return; } - cout << "-> FilmViewer::get_frame()\n"; - try { _got_frame = false; while (!_got_frame) { @@ -443,8 +443,6 @@ FilmViewer::get_frame () check_play_state (); error_dialog (this, wxString::Format (_("Could not decode video for view (%s)"), std_to_wx(e.what()).data())); } - - cout << "<- FilmViewer::get_frame()\n"; } void diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index 02d862ca0..68d51bfbd 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -67,7 +67,7 @@ private: void slider_moved (wxScrollEvent &); void play_clicked (wxCommandEvent &); void timer (wxTimerEvent &); - void process_video (boost::shared_ptr<const Image>, bool, boost::shared_ptr<Subtitle>, double); + void process_video (boost::shared_ptr<const Image>, bool, boost::shared_ptr<Subtitle>, Time); void calculate_sizes (); void check_play_state (); void update_from_raw (); |
