5 #include "autoconf.inc"
6 #include "automation.inc"
10 #include "maxchannels.h"
16 // Match the clipping at per cinelerra/virtualanode.C which contains:
17 // if(fade_value <= INFINITYGAIN) fade_value = 0;
18 // in reality, this should be matched to a user-defined minimum in the preferences
19 #define AUTOMATIONCLAMPS(value, autogrouptype) \
20 if (autogrouptype == AUTOGROUPTYPE_AUDIO_FADE && value <= INFINITYGAIN) \
21 value = INFINITYGAIN; \
22 if (autogrouptype == AUTOGROUPTYPE_VIDEO_FADE) \
23 CLAMP(value, 0, 100); \
24 if (autogrouptype == AUTOGROUPTYPE_ZOOM && value < 0) \
27 #define AUTOMATIONVIEWCLAMPS(value, autogrouptype) \
28 if (autogrouptype == AUTOGROUPTYPE_ZOOM && value < 0) \
34 static int autogrouptypes_fixedrange
[];
35 Automation(EDL
*edl
, Track
*track
);
36 virtual ~Automation();
38 int autogrouptype(int autoidx
, Track
*track
);
39 virtual int create_objects();
40 void equivalent_output(Automation
*automation
, int64_t *result
);
41 virtual Automation
& operator=(Automation
& automation
);
42 virtual void copy_from(Automation
*automation
);
43 int load(FileXML
*file
);
44 // For copy automation, copy, and save
45 int copy(int64_t start
,
51 virtual int direct_copy_possible(int64_t start
, int direction
);
52 virtual int direct_copy_possible_derived(int64_t start
, int direction
) { return 1; };
53 // For paste automation only
54 int paste(int64_t start
,
61 // Get projector coordinates if this is video automation
62 virtual void get_projector(float *x
,
67 // Get camera coordinates if this is video automation
68 virtual void get_camera(float *x
,
74 // Returns the point to restart background rendering at.
75 // -1 means nothing changed.
76 void clear(int64_t start
,
80 void straighten(int64_t start
,
83 void paste_silence(int64_t start
, int64_t end
);
84 void insert_track(Automation
*automation
,
88 void resample(double old_rate
, double new_rate
);
90 virtual void get_extents(float *min
,
92 int *coords_undefined
,
101 Autos
*autos
[AUTOMATION_TOTAL
];