asset menu size fixups, new picons+prefs, more timecode del, stretch scrollbars,...
[goodguy/history.git] / cinelerra-5.1 / cinelerra / edlsession.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008-2015 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef EDLSESSION_H
23 #define EDLSESSION_H
24
25 #include "asset.inc"
26 #include "autoconf.inc"
27 #include "bcwindowbase.inc"
28 #include "bchash.inc"
29 #include "edl.inc"
30 #include "filexml.inc"
31 #include "maxchannels.h"
32 #include "playbackconfig.inc"
33 #include "recordconfig.inc"
34
35
36 // Session shared between all clips
37
38
39 class EDLSession
40 {
41 public:
42         EDLSession(EDL *edl);
43         ~EDLSession();
44
45         int load_xml(FileXML *xml, int append_mode, uint32_t load_flags);
46         int save_xml(FileXML *xml);
47         int copy(EDLSession *session);
48         int load_audio_config(FileXML *file, int append_mode, uint32_t load_flags);
49         int save_audio_config(FileXML *xml);
50         int load_video_config(FileXML *file, int append_mode, uint32_t load_flags);
51         int save_video_config(FileXML *xml);
52         int load_defaults(BC_Hash *defaults);
53         int save_defaults(BC_Hash *defaults);
54         void boundaries();
55
56 //      PlaybackConfig* get_playback_config(int strategy, int head);
57 //      ArrayList<PlaybackConfig*>* get_playback_config(int strategy);
58 //      int get_playback_heads(int strategy);
59
60 // Called by PreferencesThread to determine if preference changes need to be
61 // rendered.
62         int need_rerender(EDLSession *ptr);
63 // Called by BRender to determine if any background rendered frames are valid.
64         void equivalent_output(EDLSession *session, double *result);
65         void dump();
66
67 // Audio
68         int achannel_positions[MAXCHANNELS];
69 // AWindow format
70         int assetlist_format;
71 // AWindow column widths
72         int asset_columns[ASSET_COLUMNS];
73         AutoConf *auto_conf;
74 // Aspect ratio for video
75         float aspect_w;
76         float aspect_h;
77         int audio_channels;
78         int audio_tracks;
79 // automation follows edits during editing
80         int autos_follow_edits;
81 // Generate keyframes for every tweek
82         int auto_keyframes;
83 // Where to do background rendering
84         double brender_start;
85         double brender_end;
86 // Length of clipboard if pasting
87         double clipboard_length;
88 // Colormodel for intermediate frames
89         int color_model;
90 // Interlace Mode for entire project
91         int interlace_mode;
92 // Coords for cropping operation
93         int crop_x1, crop_x2, crop_y1, crop_y2;
94 // radius of eyedropper
95         int eyedrop_radius;
96         float ruler_x1, ruler_y1;
97         float ruler_x2, ruler_y2;
98 // Ruler points relative to the output frame.
99 // Current folder in resource window
100         int awindow_folder;
101 // align cursor on frame boundaries
102         int cursor_on_frames;
103 // paste keyframes to any track type
104         int typeless_keyframes;
105 // Destination item for CWindow
106         int cwindow_dest;
107 // Current submask being edited in CWindow
108         int cwindow_mask;
109 // Use the cwindow or not
110         int cwindow_meter;
111 // CWindow tool currently selected
112         int cwindow_operation;
113 // Use scrollbars in the CWindow
114         int cwindow_scrollbars;
115 // Scrollbar positions
116         int cwindow_xscroll;
117         int cwindow_yscroll;
118         float cwindow_zoom;
119 // Transition
120         char default_atransition[BCTEXTLEN];
121         char default_vtransition[BCTEXTLEN];
122 // Length in seconds
123         double default_transition_length;
124 // Edit mode to use for each mouse button
125         int edit_handle_mode[3];
126 // Editing mode
127         int editing_mode;
128         EDL *edl;
129         int enable_duplex;
130 // AWindow format
131         int folderlist_format;
132         double frame_rate;
133         float frames_per_foot;
134 // Number of highlighted track
135         int highlighted_track;
136 // Enumeration for how to scale from edl.inc.
137         int interpolation_type;
138 // Whether to interpolate CR2 images
139         int interpolate_raw;
140 // Whether to white balance CR2 images
141         int white_balance_raw;
142 // labels follow edits during editing
143         int labels_follow_edits;
144         int mpeg4_deblock;
145         int plugins_follow_edits;
146 // For main menu plugin attaching,
147 // // attach 1 standalone on the first track and share it with other tracks
148         int single_standalone;
149         int meter_format;
150         int min_meter_db;
151         int max_meter_db;
152         int output_w;
153         int output_h;
154         int64_t playback_buffer;
155         int playback_cursor_visible;
156         int64_t playback_preload;
157         int decode_subtitles;
158         int subtitle_number;
159         int label_cells;
160         int program_no;
161         int playback_software_position;
162 //      int playback_strategy;
163 // Play audio in realtime priority
164         int real_time_playback;
165         int real_time_record;
166 // Use record positioning selection
167         int record_positioning;
168 // Record undecoded stream data
169         int record_raw_stream;
170 // Sync the drives during recording
171         int record_sync_drives;
172 // Speed of meters when recording
173         int record_speed;
174 // Samples to read from device at a time
175         int record_fragment_size;
176 // Samples to write to disk at a time
177         int64_t record_write_length;
178 // Realtime TOC generation for DVB mpeg recording
179         int record_realtime_toc;
180 // Show title and action safe regions in CWindow
181         int safe_regions;
182         int64_t sample_rate;
183         float scrub_speed;
184 // Load files as a duration
185         int si_useduration;
186         float si_duration;
187 // Show assets in track canvas
188         int show_assets;
189 // Show titles in resources
190         int show_titles;
191 // Test for data before rendering a track
192         int test_playback_edits;
193 // Format to display times in
194         int time_format;
195 // Offset for timecode
196         int timecode_offset[4];
197 // Format to display nudge in, either seconds or track units.
198         int nudge_format;
199 // Show tool window in CWindow
200         int tool_window;
201 // Location of video outs
202         int vchannel_x[MAXCHANNELS];
203         int vchannel_y[MAXCHANNELS];
204 // Recording
205         int video_channels;
206         VideoInConfig *vconfig_in;
207         AudioInConfig *aconfig_in;
208         Asset *recording_format;
209 // play every frame
210         int video_every_frame;
211 // decode video asynchronously
212         int video_asynchronous;
213         int video_tracks;
214 // number of frames to write to disk at a time during video recording.
215         int video_write_length;
216         int view_follows_playback;
217 // Use the vwindow meter or not
218         int vwindow_meter;
219         float vwindow_zoom;
220
221 // Global ID counter
222         static int current_id;
223         PlaybackConfig* playback_config;
224
225 private:
226 // Global playback.  This is loaded from defaults but not from XML probably
227 // because it was discovered to be the most convenient.
228 // It is part of the EDL probably because the playback setting was
229 // going to be bound to the EDL.
230 //      ArrayList<PlaybackConfig*> playback_config[PLAYBACK_STRATEGIES];
231 };
232
233
234 #endif