2 #include "edlsession.h"
3 #include "localsession.h"
5 #include "meterpanel.h"
11 #include "vwindowgui.h"
14 VTracking::VTracking(MWindow *mwindow, VWindow *vwindow)
17 this->vwindow = vwindow;
20 VTracking::~VTracking()
24 PlaybackEngine* VTracking::get_playback_engine()
26 return vwindow->playback_engine;
29 void VTracking::update_tracker(double position)
31 //printf("VTracking::update_tracker %ld\n", position);
32 vwindow->gui->lock_window();
33 vwindow->get_edl()->local_session->selectionstart =
34 vwindow->get_edl()->local_session->selectionend =
36 vwindow->gui->slider->update(position);
37 vwindow->gui->clock->update(position);
39 // This is going to boost the latency but we need to update the timebar
40 vwindow->gui->timebar->draw_range();
41 vwindow->gui->timebar->flash();
43 vwindow->gui->unlock_window();
45 update_meters((int64_t)(position * mwindow->edl->session->frame_rate));
48 void VTracking::update_meters(int64_t position)
50 double output_levels[MAXCHANNELS];
51 int do_audio = get_playback_engine()->get_output_levels(output_levels, position);
54 vwindow->gui->lock_window();
55 vwindow->gui->meters->update(output_levels);
56 vwindow->gui->unlock_window();
60 void VTracking::stop_meters()
62 vwindow->gui->lock_window();
63 vwindow->gui->meters->stop_meters();
64 vwindow->gui->unlock_window();
67 void VTracking::draw()