Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / edl.h
index f355b57ab21b29fdd24acb1b3bbe4fa53738954b..5d08285bd5ddd2abf726c73c68618a55c009b6de 100644 (file)
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <stdint.h>
 
+#include "arraylist.h"
 #include "asset.inc"
 #include "assets.inc"
 #include "autoconf.inc"
@@ -47,7 +48,7 @@
 #include "pluginserver.h"
 #include "preferences.inc"
 #include "recordlabel.inc"
-#include "sharedlocation.inc"
+#include "sharedlocation.h"
 #include "theme.inc"
 #include "tracks.inc"
 #include "vedit.inc"
@@ -93,7 +94,7 @@ public:
                int direction,
                PlayableTracks *playable_tracks);
 
-// Convert position to frame boundry times
+// Convert position to frame boundary times
        double frame_align(double position, int round);
 // frame align if cursor alignment is enabled
        double align_to_frame(double position, int round);
@@ -167,6 +168,7 @@ public:
 // return next/prev edit starting from position
        double next_edit(double position);
        double prev_edit(double position);
+       double skip_silence(double position);
 // Debug
        int dump(FILE *fp=stdout);
        static int next_id();
@@ -195,9 +197,11 @@ public:
        int copy_assets(int copy_flags, double start, double end,
                FileXML *file, const char *output_path);
        void copy_indexables(EDL *edl);
-       EDL *new_nested(EDL *edl, const char *path);
+       EDL *new_nested_clip(EDL *edl, const char *path);
+       EDL *get_nested_edl(const char *path);
        EDL *create_nested_clip(EDL *nested);
        void create_nested(EDL *nested);
+       void overwrite_clip(EDL *clip);
        void paste_silence(double start, double end,
                int edit_labels /* = 1 */,
                int edit_plugins,
@@ -210,7 +214,7 @@ public:
                int clear_labels,
                int clear_plugins,
                int edit_autos);
-       void deglitch(double position);
+       int clear_hard_edges(double start, double end);
 // Insert the asset at a point in the EDL
        void insert_asset(Asset *asset,
                EDL *nested_edl,
@@ -219,8 +223,20 @@ public:
                RecordLabels *labels = 0);
 // Insert the clip at a point in the EDL
        int insert_clips(ArrayList<EDL*> *new_edls, int load_mode, Track *first_track = 0);
+// copy/paste group of effects
+       int collect_effects(EDL *&group);
+       int insert_effects(EDL *group, Track *first_track=0);
 // Add a copy of EDL* to the clip array.  Returns the copy.
        EDL* add_clip(EDL *edl);
+       EDL *selected_edits_to_clip(int packed,
+               double *start_position, Track **start_track,
+               int edit_labels, int edit_autos, int edit_plugins);
+       EDL *selected_edits_to_clip(int packed, double *start_position, Track **start_track);
+       void selected_edits_to_clipboard(int packed);
+       void paste_edits(EDL *clip, Track *first_track, double position, int overwrite,
+               int edit_edits, int edit_labels, int edit_autos, int edit_plugins);
+       void paste_edits(EDL *clip, Track *first_track, double position, int overwrite);
+       void replace_assets(ArrayList<Indexable*> &orig_idxbls, ArrayList<Asset*> &new_assets);
 // resequence group ids starting at next_id
        int regroup(int next_id);
 
@@ -229,8 +245,9 @@ public:
        void get_shared_tracks(Track *track, ArrayList<SharedLocation*> *module_locations,
                int omit_recordable, int data_type);
 
-    int get_tracks_height(Theme *theme);
-    int64_t get_tracks_width();
+       int get_tracks_height(Theme *theme);
+       int64_t get_tracks_width();
+
 // Return dimensions for canvas if smaller dimensions has zoom of 1
        void calculate_conformed_dimensions(int single_channel, float &w, float &h);
 // Get the total output size scaled to aspect ratio
@@ -260,8 +277,7 @@ public:
        void rescale_proxy(int orig_scale, int new_scale);
        void set_proxy(int new_scale, int use_scaler,
                ArrayList<Indexable*> *orig_assets, ArrayList<Indexable*> *proxy_assets);
-       void add_proxy(int use_scaler,
-               ArrayList<Indexable*> *orig_assets, ArrayList<Indexable*> *proxy_assets);
+       void add_proxy(ArrayList<Indexable*> *orig_assets, ArrayList<Indexable*> *proxy_assets);
        Asset *get_proxy_asset();
        Track *add_new_track(int data_type);
 
@@ -290,4 +306,12 @@ public:
        EDL *parent_edl;
 };
 
+// remap plugin shares in collect/paste effects
+class edl_shared : public ArrayList<int> { public: int trk; };
+class edl_shared_list : public ArrayList<edl_shared> {};
+class edl_SharedLocations : public ArrayList<SharedLocation> {
+public:
+       void add(int trk, int plg);
+};
+
 #endif