#include "lib/timer.h"
#include "lib/audio_content.h"
#include "lib/subtitle_content.h"
+#include "lib/video_content.h"
#include <wx/graphics.h>
#include <boost/weak_ptr.hpp>
#include <boost/foreach.hpp>
_views.push_back (_labels_view);
BOOST_FOREACH (shared_ptr<Content> i, film->content ()) {
- if (dynamic_pointer_cast<VideoContent> (i)) {
+ if (i->video) {
_views.push_back (shared_ptr<TimelineView> (new TimelineVideoContentView (*this, i)));
}
- shared_ptr<AudioContent> ac = dynamic_pointer_cast<AudioContent> (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<TimelineView> (new TimelineAudioContentView (*this, i)));
}
- shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (i);
- if (sc && sc->has_subtitles ()) {
- _views.push_back (shared_ptr<TimelineView> (new TimelineSubtitleContentView (*this, sc)));
+ if (i->subtitle) {
+ _views.push_back (shared_ptr<TimelineView> (new TimelineSubtitleContentView (*this, i)));
}
}
{
ensure_ui_thread ();
- if (property == AudioContentProperty::AUDIO_STREAMS) {
+ if (property == AudioContentProperty::STREAMS) {
recreate_views ();
} else if (!frequent) {
setup_pixels_per_second ();
if (dynamic_pointer_cast<TimelineVideoContentView> (*i)) {
/* 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);
+ 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<TimelineSubtitleContentView> (*i)) {