diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-18 16:32:44 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-18 16:32:44 +0000 |
| commit | ad10aea1d685e67e0e639f6303fc9c8f8f1f945c (patch) | |
| tree | c6864f2bc1e62e74f9c7324a3d6bdda30ac5a076 /src | |
| parent | c226f90a2c113b8bbc270f29e6aa035ae1229d57 (diff) | |
| parent | d0cbdd2d2da7aaa5454e47bf7dcad27bf90bd361 (diff) | |
Merge branch '1.0' into 1.0-seek
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/player.cc | 8 | ||||
| -rw-r--r-- | src/lib/writer.cc | 11 | ||||
| -rw-r--r-- | src/wx/video_panel.cc | 4 |
3 files changed, 13 insertions, 10 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index a79a4fc5e..f5bc68565 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -465,7 +465,8 @@ Player::content_changed (weak_ptr<Content> w, int property, bool frequent) if ( property == ContentProperty::POSITION || property == ContentProperty::LENGTH || - property == ContentProperty::TRIM_START || property == ContentProperty::TRIM_END + property == ContentProperty::TRIM_START || property == ContentProperty::TRIM_END || + property == VideoContentProperty::VIDEO_FRAME_TYPE ) { _have_valid_pieces = false; @@ -476,10 +477,7 @@ Player::content_changed (weak_ptr<Content> w, int property, bool frequent) update_subtitle (); Changed (frequent); - } else if ( - property == VideoContentProperty::VIDEO_FRAME_TYPE || property == VideoContentProperty::VIDEO_CROP || - property == VideoContentProperty::VIDEO_RATIO - ) { + } else if (property == VideoContentProperty::VIDEO_CROP || property == VideoContentProperty::VIDEO_RATIO) { Changed (frequent); diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 4c9749d89..109447f73 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -274,9 +274,14 @@ try if (_film->length()) { shared_ptr<Job> job = _job.lock (); assert (job); - job->set_progress ( - float (_full_written + _fake_written + _repeat_written) / _film->time_to_video_frames (_film->length()) - ); + int total = _film->time_to_video_frames (_film->length ()); + if (_film->three_d ()) { + /* _full_written and so on are incremented for each eye, so we need to double the total + frames to get the correct progress. + */ + total *= 2; + } + job->set_progress (float (_full_written + _fake_written + _repeat_written) / total); } } diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index 4605abae7..1bf092786 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -271,7 +271,7 @@ VideoPanel::edit_filters_clicked () void VideoPanel::setup_description () { - FFmpegContentList vc = _editor->selected_ffmpeg_content (); + VideoContentList vc = _editor->selected_video_content (); if (vc.empty ()) { _description->SetLabel (""); return; @@ -280,7 +280,7 @@ VideoPanel::setup_description () return; } - shared_ptr<FFmpegContent> vcs = vc.front (); + shared_ptr<VideoContent> vcs = vc.front (); wxString d; |
