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 // Where to do background rendering
86 // Length of clipboard if pasting
87 double clipboard_length;
88 // Colormodel for intermediate frames
90 // Interlace Mode for entire project
92 // Coords for cropping operation
93 int crop_x1, crop_x2, crop_y1, crop_y2;
94 // radius of eyedropper
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
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
107 // Current submask being edited in CWindow
109 // Use the cwindow or not
111 // CWindow tool currently selected
112 int cwindow_operation;
113 // Use scrollbars in the CWindow
114 int cwindow_scrollbars;
115 // Scrollbar positions
119 int cwindow_click2play;
121 char default_atransition[BCTEXTLEN];
122 char default_vtransition[BCTEXTLEN];
124 double default_transition_length;
125 // Edit mode to use for each mouse button
126 int edit_handle_mode[3];
132 int folderlist_format;
134 float frames_per_foot;
135 // Number of highlighted track
136 int highlighted_track;
137 // Enumeration for how to scale from edl.inc.
138 int interpolation_type;
139 // Whether to interpolate CR2 images
141 // Whether to white balance CR2 images
142 int white_balance_raw;
143 // labels follow edits during editing
144 int labels_follow_edits;
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;
154 int64_t playback_buffer;
155 int playback_cursor_visible;
156 int64_t playback_preload;
157 int decode_subtitles;
161 int playback_software_position;
162 // current settings are scaled this much from the original settings
164 // upscale geom from proxy to session on read in
165 int proxy_use_scaler;
166 // automatically rescale assets when loaded
167 int proxy_auto_scale;
168 // int playback_strategy;
169 // Play audio in realtime priority
170 int real_time_playback;
171 int real_time_record;
172 // Use record positioning selection
173 int record_positioning;
174 // Record undecoded stream data
175 int record_raw_stream;
176 // Sync the drives during recording
177 int record_sync_drives;
178 // Speed of meters when recording
180 // Samples to read from device at a time
181 int record_fragment_size;
182 // Samples to write to disk at a time
183 int64_t record_write_length;
184 // Realtime TOC generation for DVB mpeg recording
185 int record_realtime_toc;
186 // Show title and action safe regions in CWindow
190 // Load files as a duration
193 // Show assets in track canvas
195 // Show titles in resources
197 // Test for data before rendering a track
198 int test_playback_edits;
199 // Format to display times in
201 // Offset for timecode
202 int timecode_offset[4];
203 // Format to display nudge in, either seconds or track units.
205 // Show tool window in CWindow
207 // Location of video outs
208 int vchannel_x[MAXCHANNELS];
209 int vchannel_y[MAXCHANNELS];
212 VideoInConfig *vconfig_in;
213 AudioInConfig *aconfig_in;
214 Asset *recording_format;
216 int video_every_frame;
217 // decode video asynchronously
218 // int video_asynchronous;
220 // number of frames to write to disk at a time during video recording.
221 int video_write_length;
222 int view_follows_playback;
223 // Use the vwindow meter or not
226 int vwindow_click2play;
229 static int current_id;
230 PlaybackConfig* playback_config;
233 // Global playback. This is loaded from defaults but not from XML probably
234 // because it was discovered to be the most convenient.
235 // It is part of the EDL probably because the playback setting was
236 // going to be bound to the EDL.
237 // ArrayList<PlaybackConfig*> playback_config[PLAYBACK_STRATEGIES];