4 * Copyright (C) 2008 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
25 #include "autoconf.inc"
26 #include "bcwindowbase.inc"
29 #include "filexml.inc"
30 #include "maxchannels.h"
31 #include "playbackconfig.inc"
32 #include "recordconfig.inc"
35 // Session shared between all clips
44 int load_xml(FileXML *xml, int append_mode, uint32_t load_flags);
45 int save_xml(FileXML *xml);
46 int copy(EDLSession *session);
47 int load_audio_config(FileXML *file, int append_mode, uint32_t load_flags);
48 int save_audio_config(FileXML *xml);
49 int load_video_config(FileXML *file, int append_mode, uint32_t load_flags);
50 int save_video_config(FileXML *xml);
51 int load_defaults(BC_Hash *defaults);
52 int save_defaults(BC_Hash *defaults);
55 // PlaybackConfig* get_playback_config(int strategy, int head);
56 // ArrayList<PlaybackConfig*>* get_playback_config(int strategy);
57 // int get_playback_heads(int strategy);
59 // Called by PreferencesThread to determine if preference changes need to be
61 int need_rerender(EDLSession *ptr);
62 // Called by BRender to determine if any background rendered frames are valid.
63 void equivalent_output(EDLSession *session, double *result);
67 int achannel_positions[MAXCHANNELS];
70 // AWindow column widths
71 int asset_columns[ASSET_COLUMNS];
73 // Aspect ratio for video
78 // automation follows edits during editing
79 int autos_follow_edits;
80 // Generate keyframes for every tweek
82 // Where to start background rendering
84 // Length of clipboard if pasting
85 double clipboard_length;
86 // Colormodel for intermediate frames
88 // Coords for cropping operation
89 int crop_x1, crop_x2, crop_y1, crop_y2;
90 // radius of eyedropper
92 float ruler_x1, ruler_y1;
93 float ruler_x2, ruler_y2;
94 // Ruler points relative to the output frame.
95 // Current folder in resource window
96 char current_folder[BCTEXTLEN];
97 // align cursor on frame boundaries
99 // paste keyframes to any track type
100 int typeless_keyframes;
101 // Destination item for CWindow
103 // Current submask being edited in CWindow
105 // Use the cwindow or not
107 // CWindow tool currently selected
108 int cwindow_operation;
109 // Use scrollbars in the CWindow
110 int cwindow_scrollbars;
111 // Scrollbar positions
116 char default_atransition[BCTEXTLEN];
117 char default_vtransition[BCTEXTLEN];
119 double default_transition_length;
120 // Edit mode to use for each mouse button
121 int edit_handle_mode[3];
127 int folderlist_format;
129 float frames_per_foot;
130 // Number of highlighted track
131 int highlighted_track;
132 // Enumeration for how to scale from edl.inc.
133 int interpolation_type;
134 // Whether to interpolate CR2 images
136 // Whether to white balance CR2 images
137 int white_balance_raw;
138 // labels follow edits during editing
139 int labels_follow_edits;
141 int plugins_follow_edits;
142 // For main menu plugin attaching,
143 // attach 1 standalone on the first track and share it with other tracks
144 int single_standalone;
150 int64_t playback_buffer;
151 int playback_cursor_visible;
152 int64_t playback_preload;
153 int decode_subtitles;
157 int playback_software_position;
158 // int playback_strategy;
159 // Play audio in realtime priority
160 int real_time_playback;
161 int real_time_record;
162 // Use record positioning selection
163 int record_positioning;
164 // Record undecoded stream data
165 int record_raw_stream;
166 // Sync the drives during recording
167 int record_sync_drives;
168 // Speed of meters when recording
170 // Samples to read from device at a time
171 int record_fragment_size;
172 // Samples to write to disk at a time
173 int64_t record_write_length;
174 // Realtime TOC generation for DVB mpeg recording
175 int record_realtime_toc;
176 // Show title and action safe regions in CWindow
180 // Show assets in track canvas
182 // Show titles in resources
184 // Test for data before rendering a track
185 int test_playback_edits;
186 // Format to display times in
188 // Format to display nudge in, either seconds or track units.
190 // Show tool window in CWindow
192 // Location of video outs
193 int vchannel_x[MAXCHANNELS];
194 int vchannel_y[MAXCHANNELS];
197 VideoInConfig *vconfig_in;
198 AudioInConfig *aconfig_in;
199 Asset *recording_format;
201 int video_every_frame;
202 // decode video asynchronously
203 int video_asynchronous;
205 // number of frames to write to disk at a time during video recording.
206 int video_write_length;
207 int view_follows_playback;
208 // Use the vwindow meter or not
213 static int current_id;
214 PlaybackConfig* playback_config;
217 // Global playback. This is loaded from defaults but not from XML probably
218 // because it was discovered to be the most convenient.
219 // It is part of the EDL probably because the playback setting was
220 // going to be bound to the EDL.
221 // ArrayList<PlaybackConfig*> playback_config[PLAYBACK_STRATEGIES];