X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Ftimeline.cc;h=8ce811c28c3f668ea913008e16ce4c09fd631a21;hb=0a2d40420813403a96352c6dc895d23fcd9994c0;hp=56af6f771b22a08b39e7ae0f072308b3d7158374;hpb=775ae0e37bbec115d742feade0adc614a9a2301c;p=dcpomatic.git diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index 56af6f771..8ce811c28 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -33,6 +33,7 @@ #include "lib/timer.h" #include "lib/audio_content.h" #include "lib/subtitle_content.h" +#include "lib/video_content.h" #include #include #include @@ -149,8 +150,7 @@ Timeline::recreate_views () _views.push_back (shared_ptr (new TimelineVideoContentView (*this, i))); } - shared_ptr ac = dynamic_pointer_cast (i); - if (ac && !ac->audio_mapping().mapped_output_channels().empty ()) { + if (i->audio && !i->audio->mapping().mapped_output_channels().empty ()) { _views.push_back (shared_ptr (new TimelineAudioContentView (*this, i))); } @@ -169,7 +169,7 @@ Timeline::film_content_changed (int property, bool frequent) { ensure_ui_thread (); - if (property == AudioContentProperty::AUDIO_STREAMS) { + if (property == AudioContentProperty::STREAMS) { recreate_views (); } else if (!frequent) { setup_pixels_per_second (); @@ -195,8 +195,7 @@ Timeline::assign_tracks () if (dynamic_pointer_cast (*i)) { /* Video on tracks 0 and 1 (left and right eye) */ - shared_ptr vc = dynamic_pointer_cast (cv->content ()); - cv->set_track (vc->video_frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT ? 1 : 0); + cv->set_track (cv->content()->video->frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT ? 1 : 0); _tracks = max (_tracks, 2); continue; } else if (dynamic_pointer_cast (*i)) {