diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-15 00:43:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-15 03:16:16 +0100 |
| commit | 14a9755762cf1d1e33877dec4a02b627dfa400cb (patch) | |
| tree | 0e414426dca1b5799c955ba8eae3cd2c7ab86f05 /src/wx/timeline.cc | |
| parent | 88c1642d83bed44a75c4fe6827c5f02fc50141c2 (diff) | |
Allow multiple video tracks to be visible in the timeline.
Diffstat (limited to 'src/wx/timeline.cc')
| -rw-r--r-- | src/wx/timeline.cc | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 3187792be..359de9bf9 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -370,8 +370,9 @@ void Timeline::assign_tracks () { /* Tracks are: - Video (mono or left-eye) - Video (right-eye) + Video 1 + Video 2 + Video N Text 1 Text 2 Text N @@ -393,29 +394,7 @@ Timeline::assign_tracks () } } - /* Video */ - - bool have_3d = false; - for (auto i: _views) { - auto cv = dynamic_pointer_cast<TimelineVideoContentView>(i); - if (!cv) { - continue; - } - - /* Video on tracks 0 and maybe 1 (left and right eye) */ - if (cv->content()->video->frame_type() == VideoFrameType::THREE_D_RIGHT) { - cv->set_track (1); - _tracks = max (_tracks, 2); - have_3d = true; - } else { - cv->set_track (0); - } - } - - _tracks = max (_tracks, 1); - - /* Texts */ - + int const video_tracks = place<TimelineVideoContentView> (film, _views, _tracks); int const text_tracks = place<TimelineTextContentView> (film, _views, _tracks); /* Atmos */ @@ -441,7 +420,7 @@ Timeline::assign_tracks () sort(views.begin(), views.end(), AudioMappingComparator()); int const audio_tracks = place<TimelineAudioContentView> (film, views, _tracks); - _labels_view->set_3d (have_3d); + _labels_view->set_video_tracks (video_tracks); _labels_view->set_audio_tracks (audio_tracks); _labels_view->set_text_tracks (text_tracks); _labels_view->set_atmos (have_atmos); |
