r901: Automation::fit_autos() now works and automation_{min,max} variable removed
[cinelerra_cv/pmdumuid.git] / cinelerra / automation.h
blob983670a4422d05e3dbb72f1436515b5c42f124cd
1 #ifndef AUTOMATION_H
2 #define AUTOMATION_H
4 #include "arraylist.h"
5 #include "autoconf.inc"
6 #include "automation.inc"
7 #include "autos.inc"
8 #include "edl.inc"
9 #include "filexml.inc"
10 #include "maxchannels.h"
11 #include "module.inc"
12 #include "track.inc"
14 #include <stdint.h>
16 class Automation
18 public:
19 static int autogrouptypes_fixedrange[];
20 Automation(EDL *edl, Track *track);
21 virtual ~Automation();
23 int autogrouptype(int autoidx, Track *track);
24 virtual int create_objects();
25 void equivalent_output(Automation *automation, int64_t *result);
26 virtual Automation& operator=(Automation& automation);
27 virtual void copy_from(Automation *automation);
28 int load(FileXML *file);
29 // For copy automation, copy, and save
30 int copy(int64_t start,
31 int64_t end,
32 FileXML *xml,
33 int default_only,
34 int autos_only);
35 virtual void dump();
36 virtual int direct_copy_possible(int64_t start, int direction);
37 virtual int direct_copy_possible_derived(int64_t start, int direction) { return 1; };
38 // For paste automation only
39 int paste(int64_t start,
40 int64_t length,
41 double scale,
42 FileXML *file,
43 int default_only,
44 AutoConf *autoconf);
46 // Get projector coordinates if this is video automation
47 virtual void get_projector(float *x,
48 float *y,
49 float *z,
50 int64_t position,
51 int direction);
52 // Get camera coordinates if this is video automation
53 virtual void get_camera(float *x,
54 float *y,
55 float *z,
56 int64_t position,
57 int direction);
59 // Returns the point to restart background rendering at.
60 // -1 means nothing changed.
61 void clear(int64_t start,
62 int64_t end,
63 AutoConf *autoconf,
64 int shift_autos);
65 void straighten(int64_t start,
66 int64_t end,
67 AutoConf *autoconf);
68 void paste_silence(int64_t start, int64_t end);
69 void insert_track(Automation *automation,
70 int64_t start_unit,
71 int64_t length_units,
72 int replace_default);
73 void resample(double old_rate, double new_rate);
74 int64_t get_length();
75 virtual void get_extents(float *min,
76 float *max,
77 int *coords_undefined,
78 int64_t unit_start,
79 int64_t unit_end,
80 int autogrouptype);
86 Autos *autos[AUTOMATION_TOTAL];
89 EDL *edl;
90 Track *track;
93 #endif