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