diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-04-01 22:51:54 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-04-01 22:51:54 +0100 |
| commit | 854f2e5bbb7ffb9758b823af87034033033f3cb8 (patch) | |
| tree | 54e5fe000e5f961ca65e2c2aba81749d9601226d /src/lib/playlist.cc | |
| parent | 1eeba876ce09cedfa4c779bf3554372c01dc34c5 (diff) | |
| parent | 931fa4ef2dbfb7c9f726c4dd41eea79621b49906 (diff) | |
Merge master.
Diffstat (limited to 'src/lib/playlist.cc')
| -rw-r--r-- | src/lib/playlist.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc index c46e65d8b..1e8a3319c 100644 --- a/src/lib/playlist.cc +++ b/src/lib/playlist.cc @@ -64,7 +64,7 @@ Playlist::~Playlist () void Playlist::content_changed (weak_ptr<Content> content, int property, bool frequent) { - if (property == ContentProperty::LENGTH) { + if (property == ContentProperty::LENGTH || property == VideoContentProperty::VIDEO_FRAME_TYPE) { maybe_sequence_video (); } @@ -81,14 +81,21 @@ Playlist::maybe_sequence_video () _sequencing_video = true; ContentList cl = _content; - DCPTime next; + DCPTime next_left; + DCPTime next_right; for (ContentList::iterator i = _content.begin(); i != _content.end(); ++i) { - if (!dynamic_pointer_cast<VideoContent> (*i)) { + shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (*i); + if (!vc) { continue; } - (*i)->set_position (next); - next = (*i)->end() + DCPTime::delta (); + if (vc->video_frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT) { + vc->set_position (next_right); + next_right = vc->end() + DCPTime::delta (); + } else { + vc->set_position (next_left); + next_left = vc->end() + DCPTime::delta (); + } } /* This won't change order, so it does not need a sort */ |
