Split left-only and right-only video content in the timeline (#845).
authorCarl Hetherington <cth@carlh.net>
Fri, 22 Apr 2016 09:52:13 +0000 (10:52 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 22 Apr 2016 09:52:13 +0000 (10:52 +0100)
ChangeLog
src/wx/timeline.cc
src/wx/timeline_labels_view.cc

index 9d32e52f47e9ae363eaa2ef84e1412c88684934a..3c27542c6de61cc5eec827fee84352e0ce3e05bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-22  c.hetherington  <cth@carlh.net>
+
+       * Separate left-only and right-only video content
+       in the timeline (#845).
+
 2016-04-21  Carl Hetherington  <cth@carlh.net>
 
        * Updated nl_NL translation from Rob van Nieuwkerk.
index ba320bf2fb184c3fb4aeeef0c3f48e1ad926b2ae..9a86ada1288d71c81981e60281043714af9d1b40 100644 (file)
@@ -195,19 +195,20 @@ Timeline::assign_tracks ()
                }
 
                if (dynamic_pointer_cast<TimelineVideoContentView> (*i)) {
-                       /* Video on track 0 */
-                       cv->set_track (0);
-                       _tracks = max (_tracks, 1);
+                       /* Video on tracks 0 and 1 (left and right eye) */
+                       shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (cv->content ());
+                       cv->set_track (vc->video_frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT ? 1 : 0);
+                       _tracks = max (_tracks, 2);
                        continue;
                } else if (dynamic_pointer_cast<TimelineSubtitleContentView> (*i)) {
-                       /* Subtitles on track 1 */
-                       cv->set_track (1);
-                       _tracks = max (_tracks, 2);
+                       /* Subtitles on track 2 */
+                       cv->set_track (2);
+                       _tracks = max (_tracks, 3);
                        continue;
                }
 
-               /* Audio on tracks 2 and up */
-               int t = 2;
+               /* Audio on tracks 3 and up */
+               int t = 3;
 
                shared_ptr<Content> content = cv->content();
                DCPTimePeriod content_period (content->position(), content->end());
index c9aaef1e4aa864e04804c25f352ac7f20df1ca23..9b55c2bd0bcff7349f3e8929d46bd489e5a41707 100644 (file)
@@ -59,6 +59,6 @@ TimelineLabelsView::do_paint (wxGraphicsContext* gc, list<dcpomatic::Rect<int> >
        int const h = _timeline.track_height ();
        gc->SetFont (gc->CreateFont(wxNORMAL_FONT->Bold(), wxColour (0, 0, 0)));
        gc->DrawText (_("Video"), 0, h / 2);
-       gc->DrawText (_("Subtitles"), 0, 3 * h / 2);
+       gc->DrawText (_("Subtitles"), 0, 5 * h / 2);
        gc->DrawText (_("Audio"), 0, h + max (_timeline.tracks(), 2) * h / 2);
 }