r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / cinelerra / recordthread.h
blobceefad652db3fd938ef736f2a53fcdafedd670fc
1 #ifndef RECORDTHREAD_H
2 #define RECORDTHREAD_H
4 #include "drivesync.inc"
5 #include "file.inc"
6 #include "record.inc"
7 #include "recordaudio.inc"
8 #include "recordvideo.inc"
9 #include "thread.h"
10 #include "timer.inc"
12 // Synchronously handle recording and monitoring
14 class RecordThread : public Thread
16 public:
17 RecordThread(MWindow *mwindow, Record *record);
18 ~RecordThread();
20 int create_objects();
21 int start_recording(int monitor, int context);
22 int stop_recording(int resume_monitor);
23 int pause_recording();
24 int resume_recording();
25 int64_t sync_position();
26 void do_cron();
28 void run();
30 int quit_when_completed;
31 RecordAudio *record_audio;
32 RecordVideo *record_video;
33 // Whether to write data to disk
34 int monitor;
35 // Whether to open audio device or record single frame
36 int single_frame;
37 // CONTEXT_INTERACTIVE, CONTEXT_BATCH, CONTEXT_SINGLEFRAME
38 int context;
39 Timer *record_timer;
40 int engine_done;
41 int resume_monitor;
42 // Cron behavior
43 double last_seconds;
44 int last_day;
46 private:
47 MWindow *mwindow;
48 Record *record;
49 File *file;
50 Mutex pause_lock, startup_lock, completion_lock, loop_lock;
51 // Lock termination variables to positions where batches aren't being started.
52 Mutex state_lock;
53 // Override the operating system
54 DriveSync *drivesync;
58 #endif