00001 #ifndef AUTOMATION_H
00002 #define AUTOMATION_H
00003
00004 #include "arraylist.h"
00005 #include "autoconf.inc"
00006 #include "automation.inc"
00007 #include "autos.inc"
00008 #include "edl.inc"
00009 #include "filexml.inc"
00010 #include "maxchannels.h"
00011 #include "module.inc"
00012 #include "track.inc"
00013
00014 #include <stdint.h>
00015
00016 class Automation
00017 {
00018 public:
00019 Automation(EDL *edl, Track *track);
00020 virtual ~Automation();
00021
00022 virtual int create_objects();
00023 void equivalent_output(Automation *automation, int64_t *result);
00024 virtual Automation& operator=(Automation& automation);
00025 virtual void copy_from(Automation *automation);
00026 int load(FileXML *file);
00027
00028 int copy(int64_t start,
00029 int64_t end,
00030 FileXML *xml,
00031 int default_only,
00032 int autos_only);
00033 virtual void dump();
00034 virtual int direct_copy_possible(int64_t start, int direction);
00035 virtual int direct_copy_possible_derived(int64_t start, int direction) { return 1; };
00036
00037 int paste(int64_t start,
00038 int64_t length,
00039 double scale,
00040 FileXML *file,
00041 int default_only,
00042 AutoConf *autoconf);
00043
00044
00045 virtual void get_projector(float *x,
00046 float *y,
00047 float *z,
00048 int64_t position,
00049 int direction);
00050
00051 virtual void get_camera(float *x,
00052 float *y,
00053 float *z,
00054 int64_t position,
00055 int direction);
00056
00057
00058
00059 void clear(int64_t start,
00060 int64_t end,
00061 AutoConf *autoconf,
00062 int shift_autos);
00063 void paste_silence(int64_t start, int64_t end);
00064 void insert_track(Automation *automation,
00065 int64_t start_unit,
00066 int64_t length_units,
00067 int replace_default);
00068 void resample(double old_rate, double new_rate);
00069 int64_t get_length();
00070 virtual void get_extents(float *min,
00071 float *max,
00072 int *coords_undefined,
00073 int64_t unit_start,
00074 int64_t unit_end);
00075
00076
00077
00078
00079
00080 Autos *autos[AUTOMATION_TOTAL];
00081
00082
00083 EDL *edl;
00084 Track *track;
00085 };
00086
00087 #endif