Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

tracks.h

Go to the documentation of this file.
00001 #ifndef TRACKS_H
00002 #define TRACKS_H
00003 
00004 
00005 #include "autoconf.h"
00006 #include "cursor.inc"
00007 #include "edl.inc"
00008 #include "file.inc"
00009 #include "filexml.inc"
00010 #include "linklist.h"
00011 #include "pluginserver.inc"
00012 #include "threadindexer.inc"
00013 #include "track.h"
00014 #include "trackcanvas.inc"
00015 #include "transition.inc"
00016 
00017 
00018 
00019 class Tracks : public List<Track>
00020 {
00021 public:
00022         Tracks();
00023         Tracks(EDL *edl);
00024         virtual ~Tracks();
00025 
00026         Tracks& operator=(Tracks &tracks);
00027         int load(FileXML *xml, int &track_offset, uint32_t load_flags);
00028         void move_edits(ArrayList<Edit*> *edits, 
00029                 Track *track,
00030                 double position,
00031                 int edit_labels,
00032                 int edit_plugins,
00033                 int behaviour);
00034         void move_effect(Plugin *plugin,
00035                 PluginSet *plugin_set,
00036                 Track *track, 
00037                 int64_t position);
00038 
00039 // Construct a list of all the recordable edits which start on position
00040         void get_affected_edits(ArrayList<Edit*> *drag_edits, 
00041                 double position, 
00042                 Track *start_track);
00043 
00044         void get_automation_extents(float *min, 
00045                 float *max,
00046                 double start,
00047                 double end);
00048 
00049         void equivalent_output(Tracks *tracks, double *result);
00050 
00051         int move_track_up(Track *track);        // move recordable tracks up
00052         int move_track_down(Track *track);      // move recordable tracks down
00053         int move_tracks_up();                   // move recordable tracks up
00054         int move_tracks_down();                 // move recordable tracks down
00055         void paste_audio_transition(PluginServer *server);
00056         void paste_video_transition(PluginServer *server, int first_track = 0);
00057 
00058         void paste_transition(PluginServer *server, Edit *dest_edit);
00059 // Return the numbers of tracks with the play patch enabled
00060         int playable_audio_tracks();
00061         int playable_video_tracks();
00062 // Return number of tracks with the record patch enabled
00063         int recordable_audio_tracks();
00064         int recordable_video_tracks();
00065         int total_audio_tracks();
00066         int total_video_tracks();
00067 // return the longest track in all the tracks in seconds
00068         double total_length();
00069         double total_video_length();
00070 // Update y pixels after a zoom
00071         void update_y_pixels(Theme *theme);
00072 // Total number of tracks where the following toggles are selected
00073         void select_all(int type,
00074                 int value);
00075         void translate_camera(float offset_x, float offset_y);
00076         void translate_projector(float offset_x, float offset_y);
00077                 int total_of(int type);
00078 // add a track
00079         Track* add_audio_track(int above, Track *dst_track);
00080         Track* add_video_track(int above, Track *dst_track);
00081 //      Track* add_audio_track(int to_end = 1);
00082 //      Track* add_video_track(int to_end = 1);
00083 // delete any track
00084         int delete_track(Track* track);       
00085 // detach shared effects referencing module
00086         int detach_shared_effects(int module);  
00087 
00088         EDL *edl;
00089         
00090         
00091         
00092         
00093 
00094 // Types for drag toggle behavior
00095         enum
00096         {
00097                 NONE,
00098                 PLAY,
00099                 RECORD,
00100                 GANG,
00101                 DRAW,
00102                 MUTE,
00103                 EXPAND
00104         };
00105 
00106 
00107 
00108         
00109         
00110         
00111         
00112         
00113         
00114         int change_channels(int oldchannels, int newchannels);
00115         int dump();
00116 
00117 
00118 
00119 // Change references to shared modules in all tracks from old to new.
00120 // If do_swap is true values of new are replaced with old.
00121         void change_modules(int old_location, int new_location, int do_swap);
00122 // Append all the tracks to the end of the recordable tracks
00123         int concatenate_tracks(int edit_plugins);
00124 // Change references to shared plugins in all tracks
00125         void change_plugins(SharedLocation &old_location, SharedLocation &new_location, int do_swap);
00126 
00127         int delete_tracks();     // delete all the recordable tracks
00128         int delete_all_tracks();      // delete just the tracks
00129 
00130         void copy_from(Tracks *tracks);
00131 
00132 // ================================== EDL editing
00133         int copy(double start, 
00134                 double end, 
00135                 int all, 
00136                 FileXML *file, 
00137                 char *output_path = "");
00138 
00139 
00140 
00141         int copy_assets(FileXML *xml, 
00142                 double start, 
00143                 double end, 
00144                 int all);
00145         int clear(double start, double end, int clear_plugins);
00146 // Returns the point to restart background rendering at.
00147 // -1 means nothing changed.
00148         void clear_automation(double selectionstart, 
00149                 double selectionend);
00150         int clear_default_keyframe();
00151         int clear_handle(double start, 
00152                 double end,
00153                 double &longest_distance,
00154                 int clear_labels,
00155                 int clear_plugins);
00156         int copy_automation(double selectionstart, 
00157                 double selectionend, 
00158                 FileXML *file,
00159                 int default_only,
00160                 int autos_only);
00161         int copy_default_keyframe(FileXML *file);
00162         void paste_automation(double selectionstart, 
00163                 FileXML *xml,
00164                 int default_only);
00165         int paste_default_keyframe(FileXML *file);
00166         int paste(int64_t start, int64_t end);
00167 // all units are samples by default
00168         int paste_output(int64_t startproject, 
00169                                 int64_t endproject, 
00170                                 int64_t startsource_sample, 
00171                                 int64_t endsource_sample, 
00172                                 int64_t startsource_frame, 
00173                                 int64_t endsource_frame, 
00174                                 Asset *asset);
00175         int paste_silence(double start, 
00176                 double end, 
00177                 int edit_plugins);
00178         int purge_asset(Asset *asset);
00179         int asset_used(Asset *asset);
00180 // Transition popup
00181         int popup_transition(int cursor_x, int cursor_y);
00182         int select_auto(int cursor_x, int cursor_y);
00183         int move_auto(int cursor_x, int cursor_y, int shift_down);
00184         int modify_edithandles(double &oldposition, 
00185                 double &newposition, 
00186                 int currentend, 
00187                 int handle_mode,
00188                 int edit_labels,
00189                 int edit_plugins);
00190         int modify_pluginhandles(double &oldposition, 
00191                 double &newposition, 
00192                 int currentend, 
00193                 int handle_mode,
00194                 int edit_labels,
00195                 Edits *trim_edits);
00196         int select_handles();
00197         int select_region();
00198         int select_edit(int64_t cursor_position, int cursor_x, int cursor_y, int64_t &new_start, int64_t &new_end);
00199         int feather_edits(int64_t start, int64_t end, int64_t samples, int audio, int video);
00200         int64_t get_feather(int64_t selectionstart, int64_t selectionend, int audio, int video);
00201 // Move edit boundaries and automation during a framerate change
00202         int scale_time(float rate_scale, int ignore_record, int scale_edits, int scale_autos, int64_t start, int64_t end);
00203 
00204 // ================================== accounting
00205 
00206         int handles, titles;     // show handles or titles
00207         int show_output;         // what type of video to draw
00208         AutoConf auto_conf;      // which autos are visible
00209         int overlays_visible;
00210         double total_playable_length();     // Longest track.
00211 // Used by equivalent_output
00212         int total_playable_vtracks();
00213         double total_recordable_length();   // Longest track with recording on
00214         int totalpixels();       // height of all tracks in pixels
00215         int number_of(Track *track);        // track number of pointer
00216         Track* number(int number);      // pointer to track number
00217 
00218 
00219 private:
00220 };
00221 
00222 #endif

Generated on Sun Jan 8 13:39:01 2006 for Cinelerra-svn by  doxygen 1.4.4