00001 #ifndef EDITS_H
00002 #define EDITS_H
00003
00004
00005 #include "asset.inc"
00006 #include "assets.inc"
00007 #include "edl.inc"
00008 #include "guicast.h"
00009 #include "edit.h"
00010 #include "filexml.inc"
00011 #include "linklist.h"
00012 #include "track.inc"
00013 #include "transition.inc"
00014
00015
00016
00017 #define LAST_VIRTUAL_LENGTH 1000000000
00018
00019
00020
00021 class Edits : public List<Edit>
00022 {
00023 public:
00024 Edits(EDL *edl, Track *track, Edit *default_edit);
00025 virtual ~Edits();
00026
00027 void equivalent_output(Edits *edits, int64_t *result);
00028 virtual void copy_from(Edits *edits);
00029 virtual Edits& operator=(Edits& edits);
00030
00031 void insert_edits(Edits *edits, int64_t position);
00032 void insert_asset(Asset *asset, int64_t length, int64_t sample, int track_number);
00033
00034
00035 Edit* split_edit(int64_t position);
00036
00037 int clear_handle(double start,
00038 double end,
00039 int edit_plugins,
00040 double &distance);
00041 virtual Edit* create_edit() { return 0; };
00042
00043 Edit* insert_new_edit(int64_t sample);
00044 int save(FileXML *xml, char *output_path);
00045 int copy(int64_t start, int64_t end, FileXML *xml, char *output_path);
00046
00047 virtual void clear(int64_t start, int64_t end);
00048
00049 virtual void clear_recursive(int64_t start,
00050 int64_t end,
00051 int edit_edits,
00052 int edit_labels,
00053 int edit_plugins,
00054 Edits *trim_edits);
00055 virtual void shift_keyframes_recursive(int64_t position, int64_t length);
00056 virtual void shift_effects_recursive(int64_t position, int64_t length);
00057
00058 void paste_silence(int64_t start, int64_t end);
00059
00060 Edit *create_and_insert_edit(int64_t start, int64_t end);
00061
00062 void resample(double old_rate, double new_rate);
00063
00064
00065 virtual Edit* shift(int64_t position, int64_t difference);
00066
00067 EDL *edl;
00068 Track *track;
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080 Edits() { printf("default edits constructor called\n"); };
00081
00082
00083
00084 int load(FileXML *xml, int track_offset);
00085 int load_edit(FileXML *xml, int64_t &startproject, int track_offset);
00086
00087 virtual Edit* append_new_edit() {};
00088 virtual Edit* insert_edit_after(Edit *previous_edit) { return 0; };
00089 virtual int load_edit_properties(FileXML *xml) {};
00090
00091
00092
00093
00094 Edit* editof(int64_t position, int direction, int use_nudge);
00095
00096 Edit* get_playable_edit(int64_t position, int use_nudge);
00097
00098 int64_t length();
00099
00100
00101
00102 int modify_handles(double oldposition,
00103 double newposition,
00104 int currentend,
00105 int edit_mode,
00106 int edit_edits,
00107 int edit_labels,
00108 int edit_plugins,
00109 Edits *trim_edits);
00110 virtual int optimize();
00111
00112 int64_t loaded_length;
00113 private:
00114 virtual int clone_derived(Edit* new_edit, Edit* old_edit) {};
00115 };
00116
00117
00118
00119 #endif