r1014: Enable horizontal scrolling with the mouse wheel by pressing Ctrl.
[cinelerra_cv/ct.git] / cinelerra / recordthread.h
blob0371083807717a9eb8f089f5780712b5090c562d
1 #ifndef RECORDTHREAD_H
2 #define RECORDTHREAD_H
4 #include "condition.inc"
5 #include "drivesync.inc"
6 #include "file.inc"
7 #include "mutex.inc"
8 #include "record.inc"
9 #include "recordaudio.inc"
10 #include "recordvideo.inc"
11 #include "thread.h"
12 #include "bctimer.inc"
14 // Synchronously handle recording and monitoring
16 class RecordThread : public Thread
18 public:
19 RecordThread(MWindow *mwindow, Record *record);
20 ~RecordThread();
22 int create_objects();
23 int start_recording(int monitor, int context);
24 int stop_recording(int resume_monitor);
25 int pause_recording();
26 int resume_recording();
27 int64_t sync_position();
28 void do_cron();
30 void run();
32 int quit_when_completed;
33 RecordAudio *record_audio;
34 RecordVideo *record_video;
35 // Whether to write data to disk
36 int monitor;
37 // Whether to open audio device or record single frame
38 int single_frame;
39 // CONTEXT_INTERACTIVE, CONTEXT_BATCH, CONTEXT_SINGLEFRAME
40 int context;
41 Timer *record_timer;
42 int engine_done;
43 int resume_monitor;
44 // Cron behavior
45 double last_seconds;
46 int last_day;
48 private:
49 MWindow *mwindow;
50 Record *record;
51 File *file;
52 Condition *pause_lock, *startup_lock, *loop_lock;
53 // Lock termination variables to positions where batches aren't being started.
54 Mutex *state_lock;
55 // Override the operating system
56 DriveSync *drivesync;
60 #endif