r860: Merge 2.1:
[cinelerra_cv.git] / cinelerra / edlsession.h
blob158a3efa1776b6b96927a44119779152c14f631a
1 #ifndef EDLSESSION_H
2 #define EDLSESSION_H
4 #include "bchash.inc"
5 #include "edl.inc"
6 #include "filexml.inc"
12 // Session shared between all clips
15 class EDLSession
17 public:
18 EDLSession(EDL *edl);
19 ~EDLSession();
21 int load_xml(FileXML *xml, int append_mode, uint32_t load_flags);
22 int save_xml(FileXML *xml);
23 int copy(EDLSession *session);
24 int load_audio_config(FileXML *file, int append_mode, uint32_t load_flags);
25 int save_audio_config(FileXML *xml);
26 int load_video_config(FileXML *file, int append_mode, uint32_t load_flags);
27 int save_video_config(FileXML *xml);
28 int load_defaults(BC_Hash *defaults);
29 int save_defaults(BC_Hash *defaults);
30 // Used by CWindowGUI during initialization.
31 char* get_cwindow_display();
32 void boundaries();
34 // PlaybackConfig* get_playback_config(int strategy, int head);
35 // ArrayList<PlaybackConfig*>* get_playback_config(int strategy);
36 // int get_playback_heads(int strategy);
38 // Called by PreferencesThread to determine if preference changes need to be
39 // rendered.
40 int need_rerender(EDLSession *ptr);
41 // Called by BRender to determine if any background rendered frames are valid.
42 void equivalent_output(EDLSession *session, double *result);
43 void dump();
45 // calculates the frame offset for programme timecode
46 int64_t get_frame_offset();
48 // Audio
49 int achannel_positions[MAXCHANNELS];
50 AudioOutConfig *aconfig_duplex;
51 // AWindow format
52 int assetlist_format;
53 // AWindow column widths
54 int asset_columns[ASSET_COLUMNS];
55 AutoConf *auto_conf;
56 float actual_frame_rate;
57 // Aspect ratio for video
58 float aspect_w;
59 float aspect_h;
60 int audio_channels;
61 int audio_tracks;
62 // automation follows edits during editing
63 int autos_follow_edits;
64 // Generate keyframes for every tweek
65 int auto_keyframes;
66 // Where to start background rendering
67 double brender_start;
68 // Length of clipboard if pasting
69 double clipboard_length;
70 // Colormodel for intermediate frames
71 int color_model;
72 // Interlace Mode for entire project
73 int interlace_mode;
74 // Coords for cropping operation
75 int crop_x1, crop_x2, crop_y1, crop_y2;
76 // Current folder in resource window
77 char current_folder[BCTEXTLEN];
78 // align cursor on frame boundaries
79 int cursor_on_frames;
80 // Destination item for CWindow
81 int cwindow_dest;
82 // Current submask being edited in CWindow
83 int cwindow_mask;
84 // Use the cwindow or not
85 int cwindow_meter;
86 // CWindow tool currently selected
87 int cwindow_operation;
88 // Use scrollbars in the CWindow
89 int cwindow_scrollbars;
90 // Scrollbar positions
91 int cwindow_xscroll;
92 int cwindow_yscroll;
93 float cwindow_zoom;
94 // Transition
95 char default_atransition[BCTEXTLEN];
96 char default_vtransition[BCTEXTLEN];
97 // Length in seconds
98 double default_transition_length;
99 // Edit mode to use for each mouse button
100 int edit_handle_mode[3];
101 // Editing mode
102 int editing_mode;
103 EDL *edl;
104 int enable_duplex;
105 // AWindow format
106 int folderlist_format;
107 double frame_rate;
108 float frames_per_foot;
109 // Number of highlighted track
110 int highlighted_track;
111 // Enumeration for how to scale from edl.inc.
112 int interpolation_type;
113 // Whether to interpolate CR2 images
114 int interpolate_raw;
115 // Whether to white balance CR2 images
116 int white_balance_raw;
117 // labels follow edits during editing
118 int labels_follow_edits;
119 int mpeg4_deblock;
120 int plugins_follow_edits;
121 int meter_format;
122 int min_meter_db;
123 int max_meter_db;
124 int output_w;
125 int output_h;
126 int64_t playback_buffer;
127 int playback_cursor_visible;
128 int64_t playback_preload;
129 int decode_subtitles;
130 int subtitle_number;
131 int playback_software_position;
132 // int playback_strategy;
133 // Play audio in realtime priority
134 int real_time_playback;
135 int real_time_record;
136 // Use software to calculate record position
137 int record_software_position;
138 // Sync the drives during recording
139 int record_sync_drives;
140 // Speed of meters
141 int record_speed;
142 // Samples to write to disk at a time
143 int64_t record_write_length;
144 // Show title and action safe regions in CWindow
145 int safe_regions;
146 int64_t sample_rate;
147 float scrub_speed;
148 // Load files as a duration
149 int si_useduration;
150 float si_duration;
151 // Show assets in track canvas
152 int show_assets;
153 // Show titles in resources
154 int show_titles;
155 // Test for data before rendering a track
156 int test_playback_edits;
157 // Format to display times in
158 int time_format;
159 // Offset for timecode
160 int timecode_offset[4];
161 // Format to display nudge in, either seconds or track units.
162 int nudge_seconds;
163 // Show tool window in CWindow
164 int tool_window;
165 // Location of video outs
166 int vchannel_x[MAXCHANNELS];
167 int vchannel_y[MAXCHANNELS];
168 // Recording
169 int video_channels;
170 VideoInConfig *vconfig_in;
171 AudioInConfig *aconfig_in;
172 Asset *recording_format;
173 // play every frame
174 int video_every_frame;
175 int video_tracks;
176 // number of frames to write to disk at a time during video recording.
177 int video_write_length;
178 int view_follows_playback;
179 // Source item for VWindow
180 // Uniquely identify vwindow clip without pointers
181 char vwindow_folder[BCTEXTLEN];
182 int vwindow_source;
183 // Use the vwindow meter or not
184 int vwindow_meter;
185 float vwindow_zoom;
186 // Global ID counter
187 static int current_id;
188 PlaybackConfig* playback_config;
190 private:
191 // Global playback. This is loaded from defaults but not from XML probably
192 // because it was discovered to be the most convenient.
193 // It is part of the EDL probably because the playback setting was
194 // going to be bound to the EDL.
195 // ArrayList<PlaybackConfig*> playback_config[PLAYBACK_STRATEGIES];
199 #endif