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