r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / tracking.h
blobbc3940be2a7f30808110e690638bf3a54c7cf4e1
1 #ifndef TRACKING_H
2 #define TRACKING_H
4 #include <sys/time.h>
5 #include <sys/types.h>
6 #include <unistd.h>
8 #include "mwindow.inc"
9 #include "mwindowgui.inc"
10 #include "mutex.h"
11 #include "playbackengine.inc"
12 #include "thread.h"
13 #include "timer.h"
15 class Tracking : public Thread
17 public:
18 Tracking(MWindow *mwindow);
19 virtual ~Tracking();
21 void create_objects();
22 virtual int start_playback(double new_position);
23 virtual int stop_playback();
25 // Called by the tracker to get the current position
26 virtual PlaybackEngine* get_playback_engine();
27 virtual double get_tracking_position();
28 // Update position displayed
29 virtual void update_tracker(double position);
30 // Update meters
31 virtual void update_meters(int64_t position);
32 virtual void stop_meters();
33 int get_pixel(double position);
35 // Erase cursor if it's visible. Called by start_playback
36 // Draw new cursor at last_position if invisible
37 virtual void draw();
41 void run();
43 // Values to return from playback_engine to update_meter .
44 // Use ArrayList to simplify module counting
45 ArrayList<double> module_levels;
46 int state;
57 void show_playback_cursor(int64_t position);
58 int wait_for_startup();
59 int view_follows_playback;
60 // Stop cursor loop when not playing
61 Mutex pause_lock;
62 // Exclude changes in state during the main loop
63 Mutex loop_lock;
64 // Exclude accesses to the cursor
65 Mutex cursor_lock;
66 // Delay until startup
67 Mutex startup_lock;
68 MWindow *mwindow;
69 MWindowGUI *gui;
70 double last_position;
71 int follow_loop;
72 int64_t current_offset;
73 int reverse;
74 int double_speed;
75 Timer timer;
76 // Pixel of last drawn cursor
77 int pixel;
78 // Cursor is visible
79 int visible;
82 #endif