4 * Copyright (C) 2008-2015 Adam Williams <broadcast at earthling dot net>
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.
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.
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
26 #include "autoconf.inc"
27 #include "bcwindowbase.inc"
30 #include "filexml.inc"
31 #include "maxchannels.h"
32 #include "playbackconfig.inc"
33 #include "recordconfig.inc"
36 // Session shared between all clips
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);
56 // PlaybackConfig* get_playback_config(int strategy, int head);
57 // ArrayList<PlaybackConfig*>* get_playback_config(int strategy);
58 // int get_playback_heads(int strategy);
60 // Called by PreferencesThread to determine if preference changes need to be
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);
68 int achannel_positions[MAXCHANNELS];
71 // AWindow column widths
72 int asset_columns[ASSET_COLUMNS];
74 // Aspect ratio for video
79 // automation follows edits during editing
80 int autos_follow_edits;
81 // Generate keyframes for every tweek
83 // use spanning parameter update
85 // Where to do background rendering
88 // Length of clipboard if pasting
89 double clipboard_length;
90 // Colormodel for intermediate frames
92 // Interlace Mode for entire project
94 // Coords for cropping operation
95 int crop_x1, crop_x2, crop_y1, crop_y2;
96 // radius of eyedropper
98 float ruler_x1, ruler_y1;
99 float ruler_x2, ruler_y2;
100 // Ruler points relative to the output frame.
101 // Current folder in resource window
103 // align cursor on frame boundaries
104 int cursor_on_frames;
105 // paste keyframes to any track type
106 int typeless_keyframes;
107 // Destination item for CWindow
109 // Current submask being edited in CWindow
111 // Use the cwindow or not
113 // CWindow tool currently selected
114 int cwindow_operation;
115 // Use scrollbars in the CWindow
116 int cwindow_scrollbars;
117 // Scrollbar positions
121 int cwindow_click2play;
123 char default_atransition[BCTEXTLEN];
124 char default_vtransition[BCTEXTLEN];
126 double default_transition_length;
127 // Edit mode to use for each mouse button
128 int edit_handle_mode[3];
134 int folderlist_format;
136 float frames_per_foot;
137 // Number of highlighted track
138 int highlighted_track;
139 // Enumeration for how to scale from edl.inc.
140 int interpolation_type;
141 // Whether to interpolate CR2 images
143 // Whether to white balance CR2 images
144 int white_balance_raw;
145 // labels follow edits during editing
146 int labels_follow_edits;
147 int plugins_follow_edits;
148 // For main menu plugin attaching,
149 // // attach 1 standalone on the first track and share it with other tracks
150 int single_standalone;
156 int64_t playback_buffer;
157 int playback_cursor_visible;
158 int64_t playback_preload;
159 int decode_subtitles;
163 int playback_software_position;
164 // current settings are scaled this much from the original settings
166 // original proxy_scale when proxy_enable disables/enables proxy
167 int proxy_disabled_scale;
168 // upscale geom from proxy to session on read in
169 int proxy_use_scaler;
170 // automatically rescale assets when loaded
171 int proxy_auto_scale;
172 // beep when proxy/render done
173 int proxy_beep, render_beep;
174 // int playback_strategy;
175 // Play audio in realtime priority
176 int real_time_playback;
177 int real_time_record;
178 // Use record positioning selection
179 int record_positioning;
180 // Record undecoded stream data
181 int record_raw_stream;
182 // Sync the drives during recording
183 int record_sync_drives;
184 // Speed of meters when recording
186 // Samples to read from device at a time
187 int record_fragment_size;
188 // Samples to write to disk at a time
189 int64_t record_write_length;
190 // Realtime TOC generation for DVB mpeg recording
191 int record_realtime_toc;
192 // Show title and action safe regions in CWindow
196 // Load files as a duration
199 // Show assets in track canvas
201 // Show titles in resources
203 // Test for data before rendering a track
204 int test_playback_edits;
205 // Format to display times in
207 // Offset for timecode
208 int timecode_offset[4];
209 // Format to display nudge in, either seconds or track units.
211 // Show tool window in CWindow
213 // Location of video outs
214 int vchannel_x[MAXCHANNELS];
215 int vchannel_y[MAXCHANNELS];
218 VideoInConfig *vconfig_in;
219 AudioInConfig *aconfig_in;
220 Asset *recording_format;
222 int video_every_frame;
223 // decode video asynchronously
224 // int video_asynchronous;
226 // number of frames to write to disk at a time during video recording.
227 int video_write_length;
228 int view_follows_playback;
229 // Use the vwindow meter or not
232 int vwindow_click2play;
235 static int current_id;
236 PlaybackConfig* playback_config;
239 // Global playback. This is loaded from defaults but not from XML probably
240 // because it was discovered to be the most convenient.
241 // It is part of the EDL probably because the playback setting was
242 // going to be bound to the EDL.
243 // ArrayList<PlaybackConfig*> playback_config[PLAYBACK_STRATEGIES];