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