summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-04-22 10:52:13 +0100
committerCarl Hetherington <cth@carlh.net>2016-04-22 10:52:13 +0100
commite0b9aa27ec06ccd97cc32f9d7f14b8a8e99df57c (patch)
tree6dc2d8171352ff92c5579af8fbe587032e889efe
parent2ab85e1b8c6652ec65b3ac174cb656475a76c471 (diff)
Split left-only and right-only video content in the timeline (#845).
-rw-r--r--ChangeLog5
-rw-r--r--src/wx/timeline.cc17
-rw-r--r--src/wx/timeline_labels_view.cc2
3 files changed, 15 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d32e52f4..3c27542c6 100644
--- 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.
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index ba320bf2f..9a86ada12 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -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());
diff --git a/src/wx/timeline_labels_view.cc b/src/wx/timeline_labels_view.cc
index c9aaef1e4..9b55c2bd0 100644
--- a/src/wx/timeline_labels_view.cc
+++ b/src/wx/timeline_labels_view.cc
@@ -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);
}