diff options
author | Robin Gareus <robin@gareus.org> | 2013-04-16 22:57:19 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2013-04-16 23:28:08 +0200 |
commit | b713af2083c9da1ab6f82b47abae1da94bc96654 (patch) | |
tree | 277e9fb983dac67ee030f646b4de2f92e7373a6f /gtk2_ardour/video_timeline.cc | |
parent | a74743f5516ec8fdfcaa6d6d6e0fe12999eba832 (diff) |
vtl: use ArdourImage
* update videotimeline -> new zoom, position API
* update image-frame use Cairo based ArdourImage instead of GdkPixbuf
Diffstat (limited to 'gtk2_ardour/video_timeline.cc')
-rw-r--r-- | gtk2_ardour/video_timeline.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/video_timeline.cc b/gtk2_ardour/video_timeline.cc index 3ce80dd37c..47ce48dd66 100644 --- a/gtk2_ardour/video_timeline.cc +++ b/gtk2_ardour/video_timeline.cc @@ -302,7 +302,7 @@ VideoTimeLine::update_video_timeline() if (_session->timecode_frames_per_second() == 0 ) return; } - double frames_per_unit = editor->pixel_to_sample(1.0); + double frames_per_unit = editor->get_current_zoom(); framepos_t leftmost_frame = editor->leftmost_sample(); /* Outline: @@ -412,7 +412,7 @@ VideoTimeLine::update_video_timeline() } VideoImageFrame * frame = get_video_frame(vframeno, cut, rightend); if (frame) { - frame->set_position(vfpos-leftmost_frame); + frame->set_position(vfpos); outdated_video_frames.remove(frame); } else { remaining.push_back(vfcount); @@ -422,7 +422,7 @@ VideoTimeLine::update_video_timeline() for (VideoFrames::iterator i = outdated_video_frames.begin(); i != outdated_video_frames.end(); ++i ) { VideoImageFrame *frame = (*i); if (remaining.empty()) { - frame->set_position(-2 * vtl_dist); /* move off screen */ + frame->set_position(-2 * vtl_dist + leftmost_frame); /* move off screen */ } else { int vfcount=remaining.front(); remaining.pop_front(); @@ -433,7 +433,7 @@ VideoTimeLine::update_video_timeline() rightend = display_vframe_width * (video_start_offset + video_duration + GOFFSET - vfpos) / vtl_dist; //printf("lf(n): %lu\n", vframeno); // XXX } - frame->set_position(vfpos-leftmost_frame); + frame->set_position(vfpos); frame->set_videoframe(vframeno, rightend); } } |