12 #include "transition.inc"
14 // Generic list of edits of something
16 class Edits
: public List
<Edit
>
19 Edits(EDL
*edl
, Track
*track
);
22 void equivalent_output(Edits
*edits
, int64_t *result
);
23 virtual Edits
& operator=(Edits
& edits
);
25 void insert_edits(Edits
*edits
, int64_t position
);
26 void insert_asset(Asset
*asset
, int64_t length
, int64_t sample
, int track_number
);
27 // Split edit containing position.
28 // Return the second edit in the split.
29 Edit
* split_edit(int64_t position
);
30 // Create a blank edit in the native data format
31 int clear_handle(double start
,
35 virtual Edit
* create_edit() { return 0; };
36 // Insert a 0 length edit at the position
37 Edit
* insert_new_edit(int64_t sample
);
38 int save(FileXML
*xml
, char *output_path
);
39 int copy(int64_t start
, int64_t end
, FileXML
*xml
, char *output_path
);
40 // Clear region of edits
41 virtual void clear(int64_t start
, int64_t end
);
42 // Clear edits and plugins for a handle modification
43 virtual void clear_recursive(int64_t start
,
48 virtual void shift_keyframes_recursive(int64_t position
, int64_t length
);
49 virtual void shift_effects_recursive(int64_t position
, int64_t length
);
50 // Returns the newly created edit
51 Edit
* paste_silence(int64_t start
, int64_t end
);
52 void resample(double old_rate
, double new_rate
);
53 // Shift edits on or after position by distance
54 // Return the edit now on the position.
55 virtual Edit
* shift(int64_t position
, int64_t difference
);
69 // ============================= initialization commands ====================
70 Edits() { printf("default edits constructor called\n"); };
72 // ================================== file operations
74 int load(FileXML
*xml
, int track_offset
);
75 int load_edit(FileXML
*xml
, int64_t &startproject
, int track_offset
);
77 virtual Edit
* append_new_edit() {};
78 virtual Edit
* insert_edit_after(Edit
*previous_edit
) { return 0; };
79 virtual int load_edit_properties(FileXML
*xml
) {};
82 // ==================================== accounting
84 Edit
* editof(int64_t position
, int direction
);
85 // Return an edit if position is over an edit and the edit has a source file
86 Edit
* get_playable_edit(int64_t position
);
87 // int64_t total_length();
88 int64_t length(); // end position of last edit
90 // ==================================== editing
92 // inserts space at the desired location and returns the edit before the space
93 // fills end of track if range is after track
94 int modify_handles(double oldposition
,
101 virtual int optimize();
105 virtual int clone_derived(Edit
* new_edit
, Edit
* old_edit
) {};