fd5a5cc4732e181591500ad7e0ecc1fc8d090901
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / transportque.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef __TRANSPORTQUE_H__
23 #define __TRANSPORTQUE_H__
24
25 #include "canvas.inc"
26 #include "condition.inc"
27 #include "edl.inc"
28 #include "playbackengine.inc"
29 #include "transportque.inc"
30
31 class TransportCommand
32 {
33 public:
34         TransportCommand();
35         ~TransportCommand();
36
37         void reset();
38         void copy_from(TransportCommand *command);
39         TransportCommand& operator=(TransportCommand &command);
40 // Get the range to play back from the EDL
41         void set_playback_range(EDL *edl, int use_inout, int do_displacement);
42         static int single_frame(int command);
43         static int get_direction(int command);
44         static float get_speed(int command, float speed=0);
45
46 // Adjust playback range with in/out points for rendering
47         void playback_range_adjust_inout();
48 // Set playback range to in/out points for rendering
49         void playback_range_inout();
50 // Set playback range to whole project for rendering
51         void playback_range_project();
52         void playback_range_1frame();
53
54         EDL* get_edl();
55         void delete_edl();
56         void new_edl();
57
58         int command;
59         int change_type;
60 // playback range
61         double start_position, end_position;
62         int infinite;
63 // Position used when starting playback
64         double playbackstart;
65 // start at this=0/next=1 frame
66         int displacement;
67 // Send output to device
68         int realtime;
69 // command must execute
70         int locked;
71 // Use persistant starting point
72         int resume;
73 // reverse audio duty
74         int toggle_audio;
75 // playback loop
76         int loop_play;
77 // SLOW,FAST play speed
78         float speed;
79
80         int single_frame() { return single_frame(command); }
81         int get_direction() { return get_direction(command); }
82         float get_speed() { return get_speed(command, speed); }
83         void set_playback_range() { set_playback_range(0, 0, 0); }
84 private:
85 // Copied to render engines
86         EDL *edl;
87 };
88
89 #endif