bsd lang segv fix, enable bsd lv2, lv2 gui enable fix, proxy/ffmpeg toggle resize...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / vtransition.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 VTRACK_H
23 #define VTRACK_H
24
25 #include "arraylist.h"
26 #include "autoconf.inc"
27 #include "bezierauto.inc"
28 #include "bezierautos.inc"
29 #include "filexml.inc"
30 #include "floatautos.inc"
31 #include "linklist.h"
32 #include "mwindow.inc"
33 #include "track.h"
34 #include "vframe.inc"
35
36 // CONVERTS FROM SAMPLES TO FRAMES
37
38
39
40 class VTrack : public Track
41 {
42 public:
43         VTrack() {};
44         VTrack(MWindow *mwindow, Tracks *tracks);
45         ~VTrack();
46
47 // ====================================== initialization
48         int create_derived_objs(int flash);
49
50         int save_derived(FileXML *xml);
51         int load_derived(FileXML *xml, int automation_only, int edits_only, int load_all, int &output_channel);
52
53 // ===================================== rendering
54
55         int render(VFrame **output, long input_len, long input_position, float step);
56         int get_projection(float &in_x1, float &in_y1, float &in_x2, float &in_y2,
57                                         float &out_x1, float &out_y1, float &out_x2, float &out_y2,
58                                         int frame_w, int frame_h, long real_position,
59                                         BezierAuto **before, BezierAuto **after);
60
61 // ===================================== editing
62
63         int copy_derived(long start, long end, FileXML *xml);
64         int paste_derived(long start, long end, long total_length, FileXML *xml, int &current_channel);
65 // use samples for paste_output
66         int paste_output(long startproject, long endproject, long startsource, long endsource, int layer, Asset *asset);
67         int clear_derived(long start, long end);
68         int copy_automation_derived(AutoConf *auto_conf, long start, long end, FileXML *xml);
69         int paste_automation_derived(long start, long end, long total_length, FileXML *xml, int shift_autos, int &current_pan);
70         int clear_automation_derived(AutoConf *auto_conf, long start, long end, int shift_autos = 1);
71         int paste_auto_silence_derived(long start, long end);
72         int modify_handles(long oldposition, long newposition, int currentend);
73         int draw_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf);
74         int draw_floating_autos_derived(float view_start, float zoom_units, AutoConf *auto_conf, int flash);
75         int select_translation(int cursor_x, int cursor_y); // select coordinates of frame
76         int update_translation(int cursor_x, int cursor_y, int shift_down);  // move coordinates of frame
77         int reset_translation(long start, long end);
78         int end_translation();
79         int select_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y);
80         int move_auto_derived(float zoom_units, float view_start, AutoConf *auto_conf, int cursor_x, int cursor_y, int shift_down);
81         int release_auto_derived();
82         int scale_video(float camera_scale, float projector_scale, int *offsets);
83         int scale_time_derived(float rate_scale, int scale_edits, int scale_autos, long start, long end);
84
85 // ===================================== for handles, titles, etc
86
87         BezierAutos *camera_autos;
88         BezierAutos *projector_autos;
89         long length();
90 // rounds up to integer frames for editing
91         long samples_to_units(long &samples);
92 // no rounding for drawing
93 //      int get_dimensions(float &view_start, float &view_units, float &zoom_units);
94
95 private:
96 };
97
98 #endif